86 qRegisterMetaType<CONNLIB::Network>(
"CONNLIB::Network");
87 qRegisterMetaType<CONNLIB::Network::SPtr>(
"CONNLIB::Network::SPtr");
88 qRegisterMetaType<QList<CONNLIB::Network> >(
"QList<CONNLIB::Network>");
89 qRegisterMetaType<QList<CONNLIB::Network::SPtr> >(
"QList<CONNLIB::Network::SPtr>");
103 if(row < matDist.rows() && col < matDist.cols()) {
106 if(bGetMirroredVersion) {
127 if(row < matDist.rows() && col < matDist.cols()) {
130 if(bGetMirroredVersion) {
179 qint16 distribution = 0;
181 for(
int i = 0; i <
m_lNodes.size(); ++i) {
182 distribution +=
m_lNodes.at(i)->getFullDegree();
192 qint16 distribution = 0;
194 for(
int i = 0; i <
m_lNodes.size(); ++i) {
195 distribution +=
m_lNodes.at(i)->getThresholdedDegree();
234 int minDegree = 1000000;
236 for(
int i = 0; i <
m_lNodes.size(); ++i) {
237 if(
m_lNodes.at(i)->getFullDegree() > maxDegree){
238 maxDegree =
m_lNodes.at(i)->getFullDegree();
239 }
else if (
m_lNodes.at(i)->getFullDegree() < minDegree){
240 minDegree =
m_lNodes.at(i)->getFullDegree();
244 return QPair<int,int>(minDegree,maxDegree);
252 int minDegree = 1000000;
254 for(
int i = 0; i <
m_lNodes.size(); ++i) {
255 if(
m_lNodes.at(i)->getThresholdedDegree() > maxDegree){
256 maxDegree =
m_lNodes.at(i)->getThresholdedDegree();
257 }
else if (
m_lNodes.at(i)->getThresholdedDegree() < minDegree){
258 minDegree =
m_lNodes.at(i)->getThresholdedDegree();
262 return QPair<int,int>(minDegree,maxDegree);
270 int minDegree = 1000000;
272 for(
int i = 0; i <
m_lNodes.size(); ++i) {
273 if(
m_lNodes.at(i)->getFullIndegree() > maxDegree){
274 maxDegree =
m_lNodes.at(i)->getFullIndegree();
275 }
else if (
m_lNodes.at(i)->getFullIndegree() < minDegree){
276 minDegree =
m_lNodes.at(i)->getFullIndegree();
280 return QPair<int,int>(minDegree,maxDegree);
288 int minDegree = 1000000;
290 for(
int i = 0; i <
m_lNodes.size(); ++i) {
291 if(
m_lNodes.at(i)->getThresholdedIndegree() > maxDegree){
292 maxDegree =
m_lNodes.at(i)->getThresholdedIndegree();
293 }
else if (
m_lNodes.at(i)->getThresholdedIndegree() < minDegree){
294 minDegree =
m_lNodes.at(i)->getThresholdedIndegree();
298 return QPair<int,int>(minDegree,maxDegree);
306 int minDegree = 1000000;
308 for(
int i = 0; i <
m_lNodes.size(); ++i) {
309 if(
m_lNodes.at(i)->getFullOutdegree() > maxDegree){
310 maxDegree =
m_lNodes.at(i)->getFullOutdegree();
311 }
else if (
m_lNodes.at(i)->getFullOutdegree() < minDegree){
312 minDegree =
m_lNodes.at(i)->getFullOutdegree();
316 return QPair<int,int>(minDegree,maxDegree);
324 int minDegree = 1000000;
326 for(
int i = 0; i <
m_lNodes.size(); ++i) {
327 if(
m_lNodes.at(i)->getThresholdedOutdegree() > maxDegree){
328 maxDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
329 }
else if (
m_lNodes.at(i)->getThresholdedOutdegree() < minDegree){
330 minDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
334 return QPair<int,int>(minDegree,maxDegree);
368 if(fLowerFreq > fUpperFreq || fUpperFreq < fLowerFreq) {
369 qDebug() <<
"Network::setFrequencyRange - Upper and lower frequency are out of range from each other. Weights will not be recalculated. Returning.";
374 qDebug() <<
"Network::setFrequencyRange - Sampling frequency has not been set. Returning.";
379 qDebug() <<
"Network::setFrequencyRange - Upper frequency is bigger than nyquist frequency. Returning.";
384 qDebug() <<
"Network::setFrequencyRange - Number of samples has not been set. Returning.";
393 int iLowerBin = fLowerFreq * dScaleFactor;
394 int iUpperBin = fUpperFreq * dScaleFactor;
400 m_lFullEdges.at(i)->setFrequencyBins(QPair<int,int>(iLowerBin,iUpperBin));
421 if(newEdge->getEndNodeID() != newEdge->getStartNodeID()) {
422 double dEdgeWeight = newEdge->getWeight();
461 qDebug() <<
"Network::normalize() - Max weight is 0. Returning.";
Declaration of Spectral class.
NetworkNode class declaration.
NetworkEdge class declaration.
Network class declaration.
Functional connectivity metrics (coherence, PLV, cross-correlation, etc.).
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Holds threshold and color settings for network edge visualization.
VisualizationInfo getVisualizationInfo() const
void setVisualizationInfo(const VisualizationInfo &visualizationInfo)
void append(QSharedPointer< NetworkEdge > newEdge)
int getUsedFreqBins() const
qint16 getThresholdedDistribution() const
void setUsedFreqBins(int iNumberFreqBins)
void setConnectivityMethod(const QString &sConnectivityMethod)
QSharedPointer< NetworkEdge > getEdgeAt(int i)
QPair< double, double > m_minMaxThresholdedWeights
QPair< int, int > getMinMaxFullDegrees() const
Eigen::MatrixXd getThresholdedConnectivityMatrix(bool bGetMirroredVersion=true) const
QPair< double, double > getMinMaxThresholdedWeights() const
void setFFTSize(int iFFTSize)
QPair< double, double > getMinMaxFullWeights() const
QList< QSharedPointer< NetworkEdge > > m_lThresholdedEdges
QPair< int, int > getMinMaxFullIndegrees() const
Network(const QString &sConnectivityMethod="Unknown", double dThreshold=0.0)
void setSamplingFrequency(float fSFreq)
const QPair< float, float > & getFrequencyRange() const
void setThreshold(double dThreshold=0.0)
QString getConnectivityMethod() const
Eigen::MatrixXd getFullConnectivityMatrix(bool bGetMirroredVersion=true) const
QList< QSharedPointer< NetworkNode > > m_lNodes
QPair< int, int > getMinMaxThresholdedDegrees() const
QSharedPointer< NetworkNode > getNodeAt(int i)
QPair< double, double > m_minMaxFullWeights
const QList< QSharedPointer< NetworkNode > > & getNodes() const
QPair< int, int > getMinMaxThresholdedIndegrees() const
float getSamplingFrequency() const
void setFrequencyRange(float fLowerFreq, float fUpperFreq)
QPair< int, int > getMinMaxFullOutdegrees() const
QPair< float, float > m_minMaxFrequency
const QList< QSharedPointer< NetworkEdge > > & getThresholdedEdges() const
QString m_sConnectivityMethod
const QList< QSharedPointer< NetworkEdge > > & getFullEdges() const
VisualizationInfo m_visualizationInfo
QPair< int, int > getMinMaxThresholdedOutdegrees() const
qint16 getFullDistribution() const
QList< QSharedPointer< NetworkEdge > > m_lFullEdges
QSharedPointer< NetworkEdge > SPtr
QSharedPointer< NetworkNode > SPtr