MNE-CPP  0.1.9
A Framework for Electrophysiology
Public Types | Public Member Functions | Protected Attributes | List of all members
CONNECTIVITYLIB::Network Class Reference

This class holds information about a network, can compute a distance table and provide network metrics. 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

This class holds information about a network, can compute a distance table and provide network metrics.

This class holds information (nodes and connecting edges) about a network, can compute a distance table and provide network metrics.

Definition at line 88 of file network.h.

Member Typedef Documentation

◆ ConstSPtr

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

Const shared pointer type for Network.

Definition at line 93 of file network.h.

◆ SPtr

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

Shared pointer type for Network.

Definition at line 92 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 76 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 203 of file network.cpp.

◆ getEdgeAt()

QSharedPointer<NetworkEdge> CONNECTIVITYLIB::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.

◆ 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 520 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 405 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 94 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 170 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 142 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 224 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 260 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 296 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 210 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 242 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 278 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 314 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 217 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 163 of file network.cpp.

◆ getNodes()

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

Returns the nodes.

Returns
Returns the network nodes.

Definition at line 156 of file network.cpp.

◆ getSamplingFrequency()

float Network::getSamplingFrequency ( ) const

Get the currently set sampling frequency.

Returns
The currently set sampling frequency.

Definition at line 485 of file network.cpp.

◆ getThreshold()

double Network::getThreshold ( )

Returns the current threshold of the network.

Returns
The current threshold.

Definition at line 352 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 118 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 183 of file network.cpp.

◆ getThresholdedEdges()

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

Returns the thresholded edges.

Returns
Returns the network edges.

Definition at line 149 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 499 of file network.cpp.

◆ getVisualizationInfo()

VisualizationInfo Network::getVisualizationInfo ( ) const

Get the current visualization info.

Returns
The current visualization info.

Definition at line 471 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 439 of file network.cpp.

◆ normalize()

void Network::normalize ( )

Normalize the network.

Definition at line 450 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 196 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 513 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 359 of file network.cpp.

◆ setSamplingFrequency()

void Network::setSamplingFrequency ( float  fSFreq)

Set the new sampling frequency.

Parameters
[in]sFreqThe new sampling frequency.

Definition at line 492 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 332 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 506 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 478 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 410 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 411 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 413 of file network.h.

◆ m_iNumberFreqBins

int CONNECTIVITYLIB::Network::m_iNumberFreqBins
protected

The number of used frequency bins.

Definition at line 412 of file network.h.

◆ m_lFullEdges

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

List with all edges of the network.

Definition at line 397 of file network.h.

◆ m_lNodes

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

List with all nodes of the network.

Definition at line 400 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 398 of file network.h.

◆ m_matDistMatrix

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

The distance matrix.

Definition at line 402 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 408 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 406 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 407 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 404 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 415 of file network.h.


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