Construction of the sensor- and source-space neighbourhood graphs that define the cluster support for permutation testing. More...
#include "sts_global.h"#include <fiff/fiff_info.h>#include <QStringList>#include <Eigen/Core>#include <Eigen/SparseCore>

Go to the source code of this file.
Classes | |
| class | STSLIB::StatsAdjacency |
| Builds the sparse spatial and spatio-temporal neighbourhood graphs that define cluster support for permutation tests. More... | |
Namespaces | |
| namespace | STSLIB |
| Statistical testing (t-tests, F-tests, cluster permutation, multiple comparison correction). | |
Construction of the sensor- and source-space neighbourhood graphs that define the cluster support for permutation testing.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Cluster-based inference (STSLIB::StatsCluster) reduces the multiple-comparison problem by grouping supra-threshold samples into spatially - and optionally temporally - connected clusters before computing a max-statistic null. Doing this rigorously requires an explicit adjacency graph whose edges encode which (channel, time) or (vertex, time) pairs are allowed to merge.
STSLIB::StatsAdjacency provides three constructors that cover the standard M/EEG analysis cases: a sensor graph built from the 3D channel positions in a FIFFLIB::FiffInfo using a heuristic of three times the median nearest-neighbour distance, a cortical graph built from the triangulation of a source space, and a spatio-temporal extension of the cortical graph that links each vertex to itself at the previous and next time sample (linear index vertex*nTimes+time). The output is always a symmetric sparse integer matrix consumed unchanged by STSLIB::StatsCluster.
Reference: Maris & Oostenveld (2007), J. Neurosci. Methods 164(1).
Definition in file sts_adjacency.h.