graph.h
Go to the documentation of this file.
1 /***************************************************************************
2  SocNetV: Social Network Visualizer
3  version: 2.5
4  Written in Qt
5 
6  graph.h - description
7  -------------------
8  copyright : (C) 2005-2018 by Dimitris B. Kalamaras
9  project site : http://socnetv.org
10 
11  ***************************************************************************/
12 
13 /*******************************************************************************
14 * This program is free software: you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation, either version 3 of the License, or *
17 * (at your option) any later version. *
18 * *
19 * This program is distributed in the hope that it will be useful, *
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22 * GNU General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU General Public License *
25 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
26 ********************************************************************************/
27 
28 #ifndef GRAPH_H
29 #define GRAPH_H
30 
31 
32 #include <QObject>
33 #include <QDateTime> // used in exporting centrality files
34 #include <QList>
35 #include <QHash>
36 #include <QTextStream>
37 #include <QThread>
38 //FYI: stack is a wrapper around <deque> in C++, see: www.cplusplus.com/reference/stl/stack
39 #include <stack>
40 #include <map>
41 
42 #include "graphvertex.h"
43 #include "matrix.h"
44 #include "parser.h"
45 #include "webcrawler.h"
46 
47 using namespace std;
48 
49 static const int EDGE_DIRECTED = 0;
50 static const int EDGE_RECIPROCATED = 1;
51 static const int EDGE_UNDIRECTED = 2;
52 
53 
54 static const int FILE_GRAPHML = 1; // .GRAPHML .XML
55 static const int FILE_PAJEK = 2; // .PAJ .NET
56 static const int FILE_ADJACENCY = 3; // .ADJ .CSV .SM
57 static const int FILE_GRAPHVIZ = 4; // .DOT
58 static const int FILE_UCINET = 5; // .DL .DAT
59 static const int FILE_GML = 6; // .GML
60 static const int FILE_EDGELIST_WEIGHTED = 7; // .CSV, .TXT, .LIST, LST, WLST
61 static const int FILE_EDGELIST_SIMPLE = 8; // .CSV, .TXT, .LIST, LST
62 static const int FILE_TWOMODE = 9; // .2SM .AFF
63 static const int FILE_UNRECOGNIZED =-1; // UNRECOGNIZED FILE FORMAT
64 
65 static const int INDEX_DC = 1;
66 static const int INDEX_CC = 2;
67 static const int INDEX_IRCC = 3;
68 static const int INDEX_BC = 4;
69 static const int INDEX_SC = 5;
70 static const int INDEX_EC = 6;
71 static const int INDEX_PC = 7;
72 static const int INDEX_IC = 8;
73 static const int INDEX_EVC = 9;
74 static const int INDEX_DP = 10;
75 static const int INDEX_PRP = 11;
76 static const int INDEX_PP = 12;
77 
78 static const int GRAPH_CHANGED_NONE = 0;
79 static const int GRAPH_CHANGED_MINOR_OPTIONS = 1;
80 static const int GRAPH_CHANGED_VERTICES_METADATA = 2;
81 static const int GRAPH_CHANGED_EDGES_METADATA = 3;
82 static const int GRAPH_CHANGED_POSITIONS = 4;
83 static const int GRAPH_CHANGED_VERTICES = 11;
84 static const int GRAPH_CHANGED_EDGES = 12;
85 static const int GRAPH_CHANGED_VERTICES_AND_EDGES = 13;
86 static const int GRAPH_CHANGED_NEW = 14;
87 
88 static const int CLUSTERING_SINGLE_LINKAGE = 0; //"single-link" or minimum
89 static const int CLUSTERING_COMPLETE_LINKAGE = 1; // "complete-link or maximum
90 static const int CLUSTERING_AVERAGE_LINKAGE = 2;
91 
92 static const int SUBGRAPH_CLIQUE = 1;
93 static const int SUBGRAPH_STAR = 2;
94 static const int SUBGRAPH_CYCLE = 3;
95 static const int SUBGRAPH_LINE = 4;
96 
97 static const int MATRIX_ADJACENCY = 1;
98 static const int MATRIX_DISTANCES = 2;
99 static const int MATRIX_DEGREE = 3;
100 static const int MATRIX_LAPLACIAN = 4;
101 static const int MATRIX_ADJACENCY_INVERSE = 5;
102 static const int MATRIX_GEODESICS = 6;
103 static const int MATRIX_REACHABILITY = 7;
104 static const int MATRIX_ADJACENCY_TRANSPOSE = 8;
105 static const int MATRIX_COCITATION = 9;
106 static const int MATRIX_DISTANCES_EUCLIDEAN = 12;
107 static const int MATRIX_DISTANCES_MANHATTAN= 13;
108 static const int MATRIX_DISTANCES_JACCARD= 14;
109 static const int MATRIX_DISTANCES_HAMMING= 15;
110 static const int MATRIX_DISTANCES_CHEBYSHEV= 16;
111 
112 
113 class QPointF;
114 
115 
116 
117 typedef QList<GraphVertex*> VList;
118 typedef QHash <QString, int> H_StrToInt;
119 typedef QHash <long int, long int> H_Int;
120 typedef QHash <float, long int> H_f_i;
121 typedef QPair <float, bool> pair_f_b;
122 typedef QPair <int, pair_f_b > pair_i_fb;
123 typedef QHash < int, pair_i_fb > H_edges;
124 typedef QHash<QString, bool> H_StrToBool;
125 typedef QList<int> L_int;
126 typedef QVector<int> V_int;
127 typedef QVector<QString> V_str;
128 
129 
130 
131 struct ClickedEdge {
132  int v1;
133  int v2;
134  int type;
135 };
136 
137 
138 
139 typedef QPair<int, int> SelectedEdge;
140 
141 
142 
144 {
145 public:
146  int target;
147  int distance;
148 
149  GraphDistance(int t, int dist)
150  : target(t), distance(dist)
151  {
152 
153  }
154 };
155 
156 
157 // implement a min-priority queue
159  public:
161  {
162  if (t1.distance == t2.distance)
163  return t1.target > t2.target;
164  return t1.distance > t2.distance; //minimum priority
165  // Returns true if t1 is closer than t2
166  // else
167  }
168 };
169 
170 
208 class Graph: public QObject{
209  Q_OBJECT
213 
214 public slots:
215 
216  int relationCurrent();
217  QString relationCurrentName() const;
218  void relationCurrentRename(const QString &newName, const bool &notifyMW=false);
219 
221  void vertexCreate(const int &num, const int &size, const QString &nodeColor,
222  const QString &numColor, const int &numSize,
223  const QString &label, const QString &lColor,
224  const int &labelSize, const QPointF &p, const QString &nodeShape,
225  const bool &signalMW
226  );//Main vertex creation call
227 
228  void graphFileLoaded(const int &fileType,
229  const QString &fName=QString::null,
230  const QString &netName=QString::null,
231  const int &totalNodes=0,
232  const int &totalLinks=0,
233  const bool &undirected=false,
234  const QString &message=QString::null);
235 
236  void vertexRemoveDummyNode(int);
237  void graphLoadedTerminateParserThreads (QString reason);
238 
239  void graphSelectionChanged(const QList<int> selectedVertices,
240  const QList<SelectedEdge> selectedEdges);
241 
242 
244  void edgeCreate (const int &v1, const int &v2, const float &weight,
245  const QString &color ,
246  const int &type=0,
247  const bool &drawArrows=true, const bool &bezier=false,
248  const QString &label=QString::null,
249  const bool &signalMW=true);
250  void edgeCreateWebCrawler (const int &source, const int &target);
251 
252  void edgeVisibilitySet(int relation, int, int, bool);
253 
254  //auxiliary vertexCreate functions
255  void vertexCreateAtPos(const QPointF &p);
256  void vertexCreateAtPosRandom(const bool &signalMW=false);
257  void vertexCreateAtPosRandomWithLabel(const int &i,
258  const QString &label,
259  const bool &signalMW=false) ;
262  void relationSet(int relNum=RAND_MAX, const bool notifyMW=true);
263  void relationNext();
264  void relationPrev();
265 
266  void canvasSizeSet(const int w, const int h);
267  double canvasMaxRadius() const;
268  float canvasMinDimension() const;
269  double canvasVisibleX(const double &x) const ;
270  double canvasVisibleY(const double &y) const ;
271  double canvasRandomX() const;
272  double canvasRandomY() const;
273 
274  void vertexIsolatedAllToggle ( const bool &toggle);
275  void vertexClickedSet(const int &v);
276  void edgeClickedSet(const int &v1, const int &v2, const bool &openMenu=false) ;
277 
278  void edgeFilterByWeight (float, bool);
279  void edgeFilterByRelation(int relation, bool status);
280  void edgeFilterUnilateral(const bool &toggle);
281 
282  void webCrawl(const QString &urlSeed,
283  const QStringList &urlPatternsIncluded,
284  const QStringList &urlPatternsExcluded,
285  const QStringList &linkClasses,
286  const int &maxNodes,
287  const int &maxLinksPerPage,
288  const bool &extLinks,
289  const bool &intLinks,
290  const bool &selfLinks,
291  const bool &delayedRequests);
292 
293  QString htmlEscaped (QString str) const;
294 
295 signals:
297  void signalProgressBoxCreate(const int max=0, const QString msg="Please wait");
298  void signalProgressBoxKill(const int max=0);
299  void signalProgressBoxUpdate(const int &count=0 );
300  void signalGraphModified(const int &graphStatus,
301  const bool &undirected,
302  const int &vertices,
303  const int &edges,
304  const float &density);
305 
306  void signalGraphLoaded (const int &fileType,
307  const QString &fileName=QString::null,
308  const QString &netName=QString::null,
309  const int &totalNodes=0,
310  const int &totalLinks=0,
311  const QString &message=QString::null
312  );
313  void signalGraphSaved(const int &status);
314 
315  void statusMessage (const QString &message);
316  void signalDatasetDescription(QString);
317 
318  void signalNodeClickedInfo(const int &number=0,
319  const QPointF &p=QPointF(),
320  const QString &label=QString::null,
321  const int &inDegree=0,
322  const int &outDegree=0,
323  const float &clc=0);
324  void signalEdgeClicked (const int &v1=0,
325  const int &v2=0,
326  const float &weight=0,
327  const int &type=0,
328  const bool &openMenu=false);
329  void signalRelationAddToMW(const QString &newRelation, const bool &changeRelation=true);
330  void signalRelationsClear();
331  void signalRelationRenamedToMW(const QString newRelName);
332  void signalRelationChangedToGW(int);
333  void signalRelationChangedToMW(const int &relIndex=RAND_MAX);
334  void signalSelectionChanged(const int &selectedVertices,
335  const int &selectedEdges);
336 
338  void signalDrawNode( const int &num, const int &size, const QString &nodeShape,
339  const QString &nodeColor,
340  const QString &numberColor, const int &numSize,
341  const int &numDistance,
342  const QString &label,
343  const QString &labelColor, const int &labelSize,
344  const int &labelDistance,
345  const QPointF &p
346  );
347 
348  //signal to GW to erase a node
349  void signalRemoveNode (long int );
350 
351  //signal GW to draw an edge
352  void signalDrawEdge ( const int &v1,
353  const int &v2,
354  const float &weight,
355  const QString &label="",
356  const QString &color="black",
357  const int &type=0,
358  const bool &drawArrows=true,
359  const bool &bezier=false,
360  const bool &weightNumbers=false);
361 
362  //signal to GW
363  void signalRemoveEdge(const long int &v1, const long int &v2, const bool &removeOpposite);
364 
365  void setEdgeVisibility (int, int, int, bool); // emitted from each GraphVertex
366  void setVertexVisibility(long int, bool); //notifies GW to disable a node
367  void setNodePos(const int &, const qreal &, const qreal &);
368  void signalNodesFound(const QList<int> foundList);
369  void setNodeSize(const long int &v, const int &size);
370  void setNodeShape(const long int v, const QString &shape);
371  void setNodeColor(const long int v, const QString &color);
372  void setNodeLabel(long int, QString);
373  void setNodeNumberSize(const long int &, const int &);
374  void setNodeNumberDistance(const long int &, const int &);
375  void setNodeLabelSize(const long int &, const int &);
376  void setNodeLabelColor(const long int &, const QString &color);
377  void setNodeLabelDistance(const long int &, const int &);
378 
379  void setEdgeWeight (const long int &v1, const long int &v2, const float &weight);
380  void signalEdgeType(const long int &v1,
381  const long int &v2,
382  const int &type);
383  void setEdgeColor(const long int &v1,
384  const long int &v2,
385  const QString &color);
386  void setEdgeLabel (const long int &v1,
387  const long int &v2,
388  const QString &label);
389  void addGuideCircle(const double&, const double&, const double&);
390  void addGuideHLine (const double&y0);
391 
392 
393 
394 
396  void operateSpider();
397 
398 
399 public:
400  /* INIT AND CLEAR*/
401  Graph();
402  void clear(const QString &reason="");
403  ~Graph(); //destroy object
404 
405  void setSocNetV_Version (QString ver) { VERSION = ver; }
406 
407 
408  /*FILES (READ AND WRITE)*/
409  QString graphName() const;
410  void graphLoad (const QString m_fileName,
411  const QString m_codecName,
412  const int format,
413  const int two_sm_mode,
414  const QString delimiter=QString::null);
415 
416  void graphSave(const QString &fileName,
417  const int &fileType,
418  const bool &saveEdgeWeights=true);
419  bool graphSaveToPajekFormat (const QString &fileName,
420  QString networkName="",
421  int maxWidth=0, int maxHeight=0);
422  bool graphSaveToAdjacencyFormat (const QString &fileName,
423  const bool &saveEdgeWeights=true);
424 
425  bool graphSaveToGraphMLFormat (const QString &fileName,
426  QString networkName="",
427  int maxWidth=0, int maxHeight=0);
428  bool graphSaveToDotFormat (QString fileName);
429  int graphFileFormat() const;
430  bool graphFileFormatExportSupported(const int &fileFormat) const;
431 
432  QString graphMatrixTypeToString(const int &matrixType) const;
433  int graphMatrixStrToType(const QString &matrix) const;
434 
435  QString graphMetricTypeToString(const int &metricType) const;
436  int graphMetricStrToType(const QString &metricStr) const;
437 
438  QString graphClusteringMethodTypeToString(const int &methodType) const;
439  int graphClusteringMethodStrToType(const QString &method) const;
440 
441  /* RELATIONS */
442  int relations();
443  void relationsClear();
444  void relationAdd(const QString &relName, const bool &changeRelation=false);
445 
446  /* VERTICES */
447  int vertexNumberMax();
448  int vertexNumberMin();
449 
450  int vertexDegreeOut(int);
451  int vertexDegreeIn(int);
452  QList<int> vertexNeighborhoodList(const int &v1);
453 
454  bool vertexIsolated(const long int &v1) const;
455 
456  int vertexExists(const long int &v1 );
457  int vertexExists(const QString &label);
458 
459  bool vertexFindByNumber (const QStringList &numList) ;
460  bool vertexFindByLabel (const QStringList &labelList) ;
461  bool vertexFindByIndexScore(const int &index, const QStringList &thresholds);
462 
463  void vertexRemove (const long int &v1);
464 
465  void vertexSizeInit (const long int);
466  void vertexSizeSet(const long int &v, const int &newsize );
467  void vertexSizeAllSet(const int newsize);
468  int vertexSize(const long int &v);
469 
470  void vertexShapeInit (const QString);
471  void vertexShapeSet(const int v, const QString shape);
472  void vertexShapeAllSet(const QString shape);
473  QString vertexShape(const int &v);
474 
475  void vertexColorInit (const QString &color);
476  void vertexColorSet(const long &v, const QString &color);
477  void vertexColorAllSet(const QString &color);
478  QColor vertexColor(const long int &v);
479 
480  void vertexNumberColorInit ( QString color);
481  void vertexNumberSizeInit (const int &size);
482  void vertexNumberSizeSet(const long int &v, const int &newsize );
483  void vertexNumberSizeSetAll (const int &size);
484  void vertexNumberDistanceInit (const int &distance);
485  void vertexNumberDistanceSet(const long int &v, const int &newDistance );
486  void vertexNumberDistanceSetAll (const int &newDistance);
487 
488 
489  void vertexLabelsVisibilitySet(bool toggle);
490  void vertexLabelSizeInit(int newSize);
491  void vertexLabelSizeSet(const long int &v, const int &newsize );
492  void vertexLabelSizeAllSet (const int &);
493  void vertexLabelColorInit(QString color);
494  void vertexLabelSet(int v, QString label);
495  void vertexLabelColorSet(int v1, QString color);
496  void vertexLabelColorAllSet(const QString &color);
497  QString vertexLabel(const long int &v1);
498  void vertexLabelDistanceInit (const int &distance);
499  void vertexLabelDistanceSet(const long int &v, const int &newDistance );
500  void vertexLabelDistanceAllSet (const int &newDistance);
501 
502 
503 
504  void vertexPosSet(const int &v, const int &x, const int &y);
505  QPointF vertexPos(const int &v1);
506  int vertexClicked() const;
507 
508  int vertices(const bool &dropIsolates=false, const bool &countAll=false, const bool &recount=false) ;
509 
510  int vertexEdgesOutbound (int i) ;
511  int vertexEdgesInbound (int i) ;
512 
513  int verticesWithOutboundEdges();
514  int verticesWithInboundEdges();
515  int verticesWithReciprocalEdges();
516 
517  QList<int> verticesListIsolated();
518  QList<int> verticesList();
519  QSet<int> verticesSet();
520 
521 
522 
523  void verticesCreateSubgraph(QList<int> vList,
524  const int &type = SUBGRAPH_CLIQUE,
525  const int &center = 0);
526 
527 
528  qreal graphDistanceEuclidean(const QPointF &a, const QPointF &b);
529  qreal graphDistanceEuclidean(const QPointF &a);
530  int sign(const qreal &D);
531 
532  qreal layoutForceDirected_F_rep(const QString model, const qreal &dist,
533  const qreal &optimalDistance) ;
534  qreal layoutForceDirected_F_att(const QString model, const qreal &dist,
535  const qreal &optimalDistance) ;
536 
537  void layoutForceDirected_Eades_moveNodes(const qreal &c4);
538  void layoutForceDirected_FR_moveNodes(const qreal &temperature) ;
539 
540  qreal layoutForceDirected_FR_temperature(const int iteration) const;
541  qreal computeOptimalDistance(const int &V);
542  void compute_angles( const QPointF &Delta,
543  const qreal &dist,
544  qreal &angle1,
545  qreal &angle2,
546  qreal &degrees1,
547  qreal &degrees2 );
548 
549  /* EDGES */
550  int edgesEnabled();
551  ClickedEdge edgeClicked();
552  float edgeExists(const long &v1, const long &v2, const bool &checkReciprocal=false);
553 
554  void edgeRemove (const long int &v1, const long int &v2,
555  const bool &removeOpposite=false);
556  bool edgeSymmetric(const long &v1, const long &v2);
557  void edgeTypeSet(const long int &v1,
558  const long int &v2,
559  const float &w,
560  const int &dirType=EDGE_DIRECTED);
561 
562  void edgeWeightSet (const long int &v1, const long int &v2,
563  const float &w,
564  const bool &undirected=false);
565  float edgeWeight(const long int &v1, const long int &v2) const;
566  void edgeWeightNumbersVisibilitySet (const bool &toggle);
567 
568  void edgeLabelSet(const long int &v1, const long int &v2, const QString &label);
569  QString edgeLabel (const long int &v1, const long int &v2) const;
570  void edgeLabelsVisibilitySet (const bool &toggle);
571 
572  void edgeColorInit(const QString &);
573  void edgeColorSet(const long int &v1, const long int &v2, const QString &color);
574  QString edgeColor (const long int &v1, const long int &v2);
575  bool edgeColorAllSet(const QString &color, const int &threshold=RAND_MAX);
576 
577  //GRAPH methods
578  void graphModifiedSet(const int &graphNewStatus, const bool&signalMW=true);
579  bool graphModified() const ;
580  bool graphSaved() const;
581  bool graphLoaded() const;
582 
583  QList<int> graphSelectedVertices() const;
584  int graphSelectedVerticesCount() const;
585  int graphSelectedVerticesMin() const;
586  int graphSelectedVerticesMax() const;
587 
588  QList<SelectedEdge> graphSelectedEdges() const;
589  int graphSelectedEdgesCount() const;
590 
591  int graphGeodesics();
592 
593  float graphDensity();
594  bool graphWeighted();
595 
596  float graphReciprocity();
597 
598  bool graphSymmetric();
599  void graphSymmetrize();
600  void graphSymmetrizeStrongTies(const bool &allRelations=false);
601 
602  void graphCocitation();
603 
604  void graphUndirectedSet(const bool &toggle, const bool &signalMW=true);
605  bool graphUndirected();
606 
607  void graphMatrixAdjacencyCreate(const bool dropIsolates=false,
608  const bool considerWeights=true,
609  const bool inverseWeights=false,
610  const bool symmetrize=false );
611 
612  bool graphMatrixAdjacencyInvert(const QString &method="lu");
613 
614 
615  void graphMatrixSimilarityMatchingCreate(Matrix &AM,
616  Matrix &SEM,
617  const int &measure=METRIC_SIMPLE_MATCHING,
618  const QString &varLocation="Rows",
619  const bool &diagonal=false,
620  const bool &considerWeights=true);
621 
622  void graphMatrixSimilarityPearsonCreate (Matrix &AM,
623  Matrix &PCC,
624  const QString &varLocation="Rows",
625  const bool &diagonal=false);
626 
627  void graphMatrixDissimilaritiesCreate(Matrix &INPUT_MATRIX,
628  Matrix &DSM,
629  const int &metric,
630  const QString &varLocation,
631  const bool &diagonal,
632  const bool &considerWeights);
633 
634  /* REPORT EXPORTS */
635 
636  void writeDataSetToFile(const QString dir, const QString );
637 
638  void writeMatrixAdjacencyTo(QTextStream& os,
639  const bool &saveEdgeWeights=true);
640 
641  void writeReciprocity( const QString fileName, const bool considerWeights=false);
642 
643  void writeMatrix(const QString &fileName,
644  const int &matrix=MATRIX_ADJACENCY,
645  const bool &considerWeights=true,
646  const bool &inverseWeights=false,
647  const bool &dropIsolates=false,
648  const QString &varLocation="Rows",
649  const bool &simpler=false);
650 
651  void writeMatrixHTMLTable(QTextStream &outText, Matrix &M,
652  const bool &markDiag=true,
653  const bool &plain=false,
654  const bool &printInfinity=true,
655  const bool &dropIsolates=false);
656 
657  void writeMatrixAdjacency(const QString fileName,
658  const bool &markDiag=true);
659 
660  void writeMatrixAdjacencyPlot(const QString fileName,
661  const bool &simpler=false);
662 
663  void writeMatrixAdjacencyInvert(const QString &filename,
664  const QString &method);
665 
666  void writeMatrixLaplacianPlainText(const QString &filename);
667  void writeMatrixDegreeText(const QString &filename);
668 
669  void writeMatrixDistancesPlainText(const QString &fn,
670  const bool &considerWeights,
671  const bool &inverseWeights,
672  const bool &dropIsolates);
673 
674  void writeMatrixShortestPathsPlainText(const QString &fn,
675  const bool &considerWeights,
676  const bool &inverseWeights);
677 
678  void writeMatrixDissimilarities(const QString fileName,
679  const QString &metricStr,
680  const QString &varLocation,
681  const bool &diagonal,
682  const bool &considerWeights) ;
683 
684  void writeMatrixSimilarityMatchingPlain(const QString fileName,
685  const int &measure=METRIC_SIMPLE_MATCHING,
686  const QString &matrix = "adjacency",
687  const QString &varLocation="rows",
688  const bool &diagonal=false,
689  const bool &considerWeights=true);
690 
691  void writeMatrixSimilarityMatching(const QString fileName,
692  const QString &measure="Simple",
693  const QString &matrix = "adjacency",
694  const QString &varLocation="rows",
695  const bool &diagonal=false,
696  const bool &considerWeights=true);
697 
698 
699  void writeMatrixSimilarityPearson(const QString fileName,
700  const bool considerWeights,
701  const QString &matrix = "adjacency",
702  const QString &varLocation="rows",
703  const bool &diagonal=false);
704 
705  void writeMatrixSimilarityPearsonPlainText(const QString fileName,
706  const bool considerWeights,
707  const QString &matrix = "adjacency",
708  const QString &varLocation="rows",
709  const bool &diagonal=false);
710 
711  void writeEccentricity( const QString fileName, const bool considerWeights=false,
712  const bool inverseWeights=false, const bool dropIsolates=false);
713 
714  // friend QTextStream& operator << (QTextStream& os, Graph& m);
715 
716  void writeCentralityDegree(const QString,
717  const bool weights,
718  const bool dropIsolates);
719  void writeCentralityCloseness(const QString,
720  const bool weights,
721  const bool inverseWeights,
722  const bool dropIsolates);
723  void writeCentralityClosenessInfluenceRange(const QString,
724  const bool weights,
725  const bool inverseWeights,
726  const bool dropIsolates);
727  void writeCentralityBetweenness(const QString,
728  const bool weights,
729  const bool inverseWeights,
730  const bool dropIsolates);
731  void writeCentralityPower(const QString,
732  const bool weigths,
733  const bool inverseWeights,
734  const bool dropIsolates);
735  void writeCentralityStress(const QString,
736  const bool weigths,
737  const bool inverseWeights,
738  const bool dropIsolates);
739  void writeCentralityEccentricity(const QString,
740  const bool weigths,
741  const bool inverseWeights,
742  const bool dropIsolates);
743  void writeCentralityInformation(const QString,
744  const bool weigths,
745  const bool inverseWeights);
746  void writeCentralityEigenvector(const QString,
747  const bool &weigths=true,
748  const bool &inverseWeights = false,
749  const bool &dropIsolates=false);
750  void writePrestigeDegree(const QString, const bool weights,
751  const bool dropIsolates);
752  void writePrestigeProximity(const QString, const bool weights,
753  const bool inverseWeights,
754  const bool dropIsolates);
755  void writePrestigePageRank(const QString, const bool Isolates=false);
756 
757 
758  bool writeClusteringHierarchical(const QString &fileName,
759  const QString &varLocation,
760  const QString &matrix = "Adjancency",
761  const QString &metric = "Manhattan",
762  const QString &method = "Complete",
763  const bool &diagonal = false,
764  const bool &dendrogram = false,
765  const bool &considerWeights=true,
766  const bool &inverseWeights=false,
767  const bool &dropIsolates=false);
768 
769  void writeClusteringHierarchicalResultsToStream(QTextStream& outText,
770  const int N,
771  const bool &dendrogram = false);
772 
773  bool writeCliqueCensus( const QString &fileName,
774  const bool considerWeights);
775 
776  void writeClusteringCoefficient(const QString, const bool);
777 
778  void writeTriadCensus(const QString, const bool);
779 
780 
781 
782 
783 
784 
785  /* DISTANCES, CENTRALITIES & PROMINENCE MEASURES */
786  int graphConnectedness(const bool updateProgress=false) ;
787 
788  bool graphReachable(const int &v1, const int &v2) ;
789  void graphMatrixReachabilityCreate() ;
790 
791  int graphDiameter(const bool considerWeights, const bool inverseWeights);
792 
793  int graphDistanceGeodesic(const int v1, const int v2,
794  const bool considerWeights,
795  const bool inverseWeights);
796 
797  float graphDistanceGeodesicAverage(const bool considerWeights,
798  const bool inverseWeights, const bool dropIsolates);
799 
800  void graphDistanceGeodesicCompute(const bool &computeCentralities=false,
801  const bool &considerWeights=false,
802  const bool &inverseWeights=true,
803  const bool &dropIsolates=false);
804 
805  void graphMatrixDistanceGeodesicCreate(const bool &considerWeights=false,
806  const bool &inverseWeights=true,
807  const bool &dropIsolates=false);
808 
809  void graphMatrixShortestPathsCreate(const bool &considerWeights=false,
810  const bool &inverseWeights=true,
811  const bool &dropIsolates=false) ;
812 
813  void centralityDegree(const bool &weights=true,
814  const bool &dropIsolates=false);
815  void centralityInformation(const bool considerWeights=false,
816  const bool inverseWeights=false);
817  void centralityEigenvector(const bool &considerWeights=false,
818  const bool &inverseWeights=false,
819  const bool &dropIsolates=false);
820  void centralityClosenessIR(const bool considerWeights=false,
821  const bool inverseWeights=false,
822  const bool dropIsolates=false);
823 
824  void prestigeDegree(const bool &weights, const bool &dropIsolates=false);
825  void prestigePageRank(const bool &dropIsolates=false);
826  void prestigeProximity(const bool considerWeights=false,
827  const bool inverseWeights=false,
828  const bool dropIsolates=false);
829 
830  /* REACHABILTY AND WALKS */
831  int walksBetween(int v1, int v2,int length);
832  void graphWalksMatrixCreate(const int &N=0, const int &length=0,
833  const bool &updateProgress=false);
834  void writeWalksTotalMatrixPlainText(const QString &fn);
835  void writeWalksOfLengthMatrixPlainText(const QString &fn, const int &length);
836  void writeMatrixWalks (const QString &fn,
837  const int &length=0,
838  const bool &simpler=false);
839 
840  QList<int> vertexinfluenceRange(int v1);
841  QList<int> vertexinfluenceDomain(int v2);
842 
843  void writeReachabilityMatrixPlainText(const QString &fn, const bool &dropIsolates=false);
844 
845 
846  float numberOfTriples(int v1);
847 
848  /* CLIQUES, CLUSTERING, TRIADS */
849  void graphCliques(QSet<int> R=QSet<int>(), QSet<int> P=QSet<int>(), QSet<int> X=QSet<int>() );
850  void graphCliqueAdd (const QList<int> &clique);
851  int graphCliquesContaining(const int &actor, const int &size=0);
852  int graphCliquesOfSize(const int &size );
853 
854  bool graphClusteringHierarchical(Matrix &STR_EQUIV,
855  const QString &varLocation,
856  const int &metric,
857  const int &method,
858  const bool &diagonal=false,
859  const bool &diagram=false,
860  const bool &considerWeights=true,
861  const bool &inverseWeights=false,
862  const bool &dropIsolates=false);
863  float clusteringCoefficientLocal(const long int &v1);
864  float clusteringCoefficient (const bool updateProgress=false);
865 
866  bool graphTriadCensus();
867  void triadType_examine_MAN_label(int, int, int, GraphVertex*, GraphVertex*, GraphVertex* );
868  // void eccentr_JordanCenter(); // TODO
869 
870 
871 
872  /* LAYOUTS */
873 
874  void layoutRandom();
875 
876  void layoutRadialRandom(const bool &guides=true);
877 
878  void layoutCircular(const double &x0,
879  const double &y0,
880  const double &newRadius,
881  const bool &guides=false);
882 
883 
884  void layoutByProminenceIndex ( int prominenceIndex, int layoutType,
885  const bool considerWeights=false,
886  const bool inverseWeights=false,
887  const bool dropIsolates=false);
888 
889 
890  void layoutVertexSizeByIndegree();
891  void layoutVertexSizeByOutdegree();
892 
893 
894  void layoutForceDirectedSpringEmbedder(const int maxIterations);
895 
896  void layoutForceDirectedFruchtermanReingold(const int maxIterations);
897 
898  void layoutForceDirectedKamadaKawai(const int maxIterations=500,
899  const bool considerWeights=false,
900  const bool inverseWeights=false,
901  const bool dropIsolates=false,
902  const QString &initialPositions="current");
903 
904  /* CRAWLER */
905  void webCrawlTerminateThreads (QString reason);
906 
908  void randomizeThings();
909 
910  void randomNetErdosCreate ( const int &N,
911  const QString &model,
912  const int &m,
913  const float &p,
914  const QString &mode,
915  const bool &diag);
916 
917  void randomNetScaleFreeCreate (const int &N,
918  const int &power,
919  const int &m0,
920  const int &m,
921  const float &alpha,
922  const QString &mode);
923 
924  void randomNetSmallWorldCreate(const int &N, const int &degree,
925  const double &beta, const QString &mode);
926 
927  void randomNetRingLatticeCreate (const int &N, const int &degree,
928  const bool updateProgress=false);
929 
930  void randomNetRegularCreate (const int &N,
931  const int &degree,
932  const QString &mode,
933  const bool &diag);
934 
935  void randomNetLatticeCreate(const int &N,
936  const int &length,
937  const int &dimension,
938  const int &neighborhoodLength,
939  const QString &mode,
940  const bool &circular=false);
941 
942  int factorial (int);
943 
944 
951 
952  // Stores the number of vertices at distance n from a given vertex
954 
955  /* maps have O(logN) lookup complexity */
956  /* Consider using tr1::hashmap which has O(1) lookup, but this is not ISO C++ yet :( */
957 
958 
959 protected:
960  // Called from nodeMovement when a timerEvent occurs
961  //void timerEvent(QTimerEvent *event);
962 
963 
964 private:
965 
971 
972  Parser *file_parser; //file loader threaded class.
973 
976 
978  void vertexAdd ( const int &v1, const int &val, const int &size,
979  const QString &color, const QString &numColor,
980  const int &numSize, const QString &label,
981  const QString &labelColor, const int &labelSize,
982  const QPointF &p, const QString &shape );
983 
984  void edgeAdd (const int &v1, const int &v2, const float &weight,
985  const int &type,
986  const QString &label,
987  const QString &color
988  );
989 
991  void BFS(const int &s, const int &si, const bool &computeCentralities=false,
992  const bool &dropIsolates=false);
993  void dijkstra(const int &s, const int &si, const bool &computeCentralities=false,
994  const bool &inverseWeights=false,
995  const bool &dropIsolates=false);
996 
997  void minmax(
998  float C, GraphVertex *v, float &max, float &min,
999  int &maxNode, int &minNode
1000  ) ;
1001  void resolveClasses (float C, H_StrToInt &discreteClasses, int &classes);
1002  void resolveClasses (
1003  float C, H_StrToInt &discreteClasses,
1004  int &classes, int name
1005  );
1006 
1007 
1008  QList<QString> m_relationsList;
1009 
1011 
1012  QList<int> triadTypeFreqs; //stores triad type frequencies
1013 
1014  QList<int> m_verticesList;
1018 
1019  QSet<int> m_verticesSet;
1020 
1021  QList<SelectedEdge> m_selectedEdges;
1022 
1023  QHash <int, int> influenceRanges, influenceDomains;
1024  QHash <int, int> m_vertexPairsNotConnected;
1026 
1027  QMap <int, L_int > m_cliques;
1028  QHash <int, QSet<int> > neighboursHash;
1029 
1030  QList <float> m_clusteringLevel;
1031  QMap <int, V_int> m_clustersPerSequence;
1032 
1033 
1034  QMap<QString, V_int> m_clustersByName;
1035  QMap<int, V_str> m_clusterPairNamesPerSeq;
1036 
1037  Matrix SIGMA, DM, sumM, invAM, AM, invM, WM;
1038  Matrix XM, XSM, XRM, CLQM;
1039 
1040  stack<int> Stack;
1041 
1043  H_StrToInt discreteDPs, discreteSDCs, discreteCCs, discreteBCs, discreteSCs;
1044  H_StrToInt discreteIRCCs, discreteECs, discreteEccentricities;
1045  H_StrToInt discretePCs, discreteICs, discretePRPs, discretePPs, discreteEVCs;
1046 
1047  int m_precision, m_fieldWidth, m_curRelation, m_fileFormat, m_vertexClicked;
1049  float edgeWeightTemp, edgeReverseWeightTemp;
1050  float meanSDC, varianceSDC;
1051  float meanSCC, varianceSCC;
1052  float meanIRCC, varianceIRCC;
1053  float meanSBC, varianceSBC;
1054  float meanSSC, varianceSSC;
1055  float meanEC, varianceEC;
1056  float meanSPC, varianceSPC;
1057  float meanIC, varianceIC;
1058  float meanEVC, varianceEVC;
1059  float meanSDP, varianceSDP;
1060  float meanPP, variancePP;
1061  float meanPRP, variancePRP;
1062  float minEccentricity, maxEccentricity;
1063  float minSDP, maxSDP, sumDP, sumSDP, groupDP;
1064  float minSDC, maxSDC, sumDC, sumSDC, groupDC;
1065  float minSCC, maxSCC, nomSCC, denomSCC, sumCC, sumSCC, groupCC, maxIndexCC;
1066  float minIRCC, maxIRCC, nomIRCC, denomIRCC, sumIRCC, groupIRCC;
1067  float minSBC, maxSBC, nomSBC, denomSBC, sumBC, sumSBC, groupSBC, maxIndexBC;
1068  float minSPC, maxSPC, nomSPC, denomSPC, t_sumIC, sumSPC, groupSPC, maxIndexPC;
1069  float minSSC, maxSSC, sumSC, sumSSC, groupSC, maxIndexSC;
1070  float minEC, maxEC, nomEC, denomEC, sumEC, groupEC, maxIndexEC;
1071  float minIC, maxIC, nomIC, denomIC, sumIC, maxIndexIC;
1072  float minEVC, maxEVC, nomEVC, denomEVC, sumEVC, sumSEVC, groupEVC;
1073  float minPRP, maxPRP, nomPRC, denomPRC, sumPC, t_sumPRP, sumPRP;
1074  float minPP, maxPP, nomPP, denomPP, sumPP, groupPP;
1075 
1076  float minCLC, maxCLC, averageCLC,varianceCLC, d_factor;
1077  int maxNodeCLC, minNodeCLC;
1078  int classesSDP, maxNodeDP, minNodeDP;
1079  int classesSDC, maxNodeSDC, minNodeSDC;
1080  int classesSCC, maxNodeSCC, minNodeSCC;
1081  int classesIRCC, maxNodeIRCC, minNodeIRCC;
1082  int classesSBC, maxNodeSBC, minNodeSBC;
1083  int classesSPC, maxNodeSPC, minNodeSPC;
1084  int classesSSC, maxNodeSSC, minNodeSSC;
1085  int classesEC, maxNodeEC, minNodeEC;
1086  int classesEccentricity, maxNodeEccentricity, minNodeEccentricity;
1087  int classesIC, maxNodeIC, minNodeIC;
1088  int classesPRP, maxNodePRP, minNodePRP;
1089  int classesPP, maxNodePP, minNodePP;
1090  int classesEVC, maxNodeEVC, minNodeEVC;
1092 
1096  long int m_totalVertices, m_totalEdges, m_graphDiameter, initVertexSize;
1097  int initVertexLabelSize, initVertexNumberSize;
1098  int initVertexNumberDistance, initVertexLabelDistance;
1099  bool order;
1100  bool initEdgeWeightNumbers, initEdgeLabels;
1101  float m_graphAverageDistance, m_graphGeodesicsCount;
1103  float m_graphReciprocityArc, m_graphReciprocityDyad;
1109 
1110 
1112  int outboundEdgesVert, inboundEdgesVert, reciprocalEdgesVert;
1113  //int timerId;
1114  int canvasWidth, canvasHeight;
1116  bool calculatedVertices, calculatedVerticesList, calculatedVerticesSet;
1117  bool calculatedAdjacencyMatrix, calculatedDistances, calculatedCentralities;
1120  bool calculatedDP, calculatedDC, calculatedPP;
1121  bool calculatedIRCC, calculatedIC, calculatedPRP;
1123  bool calculatedGraphSymmetry, calculatedGraphReciprocity;
1124  bool calculatedGraphDensity, calculatedGraphWeighted;
1126  bool m_undirected, m_symmetric, m_isWeighted, m_graphDisconnected;
1127 
1129 
1130  QString VERSION, fileName, m_graphName, initEdgeColor, initVertexColor,
1131  initVertexNumberColor, initVertexLabelColor, initVertexShape;
1132  QString htmlHead, htmlHeadLight, htmlEnd;
1133 
1134  QDateTime actualDateTime;
1135 };
1136 
1137 #endif
1138 
QPair< int, int > SelectedEdge
Definition: graph.h:139
static const int CLUSTERING_SINGLE_LINKAGE
Definition: graph.h:88
static const int MATRIX_REACHABILITY
Definition: graph.h:103
int minNodeCLC
Definition: graph.h:1077
Definition: webcrawler.h:84
VList m_graph
Definition: graph.h:970
static const int GRAPH_CHANGED_VERTICES_METADATA
Definition: graph.h:80
static const int FILE_TWOMODE
Definition: graph.h:62
WebCrawler_Parser * wc_parser
Definition: graph.h:974
QList< int > triadTypeFreqs
Definition: graph.h:1012
int m_graphReciprocityTiesNonSymmetric
Definition: graph.h:1105
float t_sumIC
Definition: graph.h:1068
static const int FILE_UNRECOGNIZED
Definition: graph.h:63
static const int INDEX_CC
Definition: graph.h:66
GraphDistance(int t, int dist)
Definition: graph.h:149
int m_graphReciprocityPairsTotal
Definition: graph.h:1108
int minNodeDP
Definition: graph.h:1078
static const int MATRIX_DISTANCES
Definition: graph.h:98
QList< int > m_verticesInfiniteEccentricity
Definition: graph.h:1016
static const int SUBGRAPH_CLIQUE
Definition: graph.h:92
static const int INDEX_PP
Definition: graph.h:76
bool initEdgeWeightNumbers
Definition: graph.h:1100
WebCrawler_Spider * wc_spider
Definition: graph.h:975
bool calculatedIsolates
Definition: graph.h:1118
int distance
Definition: graph.h:147
static const int MATRIX_DISTANCES_JACCARD
Definition: graph.h:108
static const int FILE_PAJEK
Definition: graph.h:55
bool calculatedGraphWeighted
Definition: graph.h:1124
QList< int > m_verticesSelected
Definition: graph.h:1017
static const int GRAPH_CHANGED_NEW
Definition: graph.h:86
static const int INDEX_PC
Definition: graph.h:71
The Graph class This is the main class for a Graph, used in conjuction with GraphVertex, Parser and Matrix objects. Graph class methods are the interface to various analysis algorithms GraphVertex class holds each vertex data (colors, strings, statistics, etc) Matrix class holds the adjacency matrix of the network. Parser class loads files of networks.
Definition: graph.h:208
QList< int > m_verticesList
Definition: graph.h:1014
QHash< QString, int > H_StrToInt
Definition: graph.h:118
Definition: graph.h:158
float varianceIC
Definition: graph.h:1057
H_f_i sizeOfNthOrderNeighborhood
Definition: graph.h:953
float varianceSDP
Definition: graph.h:1059
QVector< int > V_int
Definition: graph.h:126
float sumIRCC
Definition: graph.h:1066
static const int GRAPH_CHANGED_EDGES
Definition: graph.h:84
H_StrToInt discretePRPs
Definition: graph.h:1045
QThread wc_spiderThread
Definition: graph.h:212
static const int FILE_UCINET
Definition: graph.h:58
float sumSDC
Definition: graph.h:1064
static const int SUBGRAPH_CYCLE
Definition: graph.h:94
float variancePP
Definition: graph.h:1060
QHash< int, QSet< int > > neighboursHash
Definition: graph.h:1028
int minNodePRP
Definition: graph.h:1088
float varianceSPC
Definition: graph.h:1056
int v2
Definition: graph.h:133
static const int FILE_GRAPHVIZ
Definition: graph.h:57
float variancePRP
Definition: graph.h:1061
QString htmlHeadLight
Definition: graph.h:1132
static const int INDEX_EC
Definition: graph.h:70
bool calculatedTriad
Definition: graph.h:1122
static const int GRAPH_CHANGED_VERTICES
Definition: graph.h:83
QString VERSION
Definition: graph.h:1130
QThread file_parserThread
Definition: graph.h:210
float m_graphReciprocityDyad
Definition: graph.h:1103
static const int INDEX_EVC
Definition: graph.h:73
Definition: graph.h:131
H_StrToInt discreteIRCCs
Definition: graph.h:1044
QHash< int, pair_i_fb > H_edges
Definition: graph.h:123
static const int EDGE_DIRECTED
Definition: graph.h:49
bool calculatedDistances
Definition: graph.h:1117
int cliqueCensusRecursion
Definition: graph.h:1128
Matrix WM
Definition: graph.h:1037
float t_sumPRP
Definition: graph.h:1073
int minNodeSSC
Definition: graph.h:1084
QList< int > m_verticesIsolatedList
Definition: graph.h:1015
bool order
Definition: graph.h:1099
QDateTime actualDateTime
Definition: graph.h:1134
bool calculatedVerticesSet
Definition: graph.h:1116
QList< QString > m_relationsList
Definition: graph.h:1008
Definition: webcrawler.h:40
static const int MATRIX_DEGREE
Definition: graph.h:99
Parser * file_parser
Definition: graph.h:972
float varianceCLC
Definition: graph.h:1076
static const int MATRIX_GEODESICS
Definition: graph.h:102
static const int GRAPH_CHANGED_EDGES_METADATA
Definition: graph.h:81
H_StrToInt discreteSDCs
Definition: graph.h:1043
int minNodeEC
Definition: graph.h:1085
int minNodeSCC
Definition: graph.h:1080
QPair< float, bool > pair_f_b
Definition: graph.h:121
stack< int > Stack
Definition: graph.h:1040
float varianceEC
Definition: graph.h:1055
QHash< float, long int > H_f_i
Definition: graph.h:120
float sumSDP
Definition: graph.h:1063
int target
Definition: graph.h:146
static const int FILE_EDGELIST_SIMPLE
Definition: graph.h:61
QHash< QString, bool > H_StrToBool
Definition: graph.h:124
static const int FILE_ADJACENCY
Definition: graph.h:56
float sumSCC
Definition: graph.h:1065
static const int MATRIX_LAPLACIAN
Definition: graph.h:100
ClickedEdge m_clickedEdge
Definition: graph.h:1048
int minNodeSDC
Definition: graph.h:1079
float sizeOfComponent
Definition: graph.h:1091
static const int INDEX_IC
Definition: graph.h:72
float minEccentricity
Definition: graph.h:1062
QHash< int, int > influenceRanges
Definition: graph.h:1023
Definition: graph.h:143
float m_graphGeodesicsCount
Definition: graph.h:1101
static const QString VERSION
Definition: mainwindow.h:54
void setSocNetV_Version(QString ver)
Definition: graph.h:405
long int m_totalVertices
Definition: graph.h:1096
static const int SUBGRAPH_STAR
Definition: graph.h:93
H_Int vpos
Definition: graph.h:950
float varianceSSC
Definition: graph.h:1054
static const int MATRIX_DISTANCES_EUCLIDEAN
Definition: graph.h:106
int canvasWidth
Definition: graph.h:1114
static const int FILE_GML
Definition: graph.h:59
static const int SUBGRAPH_LINE
Definition: graph.h:95
int minNodeIC
Definition: graph.h:1087
QList< int > L_int
Definition: graph.h:125
float sumPP
Definition: graph.h:1074
static const int INDEX_IRCC
Definition: graph.h:67
static const int GRAPH_CHANGED_NONE
Definition: graph.h:78
QSet< int > m_verticesSet
Definition: graph.h:1019
float sumIC
Definition: graph.h:1071
static const int CLUSTERING_COMPLETE_LINKAGE
Definition: graph.h:89
int minNodeEVC
Definition: graph.h:1090
float varianceSDC
Definition: graph.h:1050
static const int INDEX_SC
Definition: graph.h:69
static const int MATRIX_COCITATION
Definition: graph.h:105
float varianceIRCC
Definition: graph.h:1052
QHash< int, int > m_vertexPairsNotConnected
Definition: graph.h:1024
bool calculatedGraphSymmetry
Definition: graph.h:1123
static const int CLUSTERING_AVERAGE_LINKAGE
Definition: graph.h:90
static const int INDEX_BC
Definition: graph.h:68
Definition: matrix.h:128
int graphModifiedFlag
Definition: graph.h:1095
int type
Definition: graph.h:134
static const int INDEX_DC
Definition: graph.h:65
int minNodeSBC
Definition: graph.h:1082
int m_graphReciprocityTiesTotal
Definition: graph.h:1106
int reciprocalEdgesVert
Definition: graph.h:1112
int minNodeEccentricity
Definition: graph.h:1086
static const int FILE_EDGELIST_WEIGHTED
Definition: graph.h:60
static const int EDGE_RECIPROCATED
Definition: graph.h:50
float sumEC
Definition: graph.h:1070
static const int MATRIX_DISTANCES_CHEBYSHEV
Definition: graph.h:110
static const int FILE_GRAPHML
Definition: graph.h:54
QList< SelectedEdge > m_selectedEdges
Definition: graph.h:1021
static const int INDEX_DP
Definition: graph.h:74
float varianceSCC
Definition: graph.h:1051
QHash< long int, long int > H_Int
Definition: graph.h:119
bool calculatedPP
Definition: graph.h:1120
int initVertexNumberSize
Definition: graph.h:1097
float sumSBC
Definition: graph.h:1067
bool calculatedPRP
Definition: graph.h:1121
bool operator()(GraphDistance &t1, GraphDistance &t2)
Definition: graph.h:160
QVector< QString > V_str
Definition: graph.h:127
QMap< QString, V_int > m_clustersByName
Definition: graph.h:1034
QMap< int, V_str > m_clusterPairNamesPerSeq
Definition: graph.h:1035
static const int GRAPH_CHANGED_MINOR_OPTIONS
Definition: graph.h:79
float edgeWeightTemp
Definition: graph.h:1049
int v1
Definition: graph.h:132
float sumSSC
Definition: graph.h:1069
int m_graphReciprocityPairsReciprocated
Definition: graph.h:1107
int m_vertexClicked
Definition: graph.h:1047
int minNodeSPC
Definition: graph.h:1083
int minNodePP
Definition: graph.h:1089
float sumSEVC
Definition: graph.h:1072
static const int MATRIX_DISTANCES_HAMMING
Definition: graph.h:109
bool calculatedGraphConnectedness
Definition: graph.h:1125
QThread wc_parserThread
Definition: graph.h:211
QPair< int, pair_f_b > pair_i_fb
Definition: graph.h:122
int minNodeIRCC
Definition: graph.h:1081
QMap< int, L_int > m_cliques
Definition: graph.h:1027
int m_graphConnectedness
Definition: graph.h:1111
QList< int > m_graphFileFormatExportSupported
Definition: graph.h:1010
float varianceSBC
Definition: graph.h:1053
Matrix XSM
Definition: graph.h:1038
static const int EDGE_UNDIRECTED
Definition: graph.h:51
static const int MATRIX_DISTANCES_MANHATTAN
Definition: graph.h:107
static const int MATRIX_ADJACENCY
Definition: graph.h:97
int m_graphReciprocityTiesReciprocated
Definition: graph.h:1104
QList< float > m_clusteringLevel
Definition: graph.h:1030
float m_graphDensity
Definition: graph.h:1102
static const int GRAPH_CHANGED_VERTICES_AND_EDGES
Definition: graph.h:85
static const int MATRIX_ADJACENCY_INVERSE
Definition: graph.h:101
static const int MATRIX_ADJACENCY_TRANSPOSE
Definition: graph.h:104
bool calculatedEdges
Definition: graph.h:1115
int initVertexNumberDistance
Definition: graph.h:1098
The Parser class Main class for network file parsing and loading Supports GraphML, Pajek, Adjacency, Graphviz, UCINET, EdgeLists etc.
Definition: parser.h:78
QMap< int, V_int > m_clustersPerSequence
Definition: graph.h:1031
static const int INDEX_PRP
Definition: graph.h:75
float varianceEVC
Definition: graph.h:1058
bool calculatedEVC
Definition: graph.h:1119
static const int GRAPH_CHANGED_POSITIONS
Definition: graph.h:82
QHash< int, int > m_vertexPairsUnilaterallyConnected
Definition: graph.h:1025
Definition: graphvertex.h:62
static const int METRIC_SIMPLE_MATCHING
Definition: matrix.h:51
QList< GraphVertex * > VList
Definition: graph.h:113
bool m_undirected
Definition: graph.h:1126