Builds the sparse spatial and spatio-temporal neighbourhood graphs that define cluster support for permutation tests. More...
#include <sts_adjacency.h>
Static Public Member Functions | |
| static Eigen::SparseMatrix< int > | fromChannelPositions (const FIFFLIB::FiffInfo &info, const QStringList &picks=QStringList()) |
| static Eigen::SparseMatrix< int > | fromSourceSpace (const Eigen::MatrixX3i &tris, int nVertices) |
| static Eigen::SparseMatrix< int > | fromSourceSpaceTemporal (const Eigen::MatrixX3i &tris, int nVertices, int nTimes) |
| static Eigen::SparseMatrix< int > | chain (int n) |
| static Eigen::SparseMatrix< int > | combine (const QList< Eigen::SparseMatrix< int > > &dims) |
Builds the sparse spatial and spatio-temporal neighbourhood graphs that define cluster support for permutation tests.
Adjacency matrix construction for spatial clustering.
Definition at line 75 of file sts_adjacency.h.
|
static |
Adjacency of a regular 1-D grid of n points (each linked to its two neighbours), the meaning of an integer dimension in mne.stats.combine_adjacency.
| [in] | n | Number of points. |
Definition at line 47 of file sts_adjacency.cpp.
|
static |
Combine the adjacency of several dimensions, as mne.stats.combine_adjacency: points are flattened in C order (the last dimension varies fastest), two points are adjacent when they differ in one dimension and are adjacent there, and every point is adjacent to itself.
| [in] | dims | Square 0/1 adjacency per dimension (diagonals are ignored). |
Definition at line 62 of file sts_adjacency.cpp.
|
static |
Build a spatial adjacency matrix from channel positions in FiffInfo. Uses a distance threshold of 3x the median nearest-neighbor distance.
| [in] | info | FiffInfo with channel positions. |
| [in] | picks | Optional list of channel names to include. If empty, all channels are used. |
Definition at line 101 of file sts_adjacency.cpp.
|
static |
Build a spatial adjacency matrix from a triangulated source space.
| [in] | tris | Triangle definitions (nTris x 3, vertex indices). |
| [in] | nVertices | Total number of vertices. |
Definition at line 177 of file sts_adjacency.cpp.
|
static |
Build a spatio-temporal adjacency matrix from a triangulated source space.
Constructs a (nVertices*nTimes) x (nVertices*nTimes) adjacency matrix where spatial neighbors come from the triangle mesh and temporal neighbors connect each vertex to itself at t-1 and t+1. The linear index is vertex * nTimes + time.
| [in] | tris | Triangle definitions (nTris x 3, vertex indices). |
| [in] | nVertices | Total number of vertices. |
| [in] | nTimes | Number of time points. |
Definition at line 202 of file sts_adjacency.cpp.