64 using namespace CONNECTIVITYLIB;
65 using namespace Eigen;
66 using namespace UTILSLIB;
78 : m_sConnectivityMethod(sConnectivityMethod)
79 , m_minMaxFullWeights(QPair<double,double>(
std::numeric_limits<double>::max(),0.0))
80 , m_minMaxThresholdedWeights(QPair<double,double>(
std::numeric_limits<double>::max(),0.0))
81 , m_dThreshold(dThreshold)
84 , m_iNumberFreqBins(0)
86 qRegisterMetaType<CONNECTIVITYLIB::Network>(
"CONNECTIVITYLIB::Network");
87 qRegisterMetaType<CONNECTIVITYLIB::Network::SPtr>(
"CONNECTIVITYLIB::Network::SPtr");
88 qRegisterMetaType<QList<CONNECTIVITYLIB::Network> >(
"QList<CONNECTIVITYLIB::Network>");
89 qRegisterMetaType<QList<CONNECTIVITYLIB::Network::SPtr> >(
"QList<CONNECTIVITYLIB::Network::SPtr>");
103 if(row < matDist.rows() && col < matDist.cols()) {
106 if(bGetMirroredVersion) {
127 if(row < matDist.rows() && col < matDist.cols()) {
130 if(bGetMirroredVersion) {
172 qint16 distribution = 0;
174 for(
int i = 0; i <
m_lNodes.size(); ++i) {
175 distribution +=
m_lNodes.at(i)->getFullDegree();
185 qint16 distribution = 0;
187 for(
int i = 0; i <
m_lNodes.size(); ++i) {
188 distribution +=
m_lNodes.at(i)->getThresholdedDegree();
227 int minDegree = 1000000;
229 for(
int i = 0; i <
m_lNodes.size(); ++i) {
230 if(
m_lNodes.at(i)->getFullDegree() > maxDegree){
231 maxDegree =
m_lNodes.at(i)->getFullDegree();
232 }
else if (
m_lNodes.at(i)->getFullDegree() < minDegree){
233 minDegree =
m_lNodes.at(i)->getFullDegree();
237 return QPair<int,int>(minDegree,maxDegree);
245 int minDegree = 1000000;
247 for(
int i = 0; i <
m_lNodes.size(); ++i) {
248 if(
m_lNodes.at(i)->getThresholdedDegree() > maxDegree){
249 maxDegree =
m_lNodes.at(i)->getThresholdedDegree();
250 }
else if (
m_lNodes.at(i)->getThresholdedDegree() < minDegree){
251 minDegree =
m_lNodes.at(i)->getThresholdedDegree();
255 return QPair<int,int>(minDegree,maxDegree);
263 int minDegree = 1000000;
265 for(
int i = 0; i <
m_lNodes.size(); ++i) {
266 if(
m_lNodes.at(i)->getFullIndegree() > maxDegree){
267 maxDegree =
m_lNodes.at(i)->getFullIndegree();
268 }
else if (
m_lNodes.at(i)->getFullIndegree() < minDegree){
269 minDegree =
m_lNodes.at(i)->getFullIndegree();
273 return QPair<int,int>(minDegree,maxDegree);
281 int minDegree = 1000000;
283 for(
int i = 0; i <
m_lNodes.size(); ++i) {
284 if(
m_lNodes.at(i)->getThresholdedIndegree() > maxDegree){
285 maxDegree =
m_lNodes.at(i)->getThresholdedIndegree();
286 }
else if (
m_lNodes.at(i)->getThresholdedIndegree() < minDegree){
287 minDegree =
m_lNodes.at(i)->getThresholdedIndegree();
291 return QPair<int,int>(minDegree,maxDegree);
299 int minDegree = 1000000;
301 for(
int i = 0; i <
m_lNodes.size(); ++i) {
302 if(
m_lNodes.at(i)->getFullOutdegree() > maxDegree){
303 maxDegree =
m_lNodes.at(i)->getFullOutdegree();
304 }
else if (
m_lNodes.at(i)->getFullOutdegree() < minDegree){
305 minDegree =
m_lNodes.at(i)->getFullOutdegree();
309 return QPair<int,int>(minDegree,maxDegree);
317 int minDegree = 1000000;
319 for(
int i = 0; i <
m_lNodes.size(); ++i) {
320 if(
m_lNodes.at(i)->getThresholdedOutdegree() > maxDegree){
321 maxDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
322 }
else if (
m_lNodes.at(i)->getThresholdedOutdegree() < minDegree){
323 minDegree =
m_lNodes.at(i)->getThresholdedOutdegree();
327 return QPair<int,int>(minDegree,maxDegree);
361 if(fLowerFreq > fUpperFreq || fUpperFreq < fLowerFreq) {
362 qDebug() <<
"Network::setFrequencyRange - Upper and lower frequency are out of range from each other. Weights will not be recalculated. Returning.";
367 qDebug() <<
"Network::setFrequencyRange - Sampling frequency has not been set. Returning.";
372 qDebug() <<
"Network::setFrequencyRange - Upper frequency is bigger than nyquist frequency. Returning.";
377 qDebug() <<
"Network::setFrequencyRange - Number of samples has not been set. Returning.";
386 int iLowerBin = fLowerFreq * dScaleFactor;
387 int iUpperBin = fUpperFreq * dScaleFactor;
393 m_lFullEdges.at(i)->setFrequencyBins(QPair<int,int>(iLowerBin,iUpperBin));
414 if(newEdge->getEndNodeID() != newEdge->getStartNodeID()) {
415 double dEdgeWeight = newEdge->getWeight();
454 qDebug() <<
"Network::normalize() - Max weight is 0. Returning.";