Implementation of the sensor- and source-space adjacency builders declared in sts_adjacency.h. More...
#include "sts_adjacency.h"#include <fiff/fiff_ch_info.h>#include <algorithm>#include <vector>#include <cmath>
Go to the source code of this file.
Implementation of the sensor- and source-space adjacency builders declared in sts_adjacency.h.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
The channel-position constructor extracts the r0 entries from FIFFLIB::FiffInfo, computes the per-channel nearest-neighbour distance and adds an edge whenever the pairwise Euclidean distance is within three times the median nearest-neighbour distance - the same heuristic MNE-Python uses for sensor-space cluster tests.
The source-space constructors walk the triangle list once, marking the three vertex pairs of each triangle as neighbours; the spatio-temporal variant additionally links every vertex to itself at t-1 and t+1 so cluster growth can span both cortex and time without the caller having to build a Kronecker product by hand.
Definition in file sts_adjacency.cpp.