v2.0.0
Loading...
Searching...
No Matches
CONNECTIVITYLIB::Network Class Reference

Graph container for one connectivity metric; nodes + weighted edges + threshold/visualisation state. More...

#include <network.h>

Public Types

typedef QSharedPointer< NetworkSPtr
typedef QSharedPointer< const NetworkConstSPtr

Public Member Functions

 Network (const QString &sConnectivityMethod="Unknown", double dThreshold=0.0)
Eigen::MatrixXd getFullConnectivityMatrix (bool bGetMirroredVersion=true) const
Eigen::MatrixXd getThresholdedConnectivityMatrix (bool bGetMirroredVersion=true) const
const QList< QSharedPointer< NetworkEdge > > & getFullEdges () const
const QList< QSharedPointer< NetworkEdge > > & getThresholdedEdges () const
const QList< QSharedPointer< NetworkNode > > & getNodes () const
QSharedPointer< NetworkEdgegetEdgeAt (int i)
QSharedPointer< NetworkNodegetNodeAt (int i)
qint16 getFullDistribution () const
qint16 getThresholdedDistribution () const
void setConnectivityMethod (const QString &sConnectivityMethod)
QString getConnectivityMethod () const
QPair< double, double > getMinMaxFullWeights () const
QPair< double, double > getMinMaxThresholdedWeights () const
QPair< int, int > getMinMaxFullDegrees () const
QPair< int, int > getMinMaxThresholdedDegrees () const
QPair< int, int > getMinMaxFullIndegrees () const
QPair< int, int > getMinMaxThresholdedIndegrees () const
QPair< int, int > getMinMaxFullOutdegrees () const
QPair< int, int > getMinMaxThresholdedOutdegrees () const
void setThreshold (double dThreshold=0.0)
double getThreshold ()
void setFrequencyRange (float fLowerFreq, float fUpperFreq)
const QPair< float, float > & getFrequencyRange () const
void append (QSharedPointer< NetworkEdge > newEdge)
void append (QSharedPointer< NetworkNode > newNode)
bool isEmpty () const
void normalize ()
VisualizationInfo getVisualizationInfo () const
void setVisualizationInfo (const VisualizationInfo &visualizationInfo)
float getSamplingFrequency () const
void setSamplingFrequency (float fSFreq)
int getUsedFreqBins () const
void setUsedFreqBins (int iNumberFreqBins)
void setFFTSize (int iFFTSize)
int getFFTSize ()

Protected Attributes

QList< QSharedPointer< NetworkEdge > > m_lFullEdges
QList< QSharedPointer< NetworkEdge > > m_lThresholdedEdges
QList< QSharedPointer< NetworkNode > > m_lNodes
Eigen::MatrixXd m_matDistMatrix
QString m_sConnectivityMethod
QPair< double, double > m_minMaxFullWeights
QPair< double, double > m_minMaxThresholdedWeights
QPair< float, float > m_minMaxFrequency
double m_dThreshold
float m_fSFreq
int m_iNumberFreqBins
int m_iFFTSize
VisualizationInfo m_visualizationInfo

Detailed Description

Graph container for one connectivity metric; nodes + weighted edges + threshold/visualisation state.

Graph container for one functional-connectivity result.

Holds the NetworkNode list (channel / source positions) and the NetworkEdge list (per-frequency weight matrices + scalar band- averaged weights). Provides full and thresholded views of both edges and the corresponding adjacency matrix, the metric name ("COH", "PLI", "GC", ...) and threshold currently in effect, and the VisualizationInfo block read by the disp3D rendering layer.

Definition at line 97 of file network.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const Network> CONNECTIVITYLIB::Network::ConstSPtr

Const shared pointer type for Network.

Definition at line 102 of file network.h.

◆ SPtr

typedef QSharedPointer<Network> CONNECTIVITYLIB::Network::SPtr

Shared pointer type for Network.

Definition at line 101 of file network.h.

Constructor & Destructor Documentation

◆ Network()

Network::Network ( const QString & sConnectivityMethod = "Unknown",
double dThreshold = 0.0 )
explicit

Constructs a Network object.

Parameters
[in]sConnectivityMethodThe connectivity measure method used to create the data of this network structure.
[in]dThresholdThe threshold of the network. Default is 0.0.

Definition at line 56 of file network.cpp.

Member Function Documentation

◆ append() [1/2]

void CONNECTIVITYLIB::Network::append ( QSharedPointer< NetworkEdge > newEdge)

Appends a network edge to this network node.

Parameters
[in]newEdgeThe new edge item.

◆ append() [2/2]

void CONNECTIVITYLIB::Network::append ( QSharedPointer< NetworkNode > newNode)

Appends a network edge to this network node.

Parameters
[in]newNodeThe new node item as a reference.

◆ getConnectivityMethod()

QString Network::getConnectivityMethod ( ) const

Returns the connectivity measure method used to create the data of this network structure.

Returns
The connectivity measure method used to create the data of this network structure.

Definition at line 190 of file network.cpp.

◆ getEdgeAt()

NetworkEdge::SPtr Network::getEdgeAt ( int i)

Returns the edge at a specific position.

Parameters
[in]iThe index to look up the edge. i must be a valid index position in the network list (i.e., 0 <= i < size()).
Returns
Returns the network edge.

Definition at line 150 of file network.cpp.

◆ getFFTSize()

int Network::getFFTSize ( )

Returns the current FFT size.

Returns
The used FFT size (number of total frequency bins for a half spectrum - only positive frequencies).

Definition at line 507 of file network.cpp.

◆ getFrequencyRange()

const QPair< float, float > & Network::getFrequencyRange ( ) const

Returns the current frequency edge to average from/to.

Returns
The current upper/lower frequency edge to average from/to.

Definition at line 392 of file network.cpp.

◆ getFullConnectivityMatrix()

MatrixXd Network::getFullConnectivityMatrix ( bool bGetMirroredVersion = true) const

Returns the full connectivity matrix for this network structure.

Parameters
[in]bGetMirroredVersionFlag whether to return the mirrored version of the connectivity matrix, if the network. is a non-directional one. Otherwise returns zeros for the lower part of the matrix. Default is set to true.
Returns
The full connectivity matrix generated from the current network information.

Definition at line 74 of file network.cpp.

◆ getFullDistribution()

qint16 Network::getFullDistribution ( ) const

Returns network distribution, also known as network degree, corresponding to the full network.

Returns
The network distribution calculated as degrees of all nodes together.

Definition at line 157 of file network.cpp.

◆ getFullEdges()

const QList< NetworkEdge::SPtr > & Network::getFullEdges ( ) const

Returns the full and non thresholded edges.

Returns
Returns the network edges.

Definition at line 122 of file network.cpp.

◆ getMinMaxFullDegrees()

QPair< int, int > Network::getMinMaxFullDegrees ( ) const

Returns the minimum and maximum degree (in and out) corresponding to the full network.

Returns
The minimum and maximum degree of the entire network.

Definition at line 211 of file network.cpp.

◆ getMinMaxFullIndegrees()

QPair< int, int > Network::getMinMaxFullIndegrees ( ) const

Returns the minimum and maximum indegree corresponding to the full network.

Returns
The minimum and maximum indegree of the entire network.

Definition at line 247 of file network.cpp.

◆ getMinMaxFullOutdegrees()

QPair< int, int > Network::getMinMaxFullOutdegrees ( ) const

Returns the minimum and maximum outdegree corresponding to the full network.

Returns
The minimum and maximum outdegree of the entire network.

Definition at line 283 of file network.cpp.

◆ getMinMaxFullWeights()

QPair< double, double > Network::getMinMaxFullWeights ( ) const

Returns the minimum and maximum weight strength of the entire network.

Returns
The minimum and maximum weight strength of the entire network.

Definition at line 197 of file network.cpp.

◆ getMinMaxThresholdedDegrees()

QPair< int, int > Network::getMinMaxThresholdedDegrees ( ) const

Returns the minimum and maximum degree (in and out) corresponding to the thresholded network.

Returns
The minimum and maximum degree of the entire network.

Definition at line 229 of file network.cpp.

◆ getMinMaxThresholdedIndegrees()

QPair< int, int > Network::getMinMaxThresholdedIndegrees ( ) const

Returns the minimum and maximum indegree corresponding to the thresholded network.

Returns
The minimum and maximum indegree of the entire network.

Definition at line 265 of file network.cpp.

◆ getMinMaxThresholdedOutdegrees()

QPair< int, int > Network::getMinMaxThresholdedOutdegrees ( ) const

Returns the minimum and maximum outdegree corresponding to the thresholded network.

Returns
The minimum and maximum outdegree of the entire network.

Definition at line 301 of file network.cpp.

◆ getMinMaxThresholdedWeights()

QPair< double, double > Network::getMinMaxThresholdedWeights ( ) const

Returns the minimum and maximum weight strength of the thresholded network.

Returns
The minimum and maximum weight strength of the entire network.

Definition at line 204 of file network.cpp.

◆ getNodeAt()

NetworkNode::SPtr Network::getNodeAt ( int i)

Returns the node at a specific position.

Parameters
[in]iThe index to look up the node. i must be a valid index position in the network list (i.e., 0 <= i < size()).
Returns
Returns the network node.

Definition at line 143 of file network.cpp.

◆ getNodes()

const QList< NetworkNode::SPtr > & Network::getNodes ( ) const

Returns the nodes.

Returns
Returns the network nodes.

Definition at line 136 of file network.cpp.

◆ getSamplingFrequency()

float Network::getSamplingFrequency ( ) const

Get the currently set sampling frequency.

Returns
The currently set sampling frequency.

Definition at line 472 of file network.cpp.

◆ getThreshold()

double Network::getThreshold ( )

Returns the current threshold of the network.

Returns
The current threshold.

Definition at line 339 of file network.cpp.

◆ getThresholdedConnectivityMatrix()

MatrixXd Network::getThresholdedConnectivityMatrix ( bool bGetMirroredVersion = true) const

Returns the thresholded connectivity matrix for this network structure.

Parameters
[in]bGetMirroredVersionFlag whether to return the mirrored version of the connectivity matrix, if the network. is a non-directional one. Otherwise returns zeros for the lower part of the matrix. Default is set to true.
Returns
The thresholded connectivity matrix generated from the current network information.

Definition at line 98 of file network.cpp.

◆ getThresholdedDistribution()

qint16 Network::getThresholdedDistribution ( ) const

Returns network distribution, also known as network degree, corresponding to the thresholded network.

Returns
The network distribution calculated as degrees of all nodes together.

Definition at line 170 of file network.cpp.

◆ getThresholdedEdges()

const QList< NetworkEdge::SPtr > & Network::getThresholdedEdges ( ) const

Returns the thresholded edges.

Returns
Returns the network edges.

Definition at line 129 of file network.cpp.

◆ getUsedFreqBins()

int Network::getUsedFreqBins ( ) const

Get the currently set number of frequency bins.

Returns
The currently set number of samples.

Definition at line 486 of file network.cpp.

◆ getVisualizationInfo()

VisualizationInfo Network::getVisualizationInfo ( ) const

Get the current visualization info.

Returns
The current visualization info.

Definition at line 458 of file network.cpp.

◆ isEmpty()

bool Network::isEmpty ( ) const

Returns whether the Network is empty by checking the number of nodes and edges.

Returns
The flag identifying whether the Network is empty.

Definition at line 426 of file network.cpp.

◆ normalize()

void Network::normalize ( )

Normalize the network.

Definition at line 437 of file network.cpp.

◆ setConnectivityMethod()

void Network::setConnectivityMethod ( const QString & sConnectivityMethod)

Sets the connectivity measure method used to create the data of this network structure.

Parameters
[in]sConnectivityMethodThe connectivity measure method used to create the data of this network structure.

Definition at line 183 of file network.cpp.

◆ setFFTSize()

void Network::setFFTSize ( int iFFTSize)

Set the new FFT size.

Parameters
[in]iFFTSizeThe used FFT size (number of total frequency bins for a half spectrum - only positive frequencies).

Definition at line 500 of file network.cpp.

◆ setFrequencyRange()

void Network::setFrequencyRange ( float fLowerFreq,
float fUpperFreq )

Sets the frequency range to average from/to.

Parameters
[in]fLowerFreqThe new lower frequency edge to average from.
[in]fUpperFreqThe new upper frequency edge to average to.

Definition at line 346 of file network.cpp.

◆ setSamplingFrequency()

void Network::setSamplingFrequency ( float fSFreq)

Set the new sampling frequency.

Parameters
[in]sFreqThe new sampling frequency.

Definition at line 479 of file network.cpp.

◆ setThreshold()

void Network::setThreshold ( double dThreshold = 0.0)

Sets the threshold of the network and updates the resulting active edges.

Parameters
[in]dThresholdThe new threshold.

Definition at line 319 of file network.cpp.

◆ setUsedFreqBins()

void Network::setUsedFreqBins ( int iNumberFreqBins)

Set the new number of used frequency bins.

Parameters
[in]iNumberFreqBinsThe new number of used frequency bins.

Definition at line 493 of file network.cpp.

◆ setVisualizationInfo()

void Network::setVisualizationInfo ( const VisualizationInfo & visualizationInfo)

Set the current visualization info.

Parameters
[in]visualizationInfoThe new visualization info.

Definition at line 465 of file network.cpp.

Member Data Documentation

◆ m_dThreshold

double CONNECTIVITYLIB::Network::m_dThreshold
protected

The current value which was used to threshold the edge weigths.

Definition at line 419 of file network.h.

◆ m_fSFreq

float CONNECTIVITYLIB::Network::m_fSFreq
protected

The sampling frequency used to collect the data which this network is based on.

Definition at line 420 of file network.h.

◆ m_iFFTSize

int CONNECTIVITYLIB::Network::m_iFFTSize
protected

The used FFT size (number of total frequency bins for a half spectrum - only positive frequencies).

Definition at line 422 of file network.h.

◆ m_iNumberFreqBins

int CONNECTIVITYLIB::Network::m_iNumberFreqBins
protected

The number of used frequency bins.

Definition at line 421 of file network.h.

◆ m_lFullEdges

QList<QSharedPointer<NetworkEdge> > CONNECTIVITYLIB::Network::m_lFullEdges
protected

List with all edges of the network.

Definition at line 406 of file network.h.

◆ m_lNodes

QList<QSharedPointer<NetworkNode> > CONNECTIVITYLIB::Network::m_lNodes
protected

List with all nodes of the network.

Definition at line 409 of file network.h.

◆ m_lThresholdedEdges

QList<QSharedPointer<NetworkEdge> > CONNECTIVITYLIB::Network::m_lThresholdedEdges
protected

List with all the active (thresholded) edges of the network.

Definition at line 407 of file network.h.

◆ m_matDistMatrix

Eigen::MatrixXd CONNECTIVITYLIB::Network::m_matDistMatrix
protected

The distance matrix.

Definition at line 411 of file network.h.

◆ m_minMaxFrequency

QPair<float,float> CONNECTIVITYLIB::Network::m_minMaxFrequency
protected

The minimum and maximum frequency bins to average from/to.

Definition at line 417 of file network.h.

◆ m_minMaxFullWeights

QPair<double,double> CONNECTIVITYLIB::Network::m_minMaxFullWeights
protected

The minimum and maximum weight strength of the entire network.

Definition at line 415 of file network.h.

◆ m_minMaxThresholdedWeights

QPair<double,double> CONNECTIVITYLIB::Network::m_minMaxThresholdedWeights
protected

The minimum and maximum weight strength of the active edges.

Definition at line 416 of file network.h.

◆ m_sConnectivityMethod

QString CONNECTIVITYLIB::Network::m_sConnectivityMethod
protected

The connectivity measure method used to create the data of this network structure.

Definition at line 413 of file network.h.

◆ m_visualizationInfo

VisualizationInfo CONNECTIVITYLIB::Network::m_visualizationInfo
protected

The current visualization info used to plot the network later on.

Definition at line 424 of file network.h.


The documentation for this class was generated from the following files: