Skip to main content

AbstractMetric

Namespace: CONNECTIVITYLIB  ·  Library: Connectivity Library

#include <connectivity/abstractmetric.h>

class CONNECTIVITYLIB::AbstractMetric

Static base for every estimator in CONNECTIVITYLIB.

Holds the two pieces of global state that the dispatcher (Connectivity::calculate) must set before any metric runs:

  • CONNECTIVITYLIB::AbstractMetric::m_bStorageModeIsActive "m_bStorageModeIsActive" enables caching of per-trial tapered spectra and CSDs in ConnectivitySettings::IntermediateTrialData, which lets a second metric reuse the FFT work done by the first.
  • CONNECTIVITYLIB::AbstractMetric::m_iNumberBinStart "m_iNumberBinStart" and CONNECTIVITYLIB::AbstractMetric::m_iNumberBinAmount "m_iNumberBinAmount" define the frequency-bin window over which each metric averages its spectral output into the single scalar weight stored on each network edge.

Static control knobs (storage mode, frequency band) shared by all CONNECTIVITYLIB metrics.

src/examples/ex_connectivity_metrics/main.cpp
// Spectral metrics evaluate the bins [start, start + amount); -1 means the full half spectrum.
AbstractMetric::m_iNumberBinStart = -1;
AbstractMetric::m_iNumberBinAmount = -1;
AbstractMetric::m_bStorageModeIsActive = false;

Inheritance​


Public Methods​

AbstractMetric()​

Constructs a AbstractMetric object.


Example​

Used in examples​

ex_connectivity_performance​

Benchmark the run time of connectivity methods over channel and sample counts.

src/examples/ex_connectivity_performance/main.cpp, line 143
AbstractMetric::m_bStorageModeIsActive = iStorageModeActive;
AbstractMetric::m_iNumberBinStart = 8;
AbstractMetric::m_iNumberBinAmount = 4;

ex_connectivity​

Example of using the MNE-CPP Connectivity library.

src/examples/ex_connectivity/main.cpp, line 103
AbstractMetric::m_bStorageModeIsActive = false;
AbstractMetric::m_iNumberBinStart = 0;
AbstractMetric::m_iNumberBinAmount = 50;

ex_connectivity_metrics​

Connectivity metrics on synthetic data with a known coupling.

src/examples/ex_connectivity_metrics/main.cpp, line 159
// Spectral metrics evaluate the bins [start, start + amount); -1 means the full half spectrum.
AbstractMetric::m_iNumberBinStart = -1;
AbstractMetric::m_iNumberBinAmount = -1;
AbstractMetric::m_bStorageModeIsActive = false;

Also used in ex_connectivity_comparison.

Authors of this file​