v2.0.0
Loading...
Searching...
No Matches
inv_token.h File Reference

Token vocabulary, value-carrier struct and tokenisation options for the foundation-model serialisation of INVLIB::InvSourceEstimate. More...

#include <cstdint>
#include <vector>
Include dependency graph for inv_token.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  INVLIB::InvToken
 One element of a tokenised neural-source representation. More...
struct  INVLIB::InvTokenizeOptions
 Tokenization options controlling layer inclusion and sub-sampling. More...

Namespaces

namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).

Enumerations

enum class  INVLIB::InvTokenId : int32_t {
  INVLIB::Pad = 0 , INVLIB::Bos = 1 , INVLIB::Eos = 2 , INVLIB::Sep = 3 ,
  INVLIB::MetaBegin = 10 , INVLIB::MetaEnd = 11 , INVLIB::GridBegin = 20 , INVLIB::GridEnd = 21 ,
  INVLIB::GridRow = 22 , INVLIB::CouplingBegin = 30 , INVLIB::CouplingEnd = 31 , INVLIB::GroupBegin = 32 ,
  INVLIB::GroupEnd = 33 , INVLIB::FocalBegin = 40 , INVLIB::FocalEnd = 41 , INVLIB::DipoleBegin = 42 ,
  INVLIB::DipoleEnd = 43 , INVLIB::ConnBegin = 50 , INVLIB::ConnEnd = 51 , INVLIB::ConnEntryBegin = 52 ,
  INVLIB::ConnEntryEnd = 53 , INVLIB::PosBegin = 60 , INVLIB::PosEnd = 61 , INVLIB::MethodUnknown = 100 ,
  INVLIB::MethodMNE = 101 , INVLIB::MethodDSPM = 102 , INVLIB::MethodSLORETA = 103 , INVLIB::MethodELORETA = 104 ,
  INVLIB::MethodLCMV = 105 , INVLIB::MethodDICS = 106 , INVLIB::MethodSAM = 107 , INVLIB::MethodMixedNorm = 108 ,
  INVLIB::MethodGammaMAP = 109 , INVLIB::MethodDipoleFit = 110 , INVLIB::MethodRapMusic = 111 , INVLIB::MethodPwlRapMusic = 112 ,
  INVLIB::SpaceUnknown = 150 , INVLIB::SpaceSurface = 151 , INVLIB::SpaceVolume = 152 , INVLIB::SpaceMixed = 153 ,
  INVLIB::SpaceDiscrete = 154 , INVLIB::OrientUnknown = 170 , INVLIB::OrientFixed = 171 , INVLIB::OrientFree = 172 ,
  INVLIB::OrientLoose = 173 , INVLIB::Amplitude = 200 , INVLIB::Vertex = 201 , INVLIB::TimeVal = 202 ,
  INVLIB::FreqVal = 203 , INVLIB::PosX = 204 , INVLIB::PosY = 205 , INVLIB::PosZ = 206 ,
  INVLIB::MomX = 207 , INVLIB::MomY = 208 , INVLIB::MomZ = 209 , INVLIB::Goodness = 210 ,
  INVLIB::ChiSquared = 211 , INVLIB::Correlation = 212 , INVLIB::ConnValue = 213 , INVLIB::GridIndex = 214 ,
  INVLIB::ValidTrue = 250 , INVLIB::ValidFalse = 251 , INVLIB::DirectedTrue = 252 , INVLIB::DirectedFalse = 253 ,
  INVLIB::NSources = 280 , INVLIB::NTimes = 281 , INVLIB::NGroups = 282 , INVLIB::NDipoles = 283 ,
  INVLIB::NMeasures = 284 , INVLIB::NIndices = 285 , INVLIB::NFreeDof = 286 , INVLIB::TStep = 287 ,
  INVLIB::MeasCoh = 300 , INVLIB::MeasImCoh = 301 , INVLIB::MeasPlv = 302 , INVLIB::MeasPli = 303 ,
  INVLIB::MeasWpli = 304 , INVLIB::MeasGranger = 305 , INVLIB::MeasPdc = 306 , INVLIB::MeasDtf = 307 ,
  INVLIB::MeasCorrelation = 308 , INVLIB::MeasCrossCorr = 309 , INVLIB::MeasOther = 310 , INVLIB::QuantBinBase = 1000
}

Functions

std::vector< int32_t > INVLIB::tokenIds (const std::vector< InvToken > &tokens)
std::vector< float > INVLIB::tokenValues (const std::vector< InvToken > &tokens)

Detailed Description

Token vocabulary, value-carrier struct and tokenisation options for the foundation-model serialisation of INVLIB::InvSourceEstimate.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.0.0
Date
March 2026

Defines INVLIB::InvTokenId — the integer vocabulary used by the tokeniser in inv_source_estimate_token.h — organised into stable ID ranges for special markers, section brackets, method / source-space / orientation labels, value-carrier tokens (amplitude, vertex, position, time, correlation, ...), booleans, dimension sizes, connectivity-measure names and a reserved block for external quantisation bins. Also exposes the InvToken value type (id + continuous value) and the InvTokenizeOptions knobs that control which layers are emitted and whether dense grids are sub-sampled to fit a transformer's context window.

Definition in file inv_token.h.