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. More...

#include <graph.h>

+ Inheritance diagram for Graph:
+ Collaboration diagram for Graph:

Public Types

enum  GraphChange {
  ChangedNone = 0, ChangedMinorOptions = 1, ChangedVerticesMetadata = 2, ChangedEdgesMetadata = 3,
  ChangedPositions = 4, ChangedMajor = 10, ChangedVertices = 11, ChangedEdges = 12,
  ChangedVerticesEdges = 13, ChangedNew = 14
}
 
enum  Clustering { Single_Linkage = 0, Complete_Linkage = 1, Average_Linkage = 2 }
 

Public Slots

int relationCurrent ()
 Returns current relation number. More...
 
QString relationCurrentName () const
 Returns current relation. More...
 
void relationCurrentRename (const QString &newName, const bool &notifyMW=false)
 Graph::relationCurrentRename. More...
 
void vertexCreate (const int &number, const int &size, const QString &color, const QString &numColor, const int &numSize, const QString &label, const QString &labelColor, const int &labelSize, const QPointF &p, const QString &shape, const QString &iconPath=QString(), const bool &signalMW=false)
 Creates a new vertex Main vertex creation slot, associated with homonymous signal from Parser. Adds a vertex to the Graph and signals drawNode to GW The new vertex has number num and specific color, label, label color, shape and position p. More...
 
void graphFileLoaded (const int &fileType, const QString &fName=QString(), const QString &netName=QString(), const int &totalNodes=0, const int &totalLinks=0, const int &edgeDirType=0, const QString &message=QString())
 Updates MW with the loaded file type (0=nofile, 1=Pajek, 2=Adjacency etc) Called from Parser on file parsing end or file error. More...
 
void vertexRemoveDummyNode (int)
 Deletes any dymmy nodes This is called from loadPajek method of Parser in order to delete any redundant (dummy) nodes. More...
 
void graphLoadedTerminateParserThreads (QString reason)
 Graph::graphLoadedTerminateParserThreads. More...
 
void graphSelectionChanged (const QList< int > selectedVertices, const QList< SelectedEdge > selectedEdges)
 Gets updates on the user-selected vertices and edges from GW and emits their counts to MW. More...
 
void edgeCreate (const int &v1, const int &v2, const qreal &weight, const QString &color, const int &type=0, const bool &drawArrows=true, const bool &bezier=false, const QString &label=QString(), const bool &signalMW=true)
 Checks a) if edge exists and b) if the opposite edge exists Calls edgeAdd to add the new edge to the Graph, then emits drawEdge() which calls GW::drawEdge() to draw the new edge. Called from homonymous signal of Parser class. Also called from MW when user clicks on the "add link" button Also called (via MW) from GW when user middle-clicks on two nodes. More...
 
void edgeCreateWebCrawler (const int &source, const int &target)
 Called from WebCrawler when it finds an new link Calls edgeCreate() method with initEdgeColor. More...
 
void edgeVisibilitySet (int relation, int, int, bool)
 Changes the canvas visibility of an edge Called from GraphVertex::edgeFilterByRelation GraphVertex::edgeFilterByWeight GraphVertex::setOutEdgeEnabled GraphVertex::edgeFilterUnilateral. More...
 
void vertexCreateAtPos (const QPointF &p)
 Create a new vertex a a giver position Called from GW, with i and p as parameters. Calls the main creation slot with init node values. More...
 
void vertexCreateAtPosRandom (const bool &signalMW=false)
 Graph::vertexCreateAtPosRandom. More...
 
void vertexCreateAtPosRandomWithLabel (const int &i, const QString &label, const bool &signalMW=false)
 Graph::vertexCreateAtPosRandomWithLabel. More...
 
void relationSet (int relNum=RAND_MAX, const bool notifyMW=true)
 Changes m_curRelation to relNum. If relNum==RAND_MAX, changes to last added relation. Then calls GraphVertex::relationSet() for all enabled vertices, to disable edges of the old relation and enable edges of the new relation Then, if notifyMW==TRUE, it signals signalRelationChangedToGW(int), which disables/enables the on screen edges, and Called from MW when the user selects a relation in the combo box. Also called from Parser. More...
 
void relationNext ()
 Graph::slotEditRelationNext Increases the rel number of editRelationChangeCombo which signals to Graph::relationSet() More...
 
void relationPrev ()
 Graph::slotEditRelationPrev Decreases the rel number of editRelationChangeCombo which signals to Graph::relationSet() More...
 
void canvasSizeSet (const int w, const int h)
 Called on MW resizing to update node positions and canvasWidth and canvasHeight. More...
 
double canvasMaxRadius () const
 Graph::canvasMaxRadius. More...
 
qreal canvasMinDimension () const
 Graph::canvasMinDimension. More...
 
double canvasVisibleX (const double &x) const
 Graph::canvasVisibleX. More...
 
double canvasVisibleY (const double &y) const
 Graph::canvasVisibleY. More...
 
double canvasRandomX () const
 Graph::canvasRandomX. More...
 
double canvasRandomY () const
 Graph::canvasRandomY. More...
 
void vertexIsolatedAllToggle (const bool &toggle)
 Called from MainWindow to enable/disable isolate vertices (with no links) For each isolate vertex in the Graph, emits the setVertexVisibility signal. More...
 
void vertexClickedSet (const int &v)
 Called from GW::userClickedNode(int) to update clicked vertex number and signal signalNodeClickedInfo(node info) to MW which shows node info on the status bar. More...
 
void edgeClickedSet (const int &v1, const int &v2, const bool &openMenu=false)
 Called from GW::edgeClicked() which is emitted when the user clicks on an edge. Parameters are the source and target node of the edge. It emits signalEdgeClicked() to MW, which displays a relevant message on the status bar. More...
 
void edgeFilterByWeight (qreal, bool)
 Called from MW::DialogEdgeFilter to filter edges over or under a specified weight (m_threshold). For each vertex in the Graph, calls the homonymous method of GraphVertex class. More...
 
void edgeFilterByRelation (int relation, bool status)
 Enables or disables all edges of a given relation Calls the homonymous method of GraphVertex class. More...
 
void edgeFilterUnilateral (const bool &toggle)
 Enables or disables unilateral edges in current relationship. If toggle=true, all non-reciprocal edges are disabled, effectively making the network symmetric. More...
 
void webCrawl (const QString &seedUrl, const QStringList &urlPatternsIncluded, const QStringList &urlPatternsExcluded, const QStringList &linkClasses, const int &maxNodes, const int &maxLinksPerPage, const bool &intLinks, const bool &childLinks, const bool &parentLinks, const bool &selfLinks, const bool &extLinksIncluded, const bool &extLinksCrawl, const bool &socialLinks, const bool &delayedRequests)
 Called by MW to start a web crawler thread... More...
 
QString htmlEscaped (QString str) const
 Helper method, returns a nice qstring where all html special chars are encoded. More...
 

Signals

void signalProgressBoxCreate (const int max=0, const QString msg="Please wait")
 
void signalProgressBoxKill (const int max=0)
 
void signalProgressBoxUpdate (const int &count=0)
 
void signalGraphSavedStatus (const int &status)
 
void signalGraphModified (const bool &undirected, const int &vertices, const int &edges, const qreal &density)
 
void signalGraphLoaded (const int &fileType, const QString &fileName=QString(), const QString &netName=QString(), const int &totalNodes=0, const int &totalLinks=0, const QString &message=QString())
 
void statusMessage (const QString &message)
 
void signalDatasetDescription (QString)
 
void signalNodeClickedInfo (const int &number=0, const QPointF &p=QPointF(), const QString &label=QString(), const int &inDegree=0, const int &outDegree=0, const qreal &clc=0)
 
void signalEdgeClicked (const MyEdge &edge=MyEdge(), const bool &openMenu=false)
 
void signalRelationAddToMW (const QString &newRelation, const bool &changeRelation=true)
 
void signalRelationsClear ()
 
void signalRelationRenamedToMW (const QString newRelName)
 
void signalRelationChangedToGW (int)
 
void signalRelationChangedToMW (const int &relIndex=RAND_MAX)
 
void signalSelectionChanged (const int &selectedVertices, const int &selectedEdges)
 
void signalPromininenceDistributionChartUpdate (QAbstractSeries *series, QAbstractAxis *axisX=Q_NULLPTR, const qreal &min=0, const qreal &max=0, QAbstractAxis *axisY=Q_NULLPTR, const qreal &minF=0, const qreal &maxF=0)
 
void signalDrawNode (const QPointF &p, const int &num, const int &size, const QString &nodeShape, const QString &nodeIconPath, const QString &nodeColor, const QString &numberColor, const int &numSize, const int &numDistance, const QString &label, const QString &labelColor, const int &labelSize, const int &labelDistance)
 
void signalRemoveNode (int)
 
void signalDrawEdge (const int &v1, const int &v2, const qreal &weight, const QString &label="", const QString &color="black", const int &type=0, const bool &drawArrows=true, const bool &bezier=false, const bool &weightNumbers=false)
 
void signalRemoveEdge (const int &v1, const int &v2, const bool &removeOpposite)
 
void setEdgeVisibility (int, int, int, bool)
 
void setVertexVisibility (int, bool)
 
void setNodePos (const int &, const qreal &, const qreal &)
 
void signalNodesFound (const QList< int > foundList)
 
void setNodeSize (const int &v, const int &size)
 
void setNodeShape (const int &v, const QString &shape, const QString &iconPath=QString())
 
void setNodeColor (const int &v, const QString &color)
 
void setNodeLabel (const int &v, const QString &label)
 
void setNodeNumberColor (const int &v, const QString &color)
 
void setNodeNumberSize (const int &v, const int &size)
 
void setNodeNumberDistance (const int &v, const int &distance)
 
void setNodeLabelSize (const int &v, const int &size)
 
void setNodeLabelColor (const int &v, const QString &color)
 
void setNodeLabelDistance (const int &v, const int &distance)
 
void setEdgeWeight (const int &v1, const int &v2, const qreal &weight)
 
void signalEdgeType (const int &v1, const int &v2, const int &type)
 
void setEdgeColor (const int &v1, const int &v2, const QString &color)
 
void setEdgeLabel (const int &v1, const int &v2, const QString &label)
 
void addGuideCircle (const double &, const double &, const double &)
 
void addGuideHLine (const double &y0)
 
void operateSpider ()
 

Public Member Functions

 Graph (GraphicsWidget *graphicsWidget)
 Graph::Graph constructor. More...
 
void initSignalSlots ()
 
void clear (const QString &reason="")
 
 ~Graph ()
 Graph::~Graph. More...
 
void setSocNetV_Version (QString ver)
 
GraphicsWidgetcanvas ()
 
QString graphName () const
 Graph::graphName If m_graphName is set on file loading, it returns that. If m_graphName is empty, then returns current relation name If m_graphName is empty and there is no current relation name, then returns "noname". More...
 
void graphLoad (const QString m_fileName, const QString m_codecName, const int format, const int two_sm_mode, const QString delimiter=QString())
 Graph::graphLoad Our almost universal network loader. :) It creates a new Parser object, moves it to a another thread, connects signals and slots and calls its run() method. More...
 
void graphSave (const QString &fileName, const int &fileType, const bool &saveEdgeWeights=true)
 Our almost universal graph saving method. :) Actually it just checks the requested file type and calls the corresponding saveGraphTo...() method. More...
 
bool graphSaveToPajekFormat (const QString &fileName, QString networkName="", int maxWidth=0, int maxHeight=0)
 
bool graphSaveToAdjacencyFormat (const QString &fileName, const bool &saveEdgeWeights=true)
 Graph::graphSaveToAdjacencyFormat. More...
 
bool graphSaveToGraphMLFormat (const QString &fileName, QString networkName="", int maxWidth=0, int maxHeight=0)
 Saves the current graph to fileName in GraphML format. More...
 
bool graphSaveToDotFormat (QString fileName)
 
int graphFileFormat () const
 Returns the format of the last file opened. More...
 
bool graphFileFormatExportSupported (const int &fileFormat) const
 Returns true if the fileFormat is supported for saving. More...
 
QString graphMatrixTypeToString (const int &matrixType) const
 Helper method, return the human readable name of matrix type. More...
 
int graphMatrixStrToType (const QString &matrix) const
 Helper method, return the matrix type of human readable matrix name . More...
 
QString graphMetricTypeToString (const int &metricType) const
 Helper method, return the human readable name of metric type. More...
 
int graphMetricStrToType (const QString &metricStr) const
 Helper method, return the identifier of a metric. More...
 
QString graphClusteringMethodTypeToString (const int &methodType) const
 Helper method, return the human readable name of clustering method type. More...
 
int graphClusteringMethodStrToType (const QString &method) const
 Helper method, return clustering method type from the human readable name of it. More...
 
int relations ()
 Graph::relations. More...
 
void relationsClear ()
 Graph::relationsClear. More...
 
void relationAdd (const QString &relName, const bool &changeRelation=false)
 Graph::relationAdd Adds a new relation named relName Called by file parser to add a new relation Also called from MW. emits signalRelationAddToMW. More...
 
int vertexNumberMax ()
 Graph::vertexNumberMax Returns the name of the last vertex. Used by slotEditNodeRemove of MW. More...
 
int vertexNumberMin ()
 Graph::vertexNumberMin Returns the name of the first vertex. Used by slotRemoveNode of MW. More...
 
int vertexDegreeOut (int)
 Returns the outDegree (sum of outbound edge weights) of vertex v1. More...
 
int vertexDegreeIn (int)
 Returns the inDegree (sum of inbound edge weights) of vertex v1. More...
 
QList< int > vertexNeighborhoodList (const int &v1)
 Returns a list of all vertices mutually connected to vertex v1 in the current relation. More...
 
bool vertexIsolated (const int &v1) const
 Checks if vertex is isolated. More...
 
int vertexExists (const int &v1)
 Graph::vertexExists Checks if there is a specific vertex in the graph. Returns the vpos or -1 Complexity: O(logN) for vpos retrieval. More...
 
int vertexExists (const QString &label)
 Checks if there is a vertex with a specific label in the graph Returns the vpos or -1 Complexity: O(N) More...
 
bool vertexFindByNumber (const QStringList &numList)
 Finds vertices in strList by their number. More...
 
bool vertexFindByLabel (const QStringList &labelList)
 Finds vertices by their label. More...
 
bool vertexFindByIndexScore (const int &index, const QStringList &thresholds)
 Finds vertices by their index score. More...
 
void vertexRemove (const int &v1)
 Removes the vertex v1 from the graph First, it removes all edges to doomed from other vertices Then it changes the vpos of all subsequent vertices inside m_graph Finally, it removes the vertex. More...
 
void vertexSizeInit (const int)
 Graph::vertexSizeInit Initialization function. More...
 
void vertexSizeSet (const int &v, const int &newsize)
 Changes the size.of a vertex v or all vertices if v=0 Called from MW (i.e. user changing node properties) More...
 
int vertexSize (const int &v) const
 Returns the size of vertex v. More...
 
void vertexShapeSetDefault (const QString, const QString &iconPath=QString())
 Sets the default vertex shape and iconPath Called by MW::initApp() More...
 
void vertexShapeSet (const int &v, const QString &shape, const QString &iconPath=QString())
 Changes the shape and iconPath of vertex v1, or all vertices if v1=-1. More...
 
QString vertexShape (const int &v)
 Returns the shape of this vertex. More...
 
QString vertexShapeIconPath (const int &v)
 Returns the IconPath of vertex v1. More...
 
bool graphHasVertexCustomIcons () const
 
void vertexColorInit (const QString &color)
 Graph::vertexColorInit default vertex color initialization. More...
 
void vertexColorSet (const int &v, const QString &color)
 Changes the color of vertex v1. More...
 
QColor vertexColor (const int &v) const
 Graph::vertexColor. More...
 
void vertexNumberColorInit (const QString &color)
 Changes the initial color of the vertex numbers. More...
 
void vertexNumberColorSet (const int &v=0, const QString &color="#000000")
 Graph::vertexColorSet Changes the color of vertex v1. More...
 
void vertexNumberSizeInit (const int &size)
 Changes the initial size of vertex numbers. More...
 
void vertexNumberSizeSet (const int &v, const int &newsize)
 Changes the size of vertex v number. More...
 
void vertexNumberDistanceInit (const int &distance)
 Changes the initial distance of vertex numbers. More...
 
void vertexNumberDistanceSet (const int &v, const int &newDistance)
 Changes the distance.of vertex v number from the vertex. More...
 
void vertexLabelSet (const int &v, const QString &label)
 Changes the label of a vertex v1. More...
 
QString vertexLabel (const int &v) const
 Returns the label of a vertex v1. More...
 
void vertexLabelsVisibilitySet (bool toggle)
 
void vertexLabelSizeInit (int newSize)
 Graph::vertexLabelSizeInit Changes the default size of vertex labels. More...
 
void vertexLabelSizeSet (const int &v, const int &labelSize)
 Changes the label size of vertex v1 or all vertices if v1=0. More...
 
void vertexLabelColorInit (QString color)
 Graph::vertexLabelColorInit Changes the default vertex label color. More...
 
void vertexLabelColorSet (const int &v1, const QString &color)
 Changes the label color of vertex v1 or all vertices if v1 = 0. More...
 
void vertexLabelDistanceInit (const int &distance)
 Changes the default distance of vertex labels. More...
 
void vertexLabelDistanceSet (const int &v, const int &newDistance)
 Changes the distance.of vertex v label from the vertex. More...
 
void vertexLabelDistanceAllSet (const int &newDistance)
 Changes the distance.of all vertex labels from their vertices. More...
 
void vertexPosSet (const int &v, const int &x, const int &y)
 Graph::vertexPosSet Called from MW/GW when node moves to update its position. More...
 
QPointF vertexPos (const int &v1) const
 Graph::vertexPos. More...
 
int vertexClicked () const
 Graph::vertexClicked. More...
 
int vertices (const bool &dropIsolates=false, const bool &countAll=false, const bool &recount=false)
 Returns the set of all vertices mutually connected to vertex v1 in the current relation. More...
 
int vertexEdgesOutbound (int i)
 Returns the number of outbound edges (arcs) from vertex v1. More...
 
int vertexEdgesInbound (int i)
 Returns the number of inbound edges (arcs) to vertex v1. More...
 
int verticesWithOutboundEdges ()
 Returns the sum of vertices having edgesOutbound. More...
 
int verticesWithInboundEdges ()
 Returns the sum of vertices having edgesInbound. More...
 
int verticesWithReciprocalEdges ()
 Returns the sum of vertices having reciprocal edges. More...
 
QList< int > verticesListIsolated ()
 Returns a list of all isolated vertices inside the graph Used by Graph::graphMatrixAdjacencyCreate() Graph::writeMatrixAdjacencyInvert() Graph::centralityInformation() More...
 
QList< int > verticesList ()
 Returns a list of all vertices numbers inside the graph. More...
 
QSet< int > verticesSet ()
 Returns a QSet of all vertices numbers inside the graph. More...
 
void verticesCreateSubgraph (QList< int > vList, const int &type=SUBGRAPH_CLIQUE, const int &center=0)
 Creates a subgraph (clique, star, cycle, line) with vertices in vList Iff vList is empty, then fallbacks to the m_verticesSelected. More...
 
int edgesEnabled ()
 Returns the number |E| of graph - only the enabled edges. More...
 
MyEdge edgeClicked ()
 Returns clicked edge. More...
 
qreal edgeExists (const int &v1, const int &v2, const bool &checkReciprocal=false)
 Checks if there is an edge (arc) from v1 to v2 Complexity: O(logN) for vpos retrieval + O(1) for QList index retrieval + O(logN) for checking edge(v2) More...
 
void edgeRemove (const int &v1, const int &v2, const bool &removeOpposite=false)
 Removes the directed arc v1 -> v2 or, if the graph is undirected, the edge v1 <-> v2 Emits signalRemoveEdge to GW to delete the graphics item. More...
 
void edgeRemoveSelected (SelectedEdge &selectedEdge, const bool &removeOpposite)
 Removes a SelectedEdge. More...
 
void edgeRemoveSelectedAll ()
 Removes all selected edges. More...
 
bool edgeSymmetric (const int &v1, const int &v2)
 Returns TRUE if edge(v1, v2) is symmetric, i.e. (v1,v2) == (v2,v1). More...
 
void edgeTypeSet (const int &v1, const int &v2, const qreal &w, const int &dirType=EdgeType::Directed)
 Changes the direction type of an existing edge Mainly called from Graph::verticesCreateSubgraph() Also called from graphUndirectedSet. More...
 
void edgeWeightSet (const int &v1, const int &v2, const qreal &w, const bool &undirected=false)
 Changes the weight of an edge (arc) between v1 and v2. More...
 
qreal edgeWeight (const int &v1, const int &v2) const
 Returns the weight of the edge v1 -> v2. More...
 
void edgeWeightNumbersVisibilitySet (const bool &toggle)
 Changes the visibility of edge weight numbers. More...
 
void edgeLabelSet (const int &v1, const int &v2, const QString &label)
 Changes the label of edge v1 -> v2. More...
 
QString edgeLabel (const int &v1, const int &v2) const
 Returns the label of edge v1->v2. More...
 
void edgeLabelsVisibilitySet (const bool &toggle)
 Toggles the visibility of edge labels. More...
 
void edgeColorInit (const QString &)
 Saves the default edge color Used by random network creation methods. More...
 
void edgeColorSet (const int &v1, const int &v2, const QString &color)
 Changes the color of edge v1 -> v2. More...
 
QString edgeColor (const int &v1, const int &v2)
 Returns the color of the directed edge v1 -> v2. More...
 
bool edgeColorAllSet (const QString &color, const int &threshold=RAND_MAX)
 Changes the color of all enabled edges. More...
 
void graphSetModified (const int &graphNewStatus, const bool &signalMW=true)
 Sets the graph modification status. If there are major changes, then signalGraphModified is emitted In any case, SignalGraphSavedStatus is emitted. More...
 
bool graphIsModified () const
 Returns true of graph is modified (edges/vertices added/removed). else false. More...
 
bool graphSaved () const
 Returns true if the graph is saved. More...
 
bool graphLoaded () const
 Returns if a graph has been loaded from a file. More...
 
QList< int > graphSelectedVertices () const
 Returns a QList of user-selected vertices. More...
 
int graphSelectedVerticesCount () const
 Returns count of user-selected vertices. More...
 
int graphSelectedVerticesMin () const
 Returns min of user-selected vertices. More...
 
int graphSelectedVerticesMax () const
 Returns max of user-selected vertices. More...
 
QList< SelectedEdgegraphSelectedEdges () const
 Returns a QList of user-selected edges in pair<int,int> More...
 
int graphSelectedEdgesCount () const
 Returns the count of user-selected edges. More...
 
int graphGeodesics ()
 Returns the number of geodesics (shortest-paths) in the graph. More...
 
qreal graphDensity ()
 Returns the ratio of present edges to total possible edges in the current relation. More...
 
bool graphIsWeighted ()
 Returns true if the graph is weighted (valued), i.e. if any e in |E| has value not 0 or 1 Complexity: O(n^2) More...
 
void graphSetWeighted (const bool &toggle=true)
 Sets the graph to be weighted / valued edges. More...
 
qreal graphReciprocity ()
 Computes and returns the arc reciprocity of the graph. Also computes the dyad reciprocity and fills parameters with values. More...
 
bool graphIsSymmetric ()
 Returns TRUE if the adjacency matrix of the current relation is symmetric. More...
 
void graphSymmetrize ()
 Transforms the graph to symmetric (all edges reciprocal) More...
 
void graphSymmetrizeStrongTies (const bool &allRelations=false)
 Creates a new symmetric relation by keeping only strong-ties (mutual links) in the current relation. In the new relation, two actors are connected only if they are mutually connected in the current relation. More...
 
void graphCocitation ()
 Creates a new symmetric relation by connecting those actors that are cocitated by others. In the new relation, an edge will exist between actor i and actor j only if C(i,j) > 0, where C the Cocitation Matrix. Thus the actor pairs cited by more common neighbors will appear with a stronger tie between them than pairs those cited by fewer common neighbors. The resulting relation is symmetric. More...
 
void graphDichotomization (const qreal threshold)
 Creates a new binary relation in a valued network using edge dichotomization according to the threshold parameter. More...
 
void graphSetDirected (const bool &toggle=true, const bool &signalMW=true)
 Toggles the graph directed or undirected. More...
 
void graphSetUndirected (const bool &toggle=true, const bool &signalMW=true)
 Toggles the graph undirected. More...
 
bool graphIsDirected ()
 Returns true if graph is directed. More...
 
bool graphIsUndirected ()
 Returns true if graph is undirected. More...
 
bool graphIsConnected ()
 Checks if the graph is connected, in the sense of a topological space, i.e., there is a path from any vertex to any other vertex in the graph. Called from MW::slotConnectedness() More...
 
void graphMatrixAdjacencyCreate (const bool dropIsolates=false, const bool considerWeights=true, const bool inverseWeights=false, const bool symmetrize=false)
 Creates an adjacency matrix AM where AM(i,j)=1 if i is connected to j and AM(i,j)=0 if i not connected to j Used in Graph::centralityInformation(), Graph::graphWalksMatrixCreate and Graph::graphMatrixAdjacencyInvert() More...
 
bool graphMatrixAdjacencyInvert (const QString &method="lu")
 
void graphMatrixSimilarityMatchingCreate (Matrix &AM, Matrix &SEM, const int &measure=METRIC_SIMPLE_MATCHING, const QString &varLocation="Rows", const bool &diagonal=false, const bool &considerWeights=true)
 Calls Matrix:similarityMatrix to compute the similarity matrix SCM of the variables (rows, columns, both) in given input matrix using the selected matching measure. More...
 
void graphMatrixSimilarityPearsonCreate (Matrix &AM, Matrix &PCC, const QString &varLocation="Rows", const bool &diagonal=false)
 The Pearson product-moment correlation coefficient (PPMCC, PCC or Pearson's r) is a measure of the linear dependence between two variables X and Y. More...
 
void graphMatrixDissimilaritiesCreate (Matrix &INPUT_MATRIX, Matrix &DSM, const int &metric, const QString &varLocation, const bool &diagonal, const bool &considerWeights)
 Calls Matrix:distancesMatrix to compute the dissimilarities matrix DSM of the variables (rows, columns, both) in given input matrix using the user defined metric. More...
 
void setReportsDataDir (const QString &reportsDir)
 Sets the directory where reports are saved This is used when exporting prominence distribution images to be used in HTML reports. More...
 
void setReportsRealNumberPrecision (const int &precision)
 Sets the precision (number of fraction digits) the app will use when writing real numbers in reports. More...
 
void setReportsLabelLength (const int &length)
 Sets the length of labels in reports. More...
 
void setReportsChartType (const int &type)
 Sets the chart type in reports. More...
 
void writeDataSetToFile (const QString dir, const QString)
 Writes a "famous" dataset to the given file Datasets are hardcoded! They are exported in the given fileName... More...
 
void writeMatrixAdjacencyTo (QTextStream &os, const bool &saveEdgeWeights=true)
 
void writeReciprocity (const QString fileName, const bool considerWeights=false)
 Writes reciprocity report to filename. More...
 
void writeMatrix (const QString &fileName, const int &matrix=MATRIX_ADJACENCY, const bool &considerWeights=true, const bool &inverseWeights=false, const bool &dropIsolates=false, const QString &varLocation="Rows", const bool &simpler=false)
 
void writeMatrixHTMLTable (QTextStream &outText, Matrix &M, const bool &markDiag=true, const bool &plain=false, const bool &printInfinity=true, const bool &dropIsolates=false)
 Writes the matrix M as HTML. More...
 
void writeMatrixAdjacency (const QString fileName, const bool &markDiag=true)
 
void writeMatrixAdjacencyPlot (const QString fileName, const bool &simpler=false)
 
void writeMatrixAdjacencyInvert (const QString &filename, const QString &method)
 Calls Graph::graphMatrixAdjacencyInvert(method) to compute the inverse of the adjacency matrix and writes it to file fn in HTML notation. More...
 
void writeMatrixLaplacianPlainText (const QString &filename)
 Computes the Laplacian matrix of the graph and writes it to given file. More...
 
void writeMatrixDegreeText (const QString &filename)
 Computes the Degree matrix of the graph and writes it to given file. More...
 
void writeMatrixDistancesPlainText (const QString &fn, const bool &considerWeights, const bool &inverseWeights, const bool &dropIsolates)
 Graph::writeMatrixDistancesPlainText Writes the matrix of distances to a file. More...
 
void writeMatrixShortestPathsPlainText (const QString &fn, const bool &considerWeights, const bool &inverseWeights)
 Writes the shortest paths matrix to a file Each SIGMA(i,j) element is the number of shortest paths (geodesics) from i and j. More...
 
void writeMatrixDissimilarities (const QString fileName, const QString &metricStr, const QString &varLocation, const bool &diagonal, const bool &considerWeights)
 Writes dissimilarity matrix based on a metric/measure to given html file. More...
 
void writeMatrixSimilarityMatchingPlain (const QString fileName, const int &measure=METRIC_SIMPLE_MATCHING, const QString &matrix="adjacency", const QString &varLocation="rows", const bool &diagonal=false, const bool &considerWeights=true)
 Writes similarity matrix based on a matching measure to given file. More...
 
void writeMatrixSimilarityMatching (const QString fileName, const QString &measure="Simple", const QString &matrix="adjacency", const QString &varLocation="rows", const bool &diagonal=false, const bool &considerWeights=true)
 Writes similarity matrix based on a matching measure to given html file. More...
 
void writeMatrixSimilarityPearson (const QString fileName, const bool considerWeights, const QString &matrix="adjacency", const QString &varLocation="rows", const bool &diagonal=false)
 Calls Graph::graphMatrixSimilarityPearsonCreate() and writes Pearson Correlation Coefficients to given file. More...
 
void writeMatrixSimilarityPearsonPlainText (const QString fileName, const bool considerWeights, const QString &matrix="adjacency", const QString &varLocation="rows", const bool &diagonal=false)
 Calls Graph::graphSimilariyPearsonCorrelationCoefficients() and writes Pearson Correlation Coefficients to given file. More...
 
void writeEccentricity (const QString fileName, const bool considerWeights=false, const bool inverseWeights=false, const bool dropIsolates=false)
 Writes the Eccentricity scores to file. More...
 
void writeCentralityDegree (const QString, const bool weights, const bool dropIsolates)
 Writes the Degree Centrality to a file. More...
 
void writeCentralityCloseness (const QString, const bool weights, const bool inverseWeights, const bool dropIsolates)
 Writes the closeness centralities to a file. More...
 
void writeCentralityClosenessInfluenceRange (const QString, const bool weights, const bool inverseWeights, const bool dropIsolates)
 Writes the "improved" closeness centrality indices to a file. More...
 
void writeCentralityBetweenness (const QString, const bool weights, const bool inverseWeights, const bool dropIsolates)
 Writes Betweenness centralities to file. More...
 
void writeCentralityPower (const QString, const bool weigths, const bool inverseWeights, const bool dropIsolates)
 Writes Power Centralities to a file. More...
 
void writeCentralityStress (const QString, const bool weigths, const bool inverseWeights, const bool dropIsolates)
 Writes the Stress centralities to a file. More...
 
void writeCentralityEccentricity (const QString, const bool weigths, const bool inverseWeights, const bool dropIsolates)
 Writes the Eccentricity centralities (aka Harary Graph Centrality) to a file. More...
 
void writeCentralityInformation (const QString, const bool weigths, const bool inverseWeights)
 Writes the information centralities to file. More...
 
void writeCentralityEigenvector (const QString, const bool &weigths=true, const bool &inverseWeights=false, const bool &dropIsolates=false)
 Writes the eigenvector centralities to a file. More...
 
void writePrestigeDegree (const QString, const bool weights, const bool dropIsolates)
 Writes the Degree Prestige of each node to a file. More...
 
void writePrestigeProximity (const QString, const bool weights, const bool inverseWeights, const bool dropIsolates)
 Graph::writePrestigeProximity Writes the proximity prestige indices to a file. More...
 
void writePrestigePageRank (const QString, const bool Isolates=false)
 Writes the PageRank scores of vertices to a file. More...
 
bool writeClusteringHierarchical (const QString &fileName, const QString &varLocation, const QString &matrix="Adjacency", const QString &metric="Manhattan", const QString &method="Complete", const bool &diagonal=false, const bool &dendrogram=false, const bool &considerWeights=true, const bool &inverseWeights=false, const bool &dropIsolates=false)
 Writes Hierarchical Clustering Analysis to a given file. More...
 
void writeClusteringHierarchicalResultsToStream (QTextStream &outText, const int N, const bool &dendrogram=false)
 Writes Hierarchical Clustering results to given output stream Before running this methos, the method Graph::graphClusteringHierarchical() must execute and return true. Otherwise, the result is unpredictable... More...
 
bool writeCliqueCensus (const QString &fileName, const bool considerWeights)
 Graph::writeCliqueCensus Calls graphCliques() to compute all cliques (maximal connected subgraphs) of the network. Then writes the results into a file, along with the Actor by clique analysis, the Co-membership matrix and the Hierarchical clustering of overlap matrix. More...
 
void writeClusteringCoefficient (const QString, const bool)
 Graph::writeClusteringCoefficient Writes the clustering coefficients to a file. More...
 
void writeTriadCensus (const QString, const bool)
 
int graphConnectednessFull (const bool updateProgress=false)
 
bool graphReachable (const int &v1, const int &v2)
 Returns true if vertices v1 and v2 are reachable. More...
 
void graphMatrixReachabilityCreate ()
 Creates the reachability matrix XRM. More...
 
int graphDiameter (const bool considerWeights, const bool inverseWeights)
 Returns the diameter of the graph, aka the largest geodesic distance between any two vertices. More...
 
int graphDistanceGeodesic (const int &v1, const int &v2, const bool &considerWeights=false, const bool &inverseWeights=true)
 Returns the geodesic distance (length of shortest path) from vertex v1 to vertex v2. More...
 
qreal graphDistanceGeodesicAverage (const bool considerWeights, const bool inverseWeights, const bool dropIsolates)
 Returns the average distance of the graph. More...
 
void graphDistancesGeodesic (const bool &computeCentralities=false, const bool &considerWeights=false, const bool &inverseWeights=true, const bool &dropIsolates=false)
 Computes the geodesic distances between all vertices: In the process, it also computes many other centrality/prestige metrics: More...
 
void graphMatrixDistanceGeodesicCreate (const bool &considerWeights=false, const bool &inverseWeights=true, const bool &dropIsolates=false)
 Creates the matrix DM of geodesic distances between vertices. More...
 
void graphMatrixShortestPathsCreate (const bool &considerWeights=false, const bool &inverseWeights=true, const bool &dropIsolates=false)
 Creates the matrix SIGMA of shortest paths (geodesics) between vertices Each SIGMA(i,j) is the number of shortest paths (geodesics) from i and j. More...
 
int getProminenceIndexByName (const QString &prominenceIndexName)
 Returns the IndexType of the given prominence index name Called from MW::slotEditNodeFind, MW::slotLayoutRadialByProminenceIndex etc. More...
 
void prominenceDistribution (const int &index, const ChartType &type, const QString &distImageFileName=QString())
 Computes the distribution of a centrality index score. The distribution is stored as Qt Series depending on the SeriesType parameter type It is send to MW through signal/slot. More...
 
void prominenceDistributionBars (const H_StrToInt &discreteClasses, const QString &name, const QString &distImageFileName)
 Computes the distribution of a centrality index scores. The distribution data are returned as QBarSeries series (with a QBarSet attached) to MW which in turn displays them on a Bar Chart. More...
 
void prominenceDistributionArea (const H_StrToInt &discreteClasses, const QString &name, const QString &distImageFileName)
 Computes the distribution of a centrality index scores. The distribution data are returned as QAreaSeries series to MW which in turn displays them on a Area Chart. More...
 
void prominenceDistributionSpline (const H_StrToInt &discreteClasses, const QString &seriesName, const QString &distImageFileName)
 Computes the distribution of a centrality index scores. The distribution data are returned as QSplineSeries series to MW which in turn displays them on a Spline Chart. More...
 
void centralityDegree (const bool &weights=true, const bool &dropIsolates=false)
 Calculates the degree (outDegree) centrality of each vertex - diagonal included. More...
 
void centralityInformation (const bool considerWeights=false, const bool inverseWeights=false)
 Computes the Information centrality of each vertex - diagonal included Note that there is no known generalization of Stephenson&Zelen's theory for information centrality to directional data. More...
 
void centralityEigenvector (const bool &considerWeights=false, const bool &inverseWeights=false, const bool &dropIsolates=false)
 Computes Eigenvector centrality. More...
 
void centralityClosenessIR (const bool considerWeights=false, const bool inverseWeights=false, const bool dropIsolates=false)
 Computes an "improved" closeness centrality index, IRCC, which can be used on disconnected graphs. IRCC is an improved node-level centrality closeness index which focuses on the influence range of each node (the set of nodes that are reachable from it) For each node v, this index calculates the fraction of nodes in its influence range and divides it by the average distance of those nodes from v, ignoring nodes that are not reachable from it. More...
 
void prestigeDegree (const bool &weights, const bool &dropIsolates=false)
 Computes the Degree Prestige (in-degree) of each vertex - diagonal included Also the mean value and the variance of the in-degrees. More...
 
void prestigePageRank (const bool &dropIsolates=false)
 Calculates the PageRank Prestige of each vertex. More...
 
void prestigeProximity (const bool considerWeights=false, const bool inverseWeights=false, const bool dropIsolates=false)
 Computes Proximity Prestige of each vertex Also the mean value and the variance of it.. More...
 
int walksBetween (int v1, int v2, int length)
 Calculates and returns the number of walks of a given length between v1 and v2. More...
 
void graphWalksMatrixCreate (const int &N=0, const int &length=0, const bool &updateProgress=false)
 Computes either the "Walks of given length" or the "Total Walks" matrix. If length>0, it computes the Walks of given length matrix, XM=AM^l where each element (i,j) denotes the number of walks of length l between vertex i and j. If length=0, it computes the Total Walks matrix, XSM=Sum{AM^n} where each (i,j) denotes the total number of walks of any length between vertices i and j. NOTE: In the latter case, this function is VERY SLOW on large networks (n>50), since it will calculate all powers of the sociomatrix up to n-1 in order to find out all possible walks. More...
 
void writeWalksTotalMatrixPlainText (const QString &fn)
 Graph::writeWalksTotalMatrixPlainText Writes the total number of walks matrix. More...
 
void writeWalksOfLengthMatrixPlainText (const QString &fn, const int &length)
 Graph::writeWalksOfLengthMatrixPlainText. More...
 
void writeMatrixWalks (const QString &fn, const int &length=0, const bool &simpler=false)
 Calls graphWalksMatrixCreate() to compute walks and writes the Walks of given length matrix to a file in HTML. If length = 0, it writes the Total Walks matrix. More...
 
QList< int > vertexinfluenceRange (int v1)
 Returns the influence range of vertex v1, namely the set of nodes who are reachable from v1 (See Wasserman and Faust, pp.200-201, based on Lin, 1976). The Influence Range of vertex v can also be defined as: Ji = Sum [ D(v,j), iff D(v,j) != inf ] for every j in V, where j!=v and D the distance matrix This function is for digraphs only. More...
 
QList< int > vertexinfluenceDomain (int v2)
 Returns the influence domain of vertex v1, namely the set of nodes who can reach v1 The Influence Domain Ii of vertex v can also be defined as: Ii = Sum [ D(i,v), iff D(i,v) != inf ] for every in V, where i!=v and D the distance matrix This function applies to digraphs only. More...
 
void writeReachabilityMatrixPlainText (const QString &fn, const bool &dropIsolates=false)
 
qreal numberOfTriples (int v1)
 
void graphCliques (QSet< int > R=QSet< int >(), QSet< int > P=QSet< int >(), QSet< int > X=QSet< int >())
 Finds all maximal cliques in an undirected (?) graph. Implements the Bron–Kerbosch algorithm, a recursive backtracking algorithm that searches for all maximal cliques in a given graph G. Given three sets R, P, and X, the algorithm finds the maximal cliques that include all of the vertices in R, some of the vertices in P, and none of the vertices in X. In each call to the algorithm, P and X are disjoint sets whose union consists of those vertices that form cliques when added to R. In other words, P ∪ X is the set of vertices which are joined to every element of R. When P and X are both empty there are no further elements that can be added to R, so R is a maximal clique and the algorithm outputs R. The recursion is initiated by setting R and X to be the empty set and P to be the vertex set of the graph. Within each recursive call, the algorithm considers the vertices in P in turn. if there are no vertices, it either reports R as a maximal clique (if X is empty), or backtracks. For each vertex v chosen from P, it makes a recursive call in which v is added to R and in which P and X are restricted to the neighbor set NBS(v) of v, which finds and reports all clique extensions of R that contain v. Then, it moves v from P to X to exclude it from consideration in future cliques and continues with the next vertex in P. More...
 
void graphCliqueAdd (const QList< int > &clique)
 Called from Graph::graphCliques to add a new clique (list of vertices) Adds clique info to each clique member and updates co-membership matrix CLQM . More...
 
int graphCliquesContaining (const int &actor, const int &size=0)
 
int graphCliquesOfSize (const int &size)
 Graph::graphCliquesOfSize Returns the number of maximal cliques of a given size. More...
 
bool graphClusteringHierarchical (Matrix &STR_EQUIV, const QString &varLocation, const int &metric, const int &method, const bool &diagonal=false, const bool &diagram=false, const bool &considerWeights=true, const bool &inverseWeights=false, const bool &dropIsolates=false)
 Performs an hierarchical clustering process (Johnson, 1967) on a given NxN distance/dissimilarity matrix. The input matrix can be the the adjacency matrix, the geodesic distance matrix or a derived from them dissimilarities matrix using a user-specified metric, i.e. euclidean distance. The method parameter defines how to compute distances (similarities) between a new cluster the old clusters. Valid values can be: More...
 
qreal clusteringCoefficientLocal (const int &v1)
 Graph::clusteringCoefficientLocal Returns the local clustering coefficient (CLUCOF) of a vertex v1 CLUCOF in a graph quantifies how close the vertex and its neighbors are to being a clique, a connected subgraph. This is used to determine whether a graph is a small-world network. More...
 
qreal clusteringCoefficient (const bool updateProgress=false)
 Computes local clustering coefficients and returns the network average Clustering Coefficient. More...
 
bool graphTriadCensus ()
 Graph::graphTriadCensus Conducts a triad census and updates QList::triadTypeFreqs, which is the list carrying all triad type frequencies Complexity:O(n!) More...
 
void triadType_examine_MAN_label (int, int, int, GraphVertex *, GraphVertex *, GraphVertex *)
 
void layoutRandom ()
 Repositions all nodes on random positions Emits setNodePos(i, x,y) to tell GW that the node item should be moved. More...
 
void layoutRadialRandom (const bool &guides=true)
 Repositions all nodes on the periphery of different circles with random radius. More...
 
void layoutCircular (const double &x0, const double &y0, const double &newRadius, const bool &guides=false)
 Repositions all nodes on the periphery of a circle with given radius. More...
 
void layoutByProminenceIndex (int prominenceIndex, int layoutType, const bool considerWeights=false, const bool inverseWeights=false, const bool dropIsolates=false)
 Applies a layout according to each actor's prominence index score. The layout type can be radial (0), level (1), node sizes (2) or node colors (3), as follows: layoutType=0 - Repositions all nodes on the periphery of concentric circles with radius analogous to their prominence index layoutType=1 - Repositions all nodes on different top-down levels according to their centrality layoutType=2 - Changes node sizes to be proportional to their prominence index score layoutType=2 - Changes node colors to reflect their prominence index score (from red to green) More...
 
void layoutVertexSizeByIndegree ()
 Convenience method Changes the size of all nodes to be proportional to their InDegree (Degree Prestige) Calls layoutByProminenceIndex. More...
 
void layoutVertexSizeByOutdegree ()
 Convenience method Changes the size of all nodes to be proportional to their outDegree (Degree Centrality) Calls layoutByProminenceIndex. More...
 
void layoutForceDirectedSpringEmbedder (const int maxIterations)
 Embeds a Force Directed Placement layout according to the initial Spring Embedder model proposed by Eades. More...
 
void layoutForceDirectedFruchtermanReingold (const int maxIterations)
 Embeds a Force Directed Placement layout according to the Fruchterman-Reingold model. Fruchterman and Reingold (1991) refined the Spring Embedder model by replacing the forces. In this model, "the vertices behave as atomic particles or celestial bodies, exerting attractive and repulsive forces on one another." (ibid). Again, only vertices that are neighbours attract each other but, unlike Spring Embedder, all vertices repel each other. These forces induce movement. The algorithm might resemble molecular or planetary simulations, sometimes called n-body problems. More...
 
void layoutForceDirectedKamadaKawai (const int maxIterations=500, const bool considerWeights=false, const bool inverseWeights=false, const bool dropIsolates=false, const QString &initialPositions="current")
 Embeds a Force Directed Placement layout according to the Kamada-Kawai model. In this model, the network is considered to be a dynamic system where every two actors are 'particles' mutually connected by a 'spring'. Each spring has a desirable length, which corresponds to their graph theoretic distance. In this way, the optimal layout of the graph is the state with the minimum imbalance. The degree of imbalance is formulated as the total spring energy: the square summation of the differences between desirable distances and real ones for all pairs of particles Initially, the particles/actors are placed on the vertices of a regular n-polygon. More...
 
qreal graphDistanceEuclidean (const QPointF &a, const QPointF &b)
 Computes the euclideian distance between QPointF a and b. More...
 
qreal graphDistanceEuclidean (const QPointF &a)
 the euclideian distance of QPointF a (where a is difference vector) More...
 
int sign (const qreal &D)
 Graph::sign returns the sign of number D as integer (1 or -1) More...
 
qreal layoutForceDirected_F_rep (const QString model, const qreal &dist, const qreal &optimalDistance)
 
qreal layoutForceDirected_F_att (const QString model, const qreal &dist, const qreal &optimalDistance)
 
void layoutForceDirected_Eades_moveNodes (const qreal &c4)
 
void layoutForceDirected_FR_moveNodes (const qreal &temperature)
 Graph::layoutForceDirected_FR_moveNodes. More...
 
qreal layoutForceDirected_FR_temperature (const int iteration) const
 Reduces the temperature as the layout approaches a better configuration. More...
 
qreal computeOptimalDistance (const int &V)
 Computes Optimal Distance. Used in Spring Embedder and FR algorithms. More...
 
void compute_angles (const QPointF &Delta, const qreal &dist, qreal &angle1, qreal &angle2, qreal &degrees1, qreal &degrees2)
 Graph::compute_angles Computes the two angles of the orthogonal triangle shaped by two points of difference vector DV and distance dist A = 90 B = angle1 C = angle2. More...
 
void webCrawlTerminateThreads (QString reason)
 called from Graph, when closing network, to terminate all processes Also called indirectly when wc_spider finishes More...
 
void randomizeThings ()
 Adds a little universal randomness :) More...
 
void randomNetErdosCreate (const int &N, const QString &model, const int &m, const qreal &p, const QString &mode, const bool &diag)
 Create an erdos-renyi random network according to the given model. More...
 
void randomNetScaleFreeCreate (const int &N, const int &power, const int &m0, const int &m, const qreal &alpha, const QString &mode)
 Creates a scale-free random-network network. More...
 
void randomNetSmallWorldCreate (const int &N, const int &degree, const double &beta, const QString &mode)
 Creates a small world random network. More...
 
void randomNetRingLatticeCreate (const int &N, const int &degree, const bool updateProgress=false)
 Creates a random ring lattice network. More...
 
void randomNetRegularCreate (const int &N, const int &degree, const QString &mode, const bool &diag)
 Creates a random network where nodes have the same degree. More...
 
void randomNetLatticeCreate (const int &N, const int &length, const int &dimension, const int &neighborhoodLength, const QString &mode, const bool &circular=false)
 Creates a lattice network. More...
 
int factorial (int)
 

Public Attributes

H_Int vpos
 
H_f_i sizeOfNthOrderNeighborhood
 

Private Member Functions

void edgeAdd (const int &v1, const int &v2, const qreal &weight, const int &type, const QString &label, const QString &color)
 Adds a directed edge from v1 to v2 If type == EdgeType::Undirected then it also adds the directed edge v2 -> v1. More...
 
void BFS (const int &s, const int &si, const bool &computeCentralities=false, const bool &dropIsolates=false)
 
void dijkstra (const int &s, const int &si, const bool &computeCentralities=false, const bool &inverseWeights=false, const bool &dropIsolates=false)
 
void minmax (qreal C, GraphVertex *v, qreal &max, qreal &min, int &maxNode, int &minNode)
 Computes minimum and maximum centralities during graphDistancesGeodesic() More...
 
void resolveClasses (qreal C, H_StrToInt &discreteClasses, int &classes)
 Checks if score C is a new prominence class If yes, it stores that number in a QHash<QString,int> type where the score is the key. If no, increases the frequency of this prominence score by 1 Called from graphDistancesGeodesic() More...
 
void resolveClasses (qreal C, H_StrToInt &discreteClasses, int &classes, int name)
 Overloaded method. It only adds displaying current vertex for debugging purposes. More...
 

Private Attributes

QThread file_parserThread
 
QThread wc_parserThread
 
QThread wc_spiderThread
 
VList m_graph
 
GraphicsWidgetm_canvas
 
Parserfile_parser
 
WebCrawler_Parserwc_parser
 
WebCrawler_Spiderwc_spider
 
QList< QString > m_relationsList
 
QList< int > m_graphFileFormatExportSupported
 
QList< int > triadTypeFreqs
 
QList< int > m_verticesList
 
QList< int > m_verticesIsolatedList
 
QList< int > m_verticesSelected
 
QSet< int > m_verticesSet
 
QList< SelectedEdgem_selectedEdges
 
QMultiHash< int, int > influenceRanges
 
QMultiHash< int, int > influenceDomains
 
QMultiHash< int, int > m_vertexPairsNotConnected
 
QHash< int, int > m_vertexPairsUnilaterallyConnected
 
QMultiMap< int, L_intm_cliques
 
QHash< int, QSet< int > > neighboursHash
 
QList< qreal > m_clusteringLevel
 
QMap< int, V_intm_clustersPerSequence
 
QMap< QString, V_intm_clustersByName
 
QMap< int, V_strm_clusterPairNamesPerSeq
 
Matrix SIGMA
 
Matrix DM
 
Matrix sumM
 
Matrix invAM
 
Matrix AM
 
Matrix invM
 
Matrix WM
 
Matrix XM
 
Matrix XSM
 
Matrix XRM
 
Matrix CLQM
 
stack< int > Stack
 
H_StrToInt discreteDPs
 
H_StrToInt discreteSDCs
 
H_StrToInt discreteCCs
 
H_StrToInt discreteBCs
 
H_StrToInt discreteSCs
 
H_StrToInt discreteIRCCs
 
H_StrToInt discreteECs
 
H_StrToInt discreteEccentricities
 
H_StrToInt discretePCs
 
H_StrToInt discreteICs
 
H_StrToInt discretePRPs
 
H_StrToInt discretePPs
 
H_StrToInt discreteEVCs
 
QString m_reportsDataDir
 
int m_reportsRealPrecision
 
int m_reportsLabelLength
 
ChartType m_reportsChartType
 
int m_fieldWidth
 
int m_curRelation
 
int m_fileFormat
 
int m_vertexClicked
 
MyEdge m_clickedEdge
 
qreal edgeWeightTemp
 
qreal edgeReverseWeightTemp
 
qreal meanSDC
 
qreal varianceSDC
 
qreal meanSCC
 
qreal varianceSCC
 
qreal meanIRCC
 
qreal varianceIRCC
 
qreal meanSBC
 
qreal varianceSBC
 
qreal meanSSC
 
qreal varianceSSC
 
qreal meanEC
 
qreal varianceEC
 
qreal meanSPC
 
qreal varianceSPC
 
qreal meanIC
 
qreal varianceIC
 
qreal meanEVC
 
qreal varianceEVC
 
qreal meanSDP
 
qreal varianceSDP
 
qreal meanPP
 
qreal variancePP
 
qreal meanPRP
 
qreal variancePRP
 
qreal minEccentricity
 
qreal maxEccentricity
 
qreal minSDP
 
qreal maxSDP
 
qreal sumDP
 
qreal sumSDP
 
qreal groupDP
 
qreal minSDC
 
qreal maxSDC
 
qreal sumDC
 
qreal sumSDC
 
qreal groupDC
 
qreal minSCC
 
qreal maxSCC
 
qreal nomSCC
 
qreal denomSCC
 
qreal sumCC
 
qreal sumSCC
 
qreal groupCC
 
qreal maxIndexCC
 
qreal minIRCC
 
qreal maxIRCC
 
qreal nomIRCC
 
qreal denomIRCC
 
qreal sumIRCC
 
qreal groupIRCC
 
qreal minSBC
 
qreal maxSBC
 
qreal nomSBC
 
qreal denomSBC
 
qreal sumBC
 
qreal sumSBC
 
qreal groupSBC
 
qreal maxIndexBC
 
qreal minSPC
 
qreal maxSPC
 
qreal nomSPC
 
qreal denomSPC
 
qreal t_sumIC
 
qreal sumSPC
 
qreal groupSPC
 
qreal maxIndexPC
 
qreal minSSC
 
qreal maxSSC
 
qreal sumSC
 
qreal sumSSC
 
qreal groupSC
 
qreal maxIndexSC
 
qreal minEC
 
qreal maxEC
 
qreal nomEC
 
qreal denomEC
 
qreal sumEC
 
qreal groupEC
 
qreal maxIndexEC
 
qreal minIC
 
qreal maxIC
 
qreal nomIC
 
qreal denomIC
 
qreal sumIC
 
qreal maxIndexIC
 
qreal minEVC
 
qreal maxEVC
 
qreal nomEVC
 
qreal denomEVC
 
qreal sumEVC
 
qreal sumSEVC
 
qreal groupEVC
 
qreal minPRP
 
qreal maxPRP
 
qreal nomPRC
 
qreal denomPRC
 
qreal sumPC
 
qreal t_sumPRP
 
qreal sumPRP
 
qreal minPP
 
qreal maxPP
 
qreal nomPP
 
qreal denomPP
 
qreal sumPP
 
qreal groupPP
 
qreal minCLC
 
qreal maxCLC
 
qreal averageCLC
 
qreal varianceCLC
 
qreal d_factor
 
int maxNodeCLC
 
int minNodeCLC
 
int classesSDP
 
int maxNodeDP
 
int minNodeDP
 
int classesSDC
 
int maxNodeSDC
 
int minNodeSDC
 
int classesSCC
 
int maxNodeSCC
 
int minNodeSCC
 
int classesIRCC
 
int maxNodeIRCC
 
int minNodeIRCC
 
int classesSBC
 
int maxNodeSBC
 
int minNodeSBC
 
int classesSPC
 
int maxNodeSPC
 
int minNodeSPC
 
int classesSSC
 
int maxNodeSSC
 
int minNodeSSC
 
int classesEC
 
int maxNodeEC
 
int minNodeEC
 
int classesEccentricity
 
int maxNodeEccentricity
 
int minNodeEccentricity
 
int classesIC
 
int maxNodeIC
 
int minNodeIC
 
int classesPRP
 
int maxNodePRP
 
int minNodePRP
 
int classesPP
 
int maxNodePP
 
int minNodePP
 
int classesEVC
 
int maxNodeEVC
 
int minNodeEVC
 
qreal sizeOfComponent
 
int m_graphHasChanged
 
int m_totalVertices
 
int m_totalEdges
 
int m_graphDiameter
 
int initVertexSize
 
int initVertexLabelSize
 
int initVertexNumberSize
 
int initVertexNumberDistance
 
int initVertexLabelDistance
 
bool order
 
bool initEdgeWeightNumbers
 
bool initEdgeLabels
 
qreal m_graphAverageDistance
 
qreal m_graphGeodesicsCount
 
qreal m_graphDensity
 
qreal m_graphSumDistance
 
qreal m_graphReciprocityArc
 
qreal m_graphReciprocityDyad
 
int m_graphReciprocityTiesReciprocated
 
int m_graphReciprocityTiesNonSymmetric
 
int m_graphReciprocityTiesTotal
 
int m_graphReciprocityPairsReciprocated
 
int m_graphReciprocityPairsTotal
 
bool m_graphHasVertexCustomIcons
 
int outboundEdgesVert
 
int inboundEdgesVert
 
int reciprocalEdgesVert
 
qreal canvasWidth
 
qreal canvasHeight
 
bool calculatedEdges
 
bool calculatedVertices
 
bool calculatedVerticesList
 
bool calculatedVerticesSet
 
bool calculatedAdjacencyMatrix
 
bool calculatedDistances
 
bool calculatedCentralities
 
bool calculatedIsolates
 
bool calculatedEVC
 
bool calculatedDP
 
bool calculatedDC
 
bool calculatedPP
 
bool calculatedIRCC
 
bool calculatedIC
 
bool calculatedPRP
 
bool calculatedTriad
 
bool calculatedGraphSymmetry
 
bool calculatedGraphReciprocity
 
bool calculatedGraphDensity
 
bool calculatedGraphWeighted
 
bool m_graphIsDirected
 
bool m_graphIsSymmetric
 
bool m_graphIsWeighted
 
bool m_graphIsConnected
 
int csRecDepth
 
QString VERSION
 
QString fileName
 
QString m_graphName
 
QString initEdgeColor
 
QString initVertexColor
 
QString initVertexNumberColor
 
QString initVertexLabelColor
 
QString initVertexShape
 
QString initVertexIconPath
 
QString htmlHead
 
QString htmlHeadLight
 
QString htmlEnd
 
QDateTime actualDateTime
 

Detailed Description

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.

TODO & KNOWN BUGS:

Todo:

Group edge editing: i.e. change weight or color.

- CHECK weighted networks results (IRCC and distance matrix with other combinations)

- CHECK graphIsWeighted corner case results, when !graphIsModified.

Bug:

Create d-regular, undirected, ask for closeness, it says we are on a disconnected graph

Crash on Graphml files with textlabels instead of nodenumbers (i.e. nets/killer.graphml)

wontfix Crash on Graphml files with html special chars in node/edge labels

wontfix Pajek files with no ic / labels without quotes are displayed without colors

wrong default edge colors (not the ones used by Settings) after loading GraphML files.

Resizing the MW view does not resize/reposition the layout guides

TODO Change Menus to: Matrices Cohesion/Connectedness: Density, Reachability, and All distance and Walks, Connectivity, Reciprocity, Transitivity ?, Clu Cof Prominence: Centrality and Prestige Subgroups / Communities: Cliques (later clans etc), (later path distance MDS) Components, Blocks and Cutpoints, Structural Equivalence: HCA, Similarity (later MDS), Block modelling, CONCOR

Member Enumeration Documentation

◆ Clustering

Enumerator
Single_Linkage 
Complete_Linkage 
Average_Linkage 

◆ GraphChange

Enumerator
ChangedNone 
ChangedMinorOptions 
ChangedVerticesMetadata 
ChangedEdgesMetadata 
ChangedPositions 
ChangedMajor 
ChangedVertices 
ChangedEdges 
ChangedVerticesEdges 
ChangedNew 

Constructor & Destructor Documentation

◆ Graph()

Graph::Graph ( GraphicsWidget graphicsWidget)

Graph::Graph constructor.

◆ ~Graph()

Graph::~Graph ( )

Member Function Documentation

◆ addGuideCircle

void Graph::addGuideCircle ( const double &  ,
const double &  ,
const double &   
)
signal

◆ addGuideHLine

void Graph::addGuideHLine ( const double &  y0)
signal

◆ BFS()

void Graph::BFS ( const int &  s,
const int &  si,
const bool &  computeCentralities = false,
const bool &  dropIsolates = false 
)
private

methods used by graphDistancesGeodesic()

Breadth-First Search (BFS) method for unweighted graphs (directed or not)

INPUT: a 'source' vertex with vpos s and a boolean computeCentralities. (Implicitly, BFS uses the m_graph structure)

OUTPUT: For every vertex t: d(s, t) is set to the distance of each t from s For every vertex t: s(s, t) is set to the number of shortest paths between s and t

Also, if computeCentralities is true then BFS does extra operations: a) For source vertex s: it calculates CC(s) as the sum of its distances from every other vertex. it calculates eccentricity(s) as the maximum distance from all other vertices. it increases sizeOfNthOrderNeighborhood [ N ] by one, to store the number of nodes at distance n from source s b) For every vertex u: it increases SC(u) by one, when it finds a new shor. path from s to t through u. appends each neighbor y of u to the list , thus Ps stores all predecessors of y on all all shortest paths from s c) Each vertex u popped from Q is pushed to a stack Stack

◆ canvas()

GraphicsWidget* Graph::canvas ( )
inline

◆ canvasMaxRadius

double Graph::canvasMaxRadius ( ) const
slot

◆ canvasMinDimension

qreal Graph::canvasMinDimension ( ) const
slot

◆ canvasRandomX

double Graph::canvasRandomX ( ) const
slot

Graph::canvasRandomX.

Returns
Returns a random x-coordinate adjusted to be visible inside the canvas usable area

◆ canvasRandomY

double Graph::canvasRandomY ( ) const
slot

Graph::canvasRandomY.

Returns
Returns a random y-coordinate adjusted to be visible inside the canvas usable area

◆ canvasSizeSet

void Graph::canvasSizeSet ( const int  w,
const int  h 
)
slot

Called on MW resizing to update node positions and canvasWidth and canvasHeight.

Parameters
w
h

◆ canvasVisibleX

double Graph::canvasVisibleX ( const double &  x) const
slot

Graph::canvasVisibleX.

Parameters
x
Returns
Checks if x is visible inside the canvas usable area and if not returns an adjusted x-coordinate

◆ canvasVisibleY

double Graph::canvasVisibleY ( const double &  y) const
slot

Graph::canvasVisibleY.

Parameters
y
Returns
Checks if y is visible inside the canvas usable area and if not returns an adjusted y-coordinate

◆ centralityClosenessIR()

void Graph::centralityClosenessIR ( const bool  considerWeights = false,
const bool  inverseWeights = false,
const bool  dropIsolates = false 
)

Computes an "improved" closeness centrality index, IRCC, which can be used on disconnected graphs. IRCC is an improved node-level centrality closeness index which focuses on the influence range of each node (the set of nodes that are reachable from it) For each node v, this index calculates the fraction of nodes in its influence range and divides it by the average distance of those nodes from v, ignoring nodes that are not reachable from it.

Parameters
considerWeights
inverseWeights
dropIsolates

◆ centralityDegree()

void Graph::centralityDegree ( const bool &  weights = true,
const bool &  dropIsolates = false 
)

Calculates the degree (outDegree) centrality of each vertex - diagonal included.

Parameters
weights
dropIsolates

◆ centralityEigenvector()

void Graph::centralityEigenvector ( const bool &  considerWeights = false,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false 
)

Computes Eigenvector centrality.

Parameters
considerWeights
inverseWeights

◆ centralityInformation()

void Graph::centralityInformation ( const bool  considerWeights = false,
const bool  inverseWeights = false 
)

Computes the Information centrality of each vertex - diagonal included Note that there is no known generalization of Stephenson&Zelen's theory for information centrality to directional data.

Parameters
considerWeights
inverseWeights

◆ clear()

void Graph::clear ( const QString &  reason = "")

Clears all vertices

◆ clusteringCoefficient()

qreal Graph::clusteringCoefficient ( const bool  updateProgress = false)

Computes local clustering coefficients and returns the network average Clustering Coefficient.

Parameters
updateProgress
Returns

◆ clusteringCoefficientLocal()

qreal Graph::clusteringCoefficientLocal ( const int &  v1)

Graph::clusteringCoefficientLocal Returns the local clustering coefficient (CLUCOF) of a vertex v1 CLUCOF in a graph quantifies how close the vertex and its neighbors are to being a clique, a connected subgraph. This is used to determine whether a graph is a small-world network.

Parameters
v1
Returns

◆ compute_angles()

void Graph::compute_angles ( const QPointF &  DV,
const qreal &  dist,
qreal &  angle1,
qreal &  angle2,
qreal &  degrees1,
qreal &  degrees2 
)

Graph::compute_angles Computes the two angles of the orthogonal triangle shaped by two points of difference vector DV and distance dist A = 90 B = angle1 C = angle2.

Parameters
DV
dist
angle1
angle2
degrees1
degrees2

◆ computeOptimalDistance()

qreal Graph::computeOptimalDistance ( const int &  V)

Computes Optimal Distance. Used in Spring Embedder and FR algorithms.

Returns
qreal optimalDistance

◆ dijkstra()

void Graph::dijkstra ( const int &  s,
const int &  si,
const bool &  computeCentralities = false,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false 
)
private

Dijkstra's algorithm for solving the SSSP problem in weighted graphs (directed or not). It uses a min-priority queue prQ to provide constant time lookup of the minimum distance. The priority queue is implemented with std::priority_queue

INPUT: a 'source' vertex with vpos s and a boolean computeCentralities. (Implicitly, the algorithm uses the m_graph structure)

OUTPUT: For every vertex t: d(s, t) is set to the distance of each t from s For every vertex t: s(s, t) is set to the number of shortest paths between s and t

Also, if computeCentralities is true then it does extra operations: a) For source vertex s: it calculates CC(s) as the sum of its distances from every other vertex. it calculates eccentricity(s) as the maximum distance from all other vertices. it increases sizeOfNthOrderNeighborhood [ N ] by one, to store the number of nodes at distance n from source s b) For every vertex u: it increases SC(u) by one, when it finds a new shor. path from s to t through u. appends each neighbor y of u to the list Ps, thus Ps stores all predecessors of y on all all shortest paths from s c) Each vertex u popped from prQ is pushed to a stack Stack

◆ edgeAdd()

void Graph::edgeAdd ( const int &  v1,
const int &  v2,
const qreal &  weight,
const int &  type,
const QString &  label,
const QString &  color 
)
private

Adds a directed edge from v1 to v2 If type == EdgeType::Undirected then it also adds the directed edge v2 -> v1.

private member functions

Parameters
v1
v2
weight
label
color
type

◆ edgeClicked()

MyEdge Graph::edgeClicked ( )

Returns clicked edge.

Returns

◆ edgeClickedSet

void Graph::edgeClickedSet ( const int &  v1,
const int &  v2,
const bool &  openMenu = false 
)
slot

Called from GW::edgeClicked() which is emitted when the user clicks on an edge. Parameters are the source and target node of the edge. It emits signalEdgeClicked() to MW, which displays a relevant message on the status bar.

Parameters
v1
v2

◆ edgeColor()

QString Graph::edgeColor ( const int &  v1,
const int &  v2 
)

Returns the color of the directed edge v1 -> v2.

Parameters
v1
v2
Returns

◆ edgeColorAllSet()

bool Graph::edgeColorAllSet ( const QString &  color,
const int &  threshold = RAND_MAX 
)

Changes the color of all enabled edges.

Parameters
color
Returns

◆ edgeColorInit()

void Graph::edgeColorInit ( const QString &  color)

Saves the default edge color Used by random network creation methods.

Parameters
color

◆ edgeColorSet()

void Graph::edgeColorSet ( const int &  v1,
const int &  v2,
const QString &  color 
)

Changes the color of edge v1 -> v2.

Parameters
v1
v2
color

◆ edgeCreate

void Graph::edgeCreate ( const int &  v1,
const int &  v2,
const qreal &  weight,
const QString &  color,
const int &  type = 0,
const bool &  drawArrows = true,
const bool &  bezier = false,
const QString &  label = QString(),
const bool &  signalMW = true 
)
slot

Checks a) if edge exists and b) if the opposite edge exists Calls edgeAdd to add the new edge to the Graph, then emits drawEdge() which calls GW::drawEdge() to draw the new edge. Called from homonymous signal of Parser class. Also called from MW when user clicks on the "add link" button Also called (via MW) from GW when user middle-clicks on two nodes.

Slots to signals from GraphicsWidget and Parser

Parameters
v1
v2
weight
color
reciprocal
drawArrows
bezier

◆ edgeCreateWebCrawler

void Graph::edgeCreateWebCrawler ( const int &  source,
const int &  target 
)
slot

Called from WebCrawler when it finds an new link Calls edgeCreate() method with initEdgeColor.

Parameters
source
target

◆ edgeExists()

qreal Graph::edgeExists ( const int &  v1,
const int &  v2,
const bool &  checkReciprocal = false 
)

Checks if there is an edge (arc) from v1 to v2 Complexity: O(logN) for vpos retrieval + O(1) for QList index retrieval + O(logN) for checking edge(v2)

Parameters
v1
v2
reciprocatedif true, checks if the edge is reciprocated (v1<->v2)
Returns
zero if arc or reciprocated edge does not exist or non-zero if arc /reciprocated edge exists

◆ edgeFilterByRelation

void Graph::edgeFilterByRelation ( int  relation,
bool  status 
)
slot

Enables or disables all edges of a given relation Calls the homonymous method of GraphVertex class.

Parameters
relation

◆ edgeFilterByWeight

void Graph::edgeFilterByWeight ( qreal  m_threshold,
bool  overThreshold 
)
slot

Called from MW::DialogEdgeFilter to filter edges over or under a specified weight (m_threshold). For each vertex in the Graph, calls the homonymous method of GraphVertex class.

Parameters
m_threshold
overThreshold

◆ edgeFilterUnilateral

void Graph::edgeFilterUnilateral ( const bool &  toggle)
slot

Enables or disables unilateral edges in current relationship. If toggle=true, all non-reciprocal edges are disabled, effectively making the network symmetric.

Parameters
toggle

◆ edgeLabel()

QString Graph::edgeLabel ( const int &  v1,
const int &  v2 
) const

Returns the label of edge v1->v2.

Parameters
v1
v2
Returns

◆ edgeLabelSet()

void Graph::edgeLabelSet ( const int &  v1,
const int &  v2,
const QString &  label 
)

Changes the label of edge v1 -> v2.

Parameters
v1
v2
weight

◆ edgeLabelsVisibilitySet()

void Graph::edgeLabelsVisibilitySet ( const bool &  toggle)

Toggles the visibility of edge labels.

Parameters
toggle

◆ edgeRemove()

void Graph::edgeRemove ( const int &  v1,
const int &  v2,
const bool &  removeOpposite = false 
)

Removes the directed arc v1 -> v2 or, if the graph is undirected, the edge v1 <-> v2 Emits signalRemoveEdge to GW to delete the graphics item.

Parameters
v1
v2
removeOppositeif true also removes the opposite edge

◆ edgeRemoveSelected()

void Graph::edgeRemoveSelected ( SelectedEdge selectedEdge,
const bool &  removeOpposite 
)

Removes a SelectedEdge.

Parameters
selectedEdge
removeOpposite

◆ edgeRemoveSelectedAll()

void Graph::edgeRemoveSelectedAll ( )

Removes all selected edges.

◆ edgesEnabled()

int Graph::edgesEnabled ( )

Returns the number |E| of graph - only the enabled edges.

Returns

◆ edgeSymmetric()

bool Graph::edgeSymmetric ( const int &  v1,
const int &  v2 
)

Returns TRUE if edge(v1, v2) is symmetric, i.e. (v1,v2) == (v2,v1).

Parameters
v1
v2
Returns

◆ edgeTypeSet()

void Graph::edgeTypeSet ( const int &  v1,
const int &  v2,
const qreal &  weight,
const int &  dirType = EdgeType::Directed 
)

Changes the direction type of an existing edge Mainly called from Graph::verticesCreateSubgraph() Also called from graphUndirectedSet.

Parameters
v1
v2
weight

◆ edgeVisibilitySet

void Graph::edgeVisibilitySet ( int  relation,
int  source,
int  target,
bool  visible 
)
slot

Changes the canvas visibility of an edge Called from GraphVertex::edgeFilterByRelation GraphVertex::edgeFilterByWeight GraphVertex::setOutEdgeEnabled GraphVertex::edgeFilterUnilateral.

Parameters
relation
source
target
visible

◆ edgeWeight()

qreal Graph::edgeWeight ( const int &  v1,
const int &  v2 
) const

Returns the weight of the edge v1 -> v2.

Parameters
v1
v2
Returns
qreal

◆ edgeWeightNumbersVisibilitySet()

void Graph::edgeWeightNumbersVisibilitySet ( const bool &  toggle)

Changes the visibility of edge weight numbers.

Parameters
toggle

◆ edgeWeightSet()

void Graph::edgeWeightSet ( const int &  v1,
const int &  v2,
const qreal &  weight,
const bool &  undirected = false 
)

Changes the weight of an edge (arc) between v1 and v2.

Parameters
v1
v2
weight

◆ factorial()

int Graph::factorial ( int  x)

Calculates and returns x! factorial... used in (n 2)p edges calculation

◆ getProminenceIndexByName()

int Graph::getProminenceIndexByName ( const QString &  prominenceIndexName)

Returns the IndexType of the given prominence index name Called from MW::slotEditNodeFind, MW::slotLayoutRadialByProminenceIndex etc.

Parameters
prominenceIndexName

◆ graphCliqueAdd()

void Graph::graphCliqueAdd ( const QList< int > &  clique)

Called from Graph::graphCliques to add a new clique (list of vertices) Adds clique info to each clique member and updates co-membership matrix CLQM .

Parameters
list
Returns

◆ graphCliques()

void Graph::graphCliques ( QSet< int >  R = QSet<int>(),
QSet< int >  P = QSet<int>(),
QSet< int >  X = QSet<int>() 
)

Finds all maximal cliques in an undirected (?) graph. Implements the Bron–Kerbosch algorithm, a recursive backtracking algorithm that searches for all maximal cliques in a given graph G. Given three sets R, P, and X, the algorithm finds the maximal cliques that include all of the vertices in R, some of the vertices in P, and none of the vertices in X. In each call to the algorithm, P and X are disjoint sets whose union consists of those vertices that form cliques when added to R. In other words, P ∪ X is the set of vertices which are joined to every element of R. When P and X are both empty there are no further elements that can be added to R, so R is a maximal clique and the algorithm outputs R. The recursion is initiated by setting R and X to be the empty set and P to be the vertex set of the graph. Within each recursive call, the algorithm considers the vertices in P in turn. if there are no vertices, it either reports R as a maximal clique (if X is empty), or backtracks. For each vertex v chosen from P, it makes a recursive call in which v is added to R and in which P and X are restricted to the neighbor set NBS(v) of v, which finds and reports all clique extensions of R that contain v. Then, it moves v from P to X to exclude it from consideration in future cliques and continues with the next vertex in P.

Parameters
R
P
X

◆ graphCliquesContaining()

int Graph::graphCliquesContaining ( const int &  actor,
const int &  size = 0 
)

Returns the number of maximal cliques which include a given actor

◆ graphCliquesOfSize()

int Graph::graphCliquesOfSize ( const int &  size)

Graph::graphCliquesOfSize Returns the number of maximal cliques of a given size.

Parameters
size
Returns

◆ graphClusteringHierarchical()

bool Graph::graphClusteringHierarchical ( Matrix STR_EQUIV,
const QString &  varLocation,
const int &  metric,
const int &  method,
const bool &  diagonal = false,
const bool &  diagram = false,
const bool &  considerWeights = true,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false 
)

Performs an hierarchical clustering process (Johnson, 1967) on a given NxN distance/dissimilarity matrix. The input matrix can be the the adjacency matrix, the geodesic distance matrix or a derived from them dissimilarities matrix using a user-specified metric, i.e. euclidean distance. The method parameter defines how to compute distances (similarities) between a new cluster the old clusters. Valid values can be:

  • Clustering::Single_Linkage: "single-link" or "connectedness" or "minimum"
  • Clustering::Complete_Linkage: "complete-link" or "diameter" or "maximum"
  • Clustering::Average_Linkage: "average-link" or UPGMA
    Parameters
    matrix
    metric
    method
    considerWeights
    inverseWeights
    dropIsolates

◆ graphClusteringMethodStrToType()

int Graph::graphClusteringMethodStrToType ( const QString &  method) const

Helper method, return clustering method type from the human readable name of it.

Parameters
method
Returns

◆ graphClusteringMethodTypeToString()

QString Graph::graphClusteringMethodTypeToString ( const int &  methodType) const

Helper method, return the human readable name of clustering method type.

Returns

◆ graphCocitation()

void Graph::graphCocitation ( )

Creates a new symmetric relation by connecting those actors that are cocitated by others. In the new relation, an edge will exist between actor i and actor j only if C(i,j) > 0, where C the Cocitation Matrix. Thus the actor pairs cited by more common neighbors will appear with a stronger tie between them than pairs those cited by fewer common neighbors. The resulting relation is symmetric.

◆ graphConnectednessFull()

int Graph::graphConnectednessFull ( const bool  updateProgress = false)

◆ graphDensity()

qreal Graph::graphDensity ( )

Returns the ratio of present edges to total possible edges in the current relation.

Returns

◆ graphDiameter()

int Graph::graphDiameter ( const bool  considerWeights,
const bool  inverseWeights 
)

Returns the diameter of the graph, aka the largest geodesic distance between any two vertices.

Parameters
considerWeights
inverseWeights
Returns

◆ graphDichotomization()

void Graph::graphDichotomization ( const qreal  threshold)

Creates a new binary relation in a valued network using edge dichotomization according to the threshold parameter.

Parameters
threshold

◆ graphDistanceEuclidean() [1/2]

qreal Graph::graphDistanceEuclidean ( const QPointF &  a)

the euclideian distance of QPointF a (where a is difference vector)

Parameters
a
Returns

◆ graphDistanceEuclidean() [2/2]

qreal Graph::graphDistanceEuclidean ( const QPointF &  a,
const QPointF &  b 
)

Computes the euclideian distance between QPointF a and b.

Parameters
a
b
Returns

◆ graphDistanceGeodesic()

int Graph::graphDistanceGeodesic ( const int &  v1,
const int &  v2,
const bool &  considerWeights = false,
const bool &  inverseWeights = true 
)

Returns the geodesic distance (length of shortest path) from vertex v1 to vertex v2.

Parameters
v1
v2
considerWeights
inverseWeights
Returns

◆ graphDistanceGeodesicAverage()

qreal Graph::graphDistanceGeodesicAverage ( const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Returns the average distance of the graph.

Parameters
considerWeights
inverseWeights
dropIsolates
Returns

◆ graphDistancesGeodesic()

void Graph::graphDistancesGeodesic ( const bool &  computeCentralities = false,
const bool &  considerWeights = false,
const bool &  inverseWeights = true,
const bool &  dropIsolates = false 
)

Computes the geodesic distances between all vertices: In the process, it also computes many other centrality/prestige metrics:

  • The so-called sigma matrix, where the (i,j) element is the number of shortest paths from vertex i to vertex j, called sigma(i,j).
  • The Diameter of the graph, m_graphDiameter, which is the length of the longest shortest path between every (i,j)
  • The Eccentricity of every node i which is the length of the longest shortest path from i to every other node j
  • The InfluenceRange and InfluenceDomain of each node.
  • The centralities for every u in V (if centralities=true):
    • Betweenness: BC(u) = Sum ( sigma(i,j,u)/sigma(i,j) ) for every s,t in V
    • Stress: SC(u) = Sum ( sigma(i,j) ) for every s,t in V
    • Eccentricity: EC(u) = 1/maxDistance(u,t) for some t in V
    • Closeness: CC(u) = 1 / Sum( d(u,t) ) for every t in V
    • Power:
      Parameters
      centralities
      considerWeights
      inverseWeights
      dropIsolates

◆ graphFileFormat()

int Graph::graphFileFormat ( ) const

Returns the format of the last file opened.

Returns

◆ graphFileFormatExportSupported()

bool Graph::graphFileFormatExportSupported ( const int &  fileFormat) const

Returns true if the fileFormat is supported for saving.

Parameters
fileFormat
Returns

◆ graphFileLoaded

void Graph::graphFileLoaded ( const int &  fileType,
const QString &  fName = QString(),
const QString &  netName = QString(),
const int &  totalNodes = 0,
const int &  totalLinks = 0,
const int &  edgeDirType = 0,
const QString &  message = QString() 
)
slot

Updates MW with the loaded file type (0=nofile, 1=Pajek, 2=Adjacency etc) Called from Parser on file parsing end or file error.

Parameters
type
netName
aNodes
totalLinks
undirected

◆ graphGeodesics()

int Graph::graphGeodesics ( )

Returns the number of geodesics (shortest-paths) in the graph.

Returns

◆ graphHasVertexCustomIcons()

bool Graph::graphHasVertexCustomIcons ( ) const
inline

◆ graphIsConnected()

bool Graph::graphIsConnected ( )

Checks if the graph is connected, in the sense of a topological space, i.e., there is a path from any vertex to any other vertex in the graph. Called from MW::slotConnectedness()

Returns
bool

◆ graphIsDirected()

bool Graph::graphIsDirected ( )

Returns true if graph is directed.

Returns

◆ graphIsModified()

bool Graph::graphIsModified ( ) const

Returns true of graph is modified (edges/vertices added/removed). else false.

Returns

◆ graphIsSymmetric()

bool Graph::graphIsSymmetric ( )

Returns TRUE if the adjacency matrix of the current relation is symmetric.

Returns
bool

◆ graphIsUndirected()

bool Graph::graphIsUndirected ( )

Returns true if graph is undirected.

Returns

◆ graphIsWeighted()

bool Graph::graphIsWeighted ( )

Returns true if the graph is weighted (valued), i.e. if any e in |E| has value not 0 or 1 Complexity: O(n^2)

Returns

◆ graphLoad()

void Graph::graphLoad ( const QString  m_fileName,
const QString  m_codecName,
const int  fileFormat,
const int  two_sm_mode,
const QString  delimiter = QString() 
)

Graph::graphLoad Our almost universal network loader. :) It creates a new Parser object, moves it to a another thread, connects signals and slots and calls its run() method.

Parameters
m_fileName
m_codecName
m_showLabels
maxWidth
maxHeight
fileFormat
two_sm_mode
Returns

◆ graphLoaded()

bool Graph::graphLoaded ( ) const

Returns if a graph has been loaded from a file.

Returns

◆ graphLoadedTerminateParserThreads

void Graph::graphLoadedTerminateParserThreads ( QString  reason)
slot

◆ graphMatrixAdjacencyCreate()

void Graph::graphMatrixAdjacencyCreate ( const bool  dropIsolates = false,
const bool  considerWeights = true,
const bool  inverseWeights = false,
const bool  symmetrize = false 
)

Creates an adjacency matrix AM where AM(i,j)=1 if i is connected to j and AM(i,j)=0 if i not connected to j Used in Graph::centralityInformation(), Graph::graphWalksMatrixCreate and Graph::graphMatrixAdjacencyInvert()

Parameters
dropIsolates
considerWeights
inverseWeights
symmetrize

◆ graphMatrixAdjacencyInvert()

bool Graph::graphMatrixAdjacencyInvert ( const QString &  method = "lu")

◆ graphMatrixDissimilaritiesCreate()

void Graph::graphMatrixDissimilaritiesCreate ( Matrix INPUT_MATRIX,
Matrix DSM,
const int &  metric,
const QString &  varLocation,
const bool &  diagonal,
const bool &  considerWeights 
)

Calls Matrix:distancesMatrix to compute the dissimilarities matrix DSM of the variables (rows, columns, both) in given input matrix using the user defined metric.

Parameters
INPUT_MATRIX
DSM
metric
varLocation
diagonal
considerWeights

◆ graphMatrixDistanceGeodesicCreate()

void Graph::graphMatrixDistanceGeodesicCreate ( const bool &  considerWeights = false,
const bool &  inverseWeights = true,
const bool &  dropIsolates = false 
)

Creates the matrix DM of geodesic distances between vertices.

Parameters
considerWeights
inverseWeights
dropIsolates

◆ graphMatrixReachabilityCreate()

void Graph::graphMatrixReachabilityCreate ( )

Creates the reachability matrix XRM.

◆ graphMatrixShortestPathsCreate()

void Graph::graphMatrixShortestPathsCreate ( const bool &  considerWeights = false,
const bool &  inverseWeights = true,
const bool &  dropIsolates = false 
)

Creates the matrix SIGMA of shortest paths (geodesics) between vertices Each SIGMA(i,j) is the number of shortest paths (geodesics) from i and j.

Parameters
considerWeights
inverseWeights
dropIsolates

◆ graphMatrixSimilarityMatchingCreate()

void Graph::graphMatrixSimilarityMatchingCreate ( Matrix AM,
Matrix SCM,
const int &  measure = METRIC_SIMPLE_MATCHING,
const QString &  varLocation = "Rows",
const bool &  diagonal = false,
const bool &  considerWeights = true 
)

Calls Matrix:similarityMatrix to compute the similarity matrix SCM of the variables (rows, columns, both) in given input matrix using the selected matching measure.

Parameters
AM
SCM
rows

◆ graphMatrixSimilarityPearsonCreate()

void Graph::graphMatrixSimilarityPearsonCreate ( Matrix AM,
Matrix PCC,
const QString &  varLocation = "Rows",
const bool &  diagonal = false 
)

The Pearson product-moment correlation coefficient (PPMCC, PCC or Pearson's r) is a measure of the linear dependence between two variables X and Y.

As a normalized version of the covariance, the PPMCC is computed with the formula: r =\frac{\sum ^n _{i=1}(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum ^n _{i=1}(x_i - \bar{x})^2} \sqrt{\sum ^n _{i=1}(y_i - \bar{y})^2}}

It gives a value between +1 and −1 inclusive, where 1 is total positive linear correlation, 0 is no linear correlation, and −1 is total negative linear correlation.

In SNA, Pearson correlations can be used to track the similarity between actors, in terms of structural equivalence.

This method creates an actor by actor NxN matrix PCC where the (i,j) element is the Pearson correlation coefficient of actor i and actor j. If the input matrix is the adjacency matrix, the PCC of two nodes measures how related (similar, inverse or not related at all) their patterns of ties tend to be. A positive value means there is strong linear association of the two actors, while a negative value means the inverse. For instance a value of -1 means the two actors have exactly opposite ties to other actors, while a value of 1 means the actors have identical patterns of ties to other actors (they are connected to the same actors).

The correlation measure of similarity is particularly useful when the data on ties are valued

Parameters
AM
PCC
rows

◆ graphMatrixStrToType()

int Graph::graphMatrixStrToType ( const QString &  matrix) const

Helper method, return the matrix type of human readable matrix name .

Parameters
matrix
Returns

◆ graphMatrixTypeToString()

QString Graph::graphMatrixTypeToString ( const int &  matrixType) const

Helper method, return the human readable name of matrix type.

Parameters
matrix

◆ graphMetricStrToType()

int Graph::graphMetricStrToType ( const QString &  metricStr) const

Helper method, return the identifier of a metric.

Parameters
metricStr

◆ graphMetricTypeToString()

QString Graph::graphMetricTypeToString ( const int &  metricType) const

Helper method, return the human readable name of metric type.

Parameters
metric

◆ graphName()

QString Graph::graphName ( ) const

Graph::graphName If m_graphName is set on file loading, it returns that. If m_graphName is empty, then returns current relation name If m_graphName is empty and there is no current relation name, then returns "noname".

Returns

◆ graphReachable()

bool Graph::graphReachable ( const int &  v1,
const int &  v2 
)

Returns true if vertices v1 and v2 are reachable.

Parameters
v1
v2
Returns

◆ graphReciprocity()

qreal Graph::graphReciprocity ( )

Computes and returns the arc reciprocity of the graph. Also computes the dyad reciprocity and fills parameters with values.

Returns

◆ graphSave()

void Graph::graphSave ( const QString &  fileName,
const int &  fileType,
const bool &  saveEdgeWeights = true 
)

Our almost universal graph saving method. :) Actually it just checks the requested file type and calls the corresponding saveGraphTo...() method.

Parameters
fileName
fileType
Returns

◆ graphSaved()

bool Graph::graphSaved ( ) const

Returns true if the graph is saved.

Returns

◆ graphSaveToAdjacencyFormat()

bool Graph::graphSaveToAdjacencyFormat ( const QString &  fileName,
const bool &  saveEdgeWeights = true 
)

Graph::graphSaveToAdjacencyFormat.

Parameters
fileName
Returns

◆ graphSaveToDotFormat()

bool Graph::graphSaveToDotFormat ( QString  fileName)

◆ graphSaveToGraphMLFormat()

bool Graph::graphSaveToGraphMLFormat ( const QString &  fileName,
QString  networkName = "",
int  maxWidth = 0,
int  maxHeight = 0 
)

Saves the current graph to fileName in GraphML format.

Parameters
fileName
networkName
maxWidth
maxHeight
Returns

◆ graphSaveToPajekFormat()

bool Graph::graphSaveToPajekFormat ( const QString &  fileName,
QString  networkName = "",
int  maxWidth = 0,
int  maxHeight = 0 
)

Saves the active graph to a Pajek-formatted file Preserves node properties (positions, colours, etc)

◆ graphSelectedEdges()

QList< SelectedEdge > Graph::graphSelectedEdges ( ) const

Returns a QList of user-selected edges in pair<int,int>

Returns

◆ graphSelectedEdgesCount()

int Graph::graphSelectedEdgesCount ( ) const

Returns the count of user-selected edges.

Returns

◆ graphSelectedVertices()

QList< int > Graph::graphSelectedVertices ( ) const

Returns a QList of user-selected vertices.

Returns

◆ graphSelectedVerticesCount()

int Graph::graphSelectedVerticesCount ( ) const

Returns count of user-selected vertices.

Returns

◆ graphSelectedVerticesMax()

int Graph::graphSelectedVerticesMax ( ) const

Returns max of user-selected vertices.

Returns

◆ graphSelectedVerticesMin()

int Graph::graphSelectedVerticesMin ( ) const

Returns min of user-selected vertices.

Returns

◆ graphSelectionChanged

void Graph::graphSelectionChanged ( const QList< int >  selectedVertices,
const QList< SelectedEdge selectedEdges 
)
slot

Gets updates on the user-selected vertices and edges from GW and emits their counts to MW.

Parameters
selectedVertices
selectedEdges

◆ graphSetDirected()

void Graph::graphSetDirected ( const bool &  toggle = true,
const bool &  signalMW = true 
)

Toggles the graph directed or undirected.

◆ graphSetModified()

void Graph::graphSetModified ( const int &  graphNewStatus,
const bool &  signalMW = true 
)

Sets the graph modification status. If there are major changes, then signalGraphModified is emitted In any case, SignalGraphSavedStatus is emitted.

Parameters
graphChangedFlag
signalMW

◆ graphSetUndirected()

void Graph::graphSetUndirected ( const bool &  toggle = true,
const bool &  signalMW = true 
)

Toggles the graph undirected.

◆ graphSetWeighted()

void Graph::graphSetWeighted ( const bool &  toggle = true)

Sets the graph to be weighted / valued edges.

Parameters
toggle

◆ graphSymmetrize()

void Graph::graphSymmetrize ( )

Transforms the graph to symmetric (all edges reciprocal)

◆ graphSymmetrizeStrongTies()

void Graph::graphSymmetrizeStrongTies ( const bool &  allRelations = false)

Creates a new symmetric relation by keeping only strong-ties (mutual links) in the current relation. In the new relation, two actors are connected only if they are mutually connected in the current relation.

Parameters
allRelations

◆ graphTriadCensus()

bool Graph::graphTriadCensus ( )

Graph::graphTriadCensus Conducts a triad census and updates QList::triadTypeFreqs, which is the list carrying all triad type frequencies Complexity:O(n!)

Returns

◆ graphWalksMatrixCreate()

void Graph::graphWalksMatrixCreate ( const int &  N = 0,
const int &  length = 0,
const bool &  updateProgress = false 
)

Computes either the "Walks of given length" or the "Total Walks" matrix. If length>0, it computes the Walks of given length matrix, XM=AM^l where each element (i,j) denotes the number of walks of length l between vertex i and j. If length=0, it computes the Total Walks matrix, XSM=Sum{AM^n} where each (i,j) denotes the total number of walks of any length between vertices i and j. NOTE: In the latter case, this function is VERY SLOW on large networks (n>50), since it will calculate all powers of the sociomatrix up to n-1 in order to find out all possible walks.

Parameters
length
updateProgress

◆ htmlEscaped

QString Graph::htmlEscaped ( QString  str) const
slot

Helper method, returns a nice qstring where all html special chars are encoded.

Parameters
str
Returns

◆ initSignalSlots()

void Graph::initSignalSlots ( )

◆ layoutByProminenceIndex()

void Graph::layoutByProminenceIndex ( int  prominenceIndex,
int  layoutType,
const bool  considerWeights = false,
const bool  inverseWeights = false,
const bool  dropIsolates = false 
)

Applies a layout according to each actor's prominence index score. The layout type can be radial (0), level (1), node sizes (2) or node colors (3), as follows: layoutType=0 - Repositions all nodes on the periphery of concentric circles with radius analogous to their prominence index layoutType=1 - Repositions all nodes on different top-down levels according to their centrality layoutType=2 - Changes node sizes to be proportional to their prominence index score layoutType=2 - Changes node colors to reflect their prominence index score (from red to green)

Parameters
prominenceIndex,0-12
layoutType0,1,2,3
considerWeights
inverseWeights
dropIsolates

◆ layoutCircular()

void Graph::layoutCircular ( const double &  x0,
const double &  y0,
const double &  newRadius,
const bool &  guides = false 
)

Repositions all nodes on the periphery of a circle with given radius.

Parameters
x0
y0
maxRadius

◆ layoutForceDirected_Eades_moveNodes()

void Graph::layoutForceDirected_Eades_moveNodes ( const qreal &  c4)

◆ layoutForceDirected_F_att()

qreal Graph::layoutForceDirected_F_att ( const QString  model,
const qreal &  dist,
const qreal &  optimalDistance 
)

◆ layoutForceDirected_F_rep()

qreal Graph::layoutForceDirected_F_rep ( const QString  model,
const qreal &  dist,
const qreal &  optimalDistance 
)

◆ layoutForceDirected_FR_moveNodes()

void Graph::layoutForceDirected_FR_moveNodes ( const qreal &  temperature)

Graph::layoutForceDirected_FR_moveNodes.

Parameters
temperature

◆ layoutForceDirected_FR_temperature()

qreal Graph::layoutForceDirected_FR_temperature ( const int  iteration) const

Reduces the temperature as the layout approaches a better configuration.

Returns
qreal temperature

◆ layoutForceDirectedFruchtermanReingold()

void Graph::layoutForceDirectedFruchtermanReingold ( const int  maxIterations)

Embeds a Force Directed Placement layout according to the Fruchterman-Reingold model. Fruchterman and Reingold (1991) refined the Spring Embedder model by replacing the forces. In this model, "the vertices behave as atomic particles or celestial bodies, exerting attractive and repulsive forces on one another." (ibid). Again, only vertices that are neighbours attract each other but, unlike Spring Embedder, all vertices repel each other. These forces induce movement. The algorithm might resemble molecular or planetary simulations, sometimes called n-body problems.

Parameters
maxIterations

◆ layoutForceDirectedKamadaKawai()

void Graph::layoutForceDirectedKamadaKawai ( const int  maxIterations = 500,
const bool  considerWeights = false,
const bool  inverseWeights = false,
const bool  dropIsolates = false,
const QString &  initialPositions = "current" 
)

Embeds a Force Directed Placement layout according to the Kamada-Kawai model. In this model, the network is considered to be a dynamic system where every two actors are 'particles' mutually connected by a 'spring'. Each spring has a desirable length, which corresponds to their graph theoretic distance. In this way, the optimal layout of the graph is the state with the minimum imbalance. The degree of imbalance is formulated as the total spring energy: the square summation of the differences between desirable distances and real ones for all pairs of particles Initially, the particles/actors are placed on the vertices of a regular n-polygon.

◆ layoutForceDirectedSpringEmbedder()

void Graph::layoutForceDirectedSpringEmbedder ( const int  maxIterations)

Embeds a Force Directed Placement layout according to the initial Spring Embedder model proposed by Eades.

Parameters
maxIterationsThe Spring Embedder model (Eades, 1984), part of the Force Directed Placement (FDP) family, assigns forces to all vertices and edges, as if nodes were electrically charged particles (Coulomb's law) and all edges were springs (i.e. Hooke's law).

These forces are applied to the nodes iteratively, pulling them closer together or pushing them further apart, until the system comes to an equilibrium state (node positions do not change anymore).

Note that, following Eades, we do not need to have a faithful simulation; we can -and we do- apply unrealistic forces in an unrealistic manner. For instance, instead of the forces described by Hooke's law, we will assume weaker logarithmic forces between far apart vertices...

compute max spring length as function of canvas area divided by the total vertices area

calculate electric (repulsive) forces between all vertices.

calculate spring forces between adjacent nodes that pull them together (if d > naturalLength) or push them apart (if d < naturalLength)

◆ layoutRadialRandom()

void Graph::layoutRadialRandom ( const bool &  guides = true)

Repositions all nodes on the periphery of different circles with random radius.

Parameters
x0
y0
maxRadius

◆ layoutRandom()

void Graph::layoutRandom ( )

Repositions all nodes on random positions Emits setNodePos(i, x,y) to tell GW that the node item should be moved.

This method is automatically invoked when a QTimerEvent occurs UNUSED

Parameters
maxWidth
maxHeight

◆ layoutVertexSizeByIndegree()

void Graph::layoutVertexSizeByIndegree ( )

Convenience method Changes the size of all nodes to be proportional to their InDegree (Degree Prestige) Calls layoutByProminenceIndex.

◆ layoutVertexSizeByOutdegree()

void Graph::layoutVertexSizeByOutdegree ( )

Convenience method Changes the size of all nodes to be proportional to their outDegree (Degree Centrality) Calls layoutByProminenceIndex.

◆ minmax()

void Graph::minmax ( qreal  C,
GraphVertex v,
qreal &  max,
qreal &  min,
int &  maxNode,
int &  minNode 
)
private

Computes minimum and maximum centralities during graphDistancesGeodesic()

Parameters
C
v
max
min
maxNode
minNode

◆ numberOfTriples()

qreal Graph::numberOfTriples ( int  v1)

Returns the number of triples of vertex v1 A triple Υ at a vertex v is a path of length two for which v is the center vertex.

◆ operateSpider

void Graph::operateSpider ( )
signal

Signals to Crawler threads

◆ prestigeDegree()

void Graph::prestigeDegree ( const bool &  weights,
const bool &  dropIsolates = false 
)

Computes the Degree Prestige (in-degree) of each vertex - diagonal included Also the mean value and the variance of the in-degrees.

Parameters
weights
dropIsolates

◆ prestigePageRank()

void Graph::prestigePageRank ( const bool &  dropIsolates = false)

Calculates the PageRank Prestige of each vertex.

Parameters
dropIsolates

◆ prestigeProximity()

void Graph::prestigeProximity ( const bool  considerWeights = false,
const bool  inverseWeights = false,
const bool  dropIsolates = false 
)

Computes Proximity Prestige of each vertex Also the mean value and the variance of it..

◆ prominenceDistribution()

void Graph::prominenceDistribution ( const int &  index,
const ChartType type,
const QString &  distImageFileName = QString() 
)

Computes the distribution of a centrality index score. The distribution is stored as Qt Series depending on the SeriesType parameter type It is send to MW through signal/slot.

Parameters
index
type

◆ prominenceDistributionArea()

void Graph::prominenceDistributionArea ( const H_StrToInt discreteClasses,
const QString &  name,
const QString &  distImageFileName 
)

Computes the distribution of a centrality index scores. The distribution data are returned as QAreaSeries series to MW which in turn displays them on a Area Chart.

Parameters
index
series

◆ prominenceDistributionBars()

void Graph::prominenceDistributionBars ( const H_StrToInt discreteClasses,
const QString &  name,
const QString &  distImageFileName 
)

Computes the distribution of a centrality index scores. The distribution data are returned as QBarSeries series (with a QBarSet attached) to MW which in turn displays them on a Bar Chart.

Parameters
index
series
set
strX

◆ prominenceDistributionSpline()

void Graph::prominenceDistributionSpline ( const H_StrToInt discreteClasses,
const QString &  seriesName,
const QString &  distImageFileName 
)

Computes the distribution of a centrality index scores. The distribution data are returned as QSplineSeries series to MW which in turn displays them on a Spline Chart.

Parameters
index
series

◆ randomizeThings()

void Graph::randomizeThings ( )

Adds a little universal randomness :)

RANDOM NETWORKS

◆ randomNetErdosCreate()

void Graph::randomNetErdosCreate ( const int &  N,
const QString &  model,
const int &  m,
const qreal &  p,
const QString &  mode,
const bool &  diag 
)

Create an erdos-renyi random network according to the given model.

Parameters
vert
model
edges
eprob
mode
diag

◆ randomNetLatticeCreate()

void Graph::randomNetLatticeCreate ( const int &  N,
const int &  length,
const int &  dimension,
const int &  neighborhoodLength,
const QString &  mode,
const bool &  circular = false 
)

Creates a lattice network.

Parameters
N
length
dimension
neighborhood
mode
diag

◆ randomNetRegularCreate()

void Graph::randomNetRegularCreate ( const int &  N,
const int &  degree,
const QString &  mode,
const bool &  diag 
)

Creates a random network where nodes have the same degree.

Parameters
vert
degree

◆ randomNetRingLatticeCreate()

void Graph::randomNetRingLatticeCreate ( const int &  N,
const int &  degree,
const bool  updateProgress = false 
)

Creates a random ring lattice network.

Parameters
vert
degree
x0
y0
radius
updateProgress

◆ randomNetScaleFreeCreate()

void Graph::randomNetScaleFreeCreate ( const int &  N,
const int &  power,
const int &  m0,
const int &  m,
const qreal &  alpha,
const QString &  mode 
)

Creates a scale-free random-network network.

Parameters
N
power
m0
m
alpha
mode

◆ randomNetSmallWorldCreate()

void Graph::randomNetSmallWorldCreate ( const int &  N,
const int &  degree,
const double &  beta,
const QString &  mode 
)

Creates a small world random network.

Parameters
vert
degree
beta

◆ relationAdd()

void Graph::relationAdd ( const QString &  relName,
const bool &  changeRelation = false 
)

Graph::relationAdd Adds a new relation named relName Called by file parser to add a new relation Also called from MW. emits signalRelationAddToMW.

Parameters
relName

◆ relationCurrent

int Graph::relationCurrent ( )
slot

Returns current relation number.

Returns
int

◆ relationCurrentName

QString Graph::relationCurrentName ( ) const
slot

Returns current relation.

Returns
string current relation name

◆ relationCurrentRename

void Graph::relationCurrentRename ( const QString &  newName,
const bool &  notifyMW = false 
)
slot

Graph::relationCurrentRename.

Parameters
newName

◆ relationNext

void Graph::relationNext ( )
slot

Graph::slotEditRelationNext Increases the rel number of editRelationChangeCombo which signals to Graph::relationSet()

◆ relationPrev

void Graph::relationPrev ( )
slot

Graph::slotEditRelationPrev Decreases the rel number of editRelationChangeCombo which signals to Graph::relationSet()

◆ relations()

int Graph::relations ( )

Graph::relations.

Returns
Returns the number of relationships in this Graph

◆ relationsClear()

void Graph::relationsClear ( )

Graph::relationsClear.

Returns
Clears relationships in this Graph

◆ relationSet

void Graph::relationSet ( int  relNum = RAND_MAX,
const bool  notifyMW = true 
)
slot

Changes m_curRelation to relNum. If relNum==RAND_MAX, changes to last added relation. Then calls GraphVertex::relationSet() for all enabled vertices, to disable edges of the old relation and enable edges of the new relation Then, if notifyMW==TRUE, it signals signalRelationChangedToGW(int), which disables/enables the on screen edges, and Called from MW when the user selects a relation in the combo box. Also called from Parser.

Slots to signals from MainWindow

Parameters
relNumint
notifyMWbool

◆ resolveClasses() [1/2]

void Graph::resolveClasses ( qreal  C,
H_StrToInt discreteClasses,
int &  classes 
)
private

Checks if score C is a new prominence class If yes, it stores that number in a QHash<QString,int> type where the score is the key. If no, increases the frequency of this prominence score by 1 Called from graphDistancesGeodesic()

Parameters
C
discreteClasses
classes

◆ resolveClasses() [2/2]

void Graph::resolveClasses ( qreal  C,
H_StrToInt discreteClasses,
int &  classes,
int  vertex 
)
private

Overloaded method. It only adds displaying current vertex for debugging purposes.

Parameters
C
discreteClasses
classes
vertex

◆ setEdgeColor

void Graph::setEdgeColor ( const int &  v1,
const int &  v2,
const QString &  color 
)
signal

◆ setEdgeLabel

void Graph::setEdgeLabel ( const int &  v1,
const int &  v2,
const QString &  label 
)
signal

◆ setEdgeVisibility

void Graph::setEdgeVisibility ( int  ,
int  ,
int  ,
bool   
)
signal

◆ setEdgeWeight

void Graph::setEdgeWeight ( const int &  v1,
const int &  v2,
const qreal &  weight 
)
signal

◆ setNodeColor

void Graph::setNodeColor ( const int &  v,
const QString &  color 
)
signal

◆ setNodeLabel

void Graph::setNodeLabel ( const int &  v,
const QString &  label 
)
signal

◆ setNodeLabelColor

void Graph::setNodeLabelColor ( const int &  v,
const QString &  color 
)
signal

◆ setNodeLabelDistance

void Graph::setNodeLabelDistance ( const int &  v,
const int &  distance 
)
signal

◆ setNodeLabelSize

void Graph::setNodeLabelSize ( const int &  v,
const int &  size 
)
signal

◆ setNodeNumberColor

void Graph::setNodeNumberColor ( const int &  v,
const QString &  color 
)
signal

◆ setNodeNumberDistance

void Graph::setNodeNumberDistance ( const int &  v,
const int &  distance 
)
signal

◆ setNodeNumberSize

void Graph::setNodeNumberSize ( const int &  v,
const int &  size 
)
signal

◆ setNodePos

void Graph::setNodePos ( const int &  ,
const qreal &  ,
const qreal &   
)
signal

◆ setNodeShape

void Graph::setNodeShape ( const int &  v,
const QString &  shape,
const QString &  iconPath = QString() 
)
signal

◆ setNodeSize

void Graph::setNodeSize ( const int &  v,
const int &  size 
)
signal

◆ setReportsChartType()

void Graph::setReportsChartType ( const int &  type)

Sets the chart type in reports.

Parameters
type

◆ setReportsDataDir()

void Graph::setReportsDataDir ( const QString &  dir)

Sets the directory where reports are saved This is used when exporting prominence distribution images to be used in HTML reports.

Parameters
dir

◆ setReportsLabelLength()

void Graph::setReportsLabelLength ( const int &  length)

Sets the length of labels in reports.

Parameters
length

◆ setReportsRealNumberPrecision()

void Graph::setReportsRealNumberPrecision ( const int &  precision)

Sets the precision (number of fraction digits) the app will use when writing real numbers in reports.

Parameters
precision

◆ setSocNetV_Version()

void Graph::setSocNetV_Version ( QString  ver)
inline

◆ setVertexVisibility

void Graph::setVertexVisibility ( int  ,
bool   
)
signal

◆ sign()

int Graph::sign ( const qreal &  D)

Graph::sign returns the sign of number D as integer (1 or -1)

Parameters
D
Returns

◆ signalDatasetDescription

void Graph::signalDatasetDescription ( QString  )
signal

◆ signalDrawEdge

void Graph::signalDrawEdge ( const int &  v1,
const int &  v2,
const qreal &  weight,
const QString &  label = "",
const QString &  color = "black",
const int &  type = 0,
const bool &  drawArrows = true,
const bool &  bezier = false,
const bool &  weightNumbers = false 
)
signal

◆ signalDrawNode

void Graph::signalDrawNode ( const QPointF &  p,
const int &  num,
const int &  size,
const QString &  nodeShape,
const QString &  nodeIconPath,
const QString &  nodeColor,
const QString &  numberColor,
const int &  numSize,
const int &  numDistance,
const QString &  label,
const QString &  labelColor,
const int &  labelSize,
const int &  labelDistance 
)
signal

Signals to GraphicsWidget

◆ signalEdgeClicked

void Graph::signalEdgeClicked ( const MyEdge edge = MyEdge(),
const bool &  openMenu = false 
)
signal

◆ signalEdgeType

void Graph::signalEdgeType ( const int &  v1,
const int &  v2,
const int &  type 
)
signal

◆ signalGraphLoaded

void Graph::signalGraphLoaded ( const int &  fileType,
const QString &  fileName = QString(),
const QString &  netName = QString(),
const int &  totalNodes = 0,
const int &  totalLinks = 0,
const QString &  message = QString() 
)
signal

◆ signalGraphModified

void Graph::signalGraphModified ( const bool &  undirected,
const int &  vertices,
const int &  edges,
const qreal &  density 
)
signal

◆ signalGraphSavedStatus

void Graph::signalGraphSavedStatus ( const int &  status)
signal

◆ signalNodeClickedInfo

void Graph::signalNodeClickedInfo ( const int &  number = 0,
const QPointF &  p = QPointF(),
const QString &  label = QString(),
const int &  inDegree = 0,
const int &  outDegree = 0,
const qreal &  clc = 0 
)
signal

◆ signalNodesFound

void Graph::signalNodesFound ( const QList< int >  foundList)
signal

◆ signalProgressBoxCreate

void Graph::signalProgressBoxCreate ( const int  max = 0,
const QString  msg = "Please wait" 
)
signal

Signals to MainWindow

◆ signalProgressBoxKill

void Graph::signalProgressBoxKill ( const int  max = 0)
signal

◆ signalProgressBoxUpdate

void Graph::signalProgressBoxUpdate ( const int &  count = 0)
signal

◆ signalPromininenceDistributionChartUpdate

void Graph::signalPromininenceDistributionChartUpdate ( QAbstractSeries *  series,
QAbstractAxis *  axisX = Q_NULLPTR,
const qreal &  min = 0,
const qreal &  max = 0,
QAbstractAxis *  axisY = Q_NULLPTR,
const qreal &  minF = 0,
const qreal &  maxF = 0 
)
signal

◆ signalRelationAddToMW

void Graph::signalRelationAddToMW ( const QString &  newRelation,
const bool &  changeRelation = true 
)
signal

◆ signalRelationChangedToGW

void Graph::signalRelationChangedToGW ( int  )
signal

◆ signalRelationChangedToMW

void Graph::signalRelationChangedToMW ( const int &  relIndex = RAND_MAX)
signal

◆ signalRelationRenamedToMW

void Graph::signalRelationRenamedToMW ( const QString  newRelName)
signal

◆ signalRelationsClear

void Graph::signalRelationsClear ( )
signal

◆ signalRemoveEdge

void Graph::signalRemoveEdge ( const int &  v1,
const int &  v2,
const bool &  removeOpposite 
)
signal

◆ signalRemoveNode

void Graph::signalRemoveNode ( int  )
signal

◆ signalSelectionChanged

void Graph::signalSelectionChanged ( const int &  selectedVertices,
const int &  selectedEdges 
)
signal

◆ statusMessage

void Graph::statusMessage ( const QString &  message)
signal

◆ triadType_examine_MAN_label()

void Graph::triadType_examine_MAN_label ( int  mut,
int  asy,
int  nul,
GraphVertex vert1,
GraphVertex vert2,
GraphVertex vert3 
)

Examines the triad type (in Mutual-Asymmetric-Null label format) and increases by one the proper frequency element inside QList::triadTypeFreqs

◆ vertexClicked()

int Graph::vertexClicked ( ) const

Graph::vertexClicked.

Returns
int

◆ vertexClickedSet

void Graph::vertexClickedSet ( const int &  v1)
slot

Called from GW::userClickedNode(int) to update clicked vertex number and signal signalNodeClickedInfo(node info) to MW which shows node info on the status bar.

Parameters
v1

◆ vertexColor()

QColor Graph::vertexColor ( const int &  v1) const

Graph::vertexColor.

Parameters
v1
Returns

◆ vertexColorInit()

void Graph::vertexColorInit ( const QString &  color)

Graph::vertexColorInit default vertex color initialization.

Parameters
color

◆ vertexColorSet()

void Graph::vertexColorSet ( const int &  v1,
const QString &  color 
)

Changes the color of vertex v1.

Parameters
v1
color

◆ vertexCreate

void Graph::vertexCreate ( const int &  number,
const int &  size,
const QString &  color,
const QString &  numColor,
const int &  numSize,
const QString &  label,
const QString &  labelColor,
const int &  labelSize,
const QPointF &  p,
const QString &  shape,
const QString &  iconPath = QString(),
const bool &  signalMW = false 
)
slot

Creates a new vertex Main vertex creation slot, associated with homonymous signal from Parser. Adds a vertex to the Graph and signals drawNode to GW The new vertex has number num and specific color, label, label color, shape and position p.

Slots to signals from Parser

Parameters
num
size
nodeColor
numColor
numSize
label
lColor
lSize
p
nodeShape
signalMW

◆ vertexCreateAtPos

void Graph::vertexCreateAtPos ( const QPointF &  p)
slot

Create a new vertex a a giver position Called from GW, with i and p as parameters. Calls the main creation slot with init node values.

Parameters
pThe clicked pos of the new node.

◆ vertexCreateAtPosRandom

void Graph::vertexCreateAtPosRandom ( const bool &  signalMW = false)
slot

Graph::vertexCreateAtPosRandom.

Parameters
iCreates a new random positioned vertex Called from MW only Computes a random position p inside the useable canvas area Then calls the main creation slot with init node values.

◆ vertexCreateAtPosRandomWithLabel

void Graph::vertexCreateAtPosRandomWithLabel ( const int &  i,
const QString &  label,
const bool &  signalMW = false 
)
slot

Graph::vertexCreateAtPosRandomWithLabel.

Parameters
i
labelCreates a new random positioned vertex with number i and label Called from WebCrawler and Parser with parameters label and i. Computes a random position p the useable canvas area Then calls the main creation slot with init node values.

◆ vertexDegreeIn()

int Graph::vertexDegreeIn ( int  v1)

Returns the inDegree (sum of inbound edge weights) of vertex v1.

Parameters
v1
Returns

◆ vertexDegreeOut()

int Graph::vertexDegreeOut ( int  v1)

Returns the outDegree (sum of outbound edge weights) of vertex v1.

Parameters
v1
Returns

◆ vertexEdgesInbound()

int Graph::vertexEdgesInbound ( int  v1)

Returns the number of inbound edges (arcs) to vertex v1.

Parameters
v1
Returns
int

◆ vertexEdgesOutbound()

int Graph::vertexEdgesOutbound ( int  v1)

Returns the number of outbound edges (arcs) from vertex v1.

Parameters
v1
Returns

◆ vertexExists() [1/2]

int Graph::vertexExists ( const int &  v1)

Graph::vertexExists Checks if there is a specific vertex in the graph. Returns the vpos or -1 Complexity: O(logN) for vpos retrieval.

Parameters
vertexnumber
Returns
vertex pos or -1

◆ vertexExists() [2/2]

int Graph::vertexExists ( const QString &  label)

Checks if there is a vertex with a specific label in the graph Returns the vpos or -1 Complexity: O(N)

Parameters
label
Returns
vpos or -1

◆ vertexFindByIndexScore()

bool Graph::vertexFindByIndexScore ( const int &  index,
const QStringList &  thresholds 
)

Finds vertices by their index score.

Parameters
QStringList
Returns

◆ vertexFindByLabel()

bool Graph::vertexFindByLabel ( const QStringList &  labelList)

Finds vertices by their label.

Parameters
QStringList
Returns

◆ vertexFindByNumber()

bool Graph::vertexFindByNumber ( const QStringList &  numList)

Finds vertices in strList by their number.

Parameters
QStringList
Returns

◆ vertexinfluenceDomain()

QList< int > Graph::vertexinfluenceDomain ( int  v1)

Returns the influence domain of vertex v1, namely the set of nodes who can reach v1 The Influence Domain Ii of vertex v can also be defined as: Ii = Sum [ D(i,v), iff D(i,v) != inf ] for every in V, where i!=v and D the distance matrix This function applies to digraphs only.

Parameters
v1
Returns

◆ vertexinfluenceRange()

QList< int > Graph::vertexinfluenceRange ( int  v1)

Returns the influence range of vertex v1, namely the set of nodes who are reachable from v1 (See Wasserman and Faust, pp.200-201, based on Lin, 1976). The Influence Range of vertex v can also be defined as: Ji = Sum [ D(v,j), iff D(v,j) != inf ] for every j in V, where j!=v and D the distance matrix This function is for digraphs only.

Parameters
v1
Returns

◆ vertexIsolated()

bool Graph::vertexIsolated ( const int &  v1) const

Checks if vertex is isolated.

Parameters
v1
Returns

◆ vertexIsolatedAllToggle

void Graph::vertexIsolatedAllToggle ( const bool &  toggle)
slot

Called from MainWindow to enable/disable isolate vertices (with no links) For each isolate vertex in the Graph, emits the setVertexVisibility signal.

Parameters
toggle

◆ vertexLabel()

QString Graph::vertexLabel ( const int &  v) const

Returns the label of a vertex v1.

Parameters
v1
Returns

◆ vertexLabelColorInit()

void Graph::vertexLabelColorInit ( QString  color)

Graph::vertexLabelColorInit Changes the default vertex label color.

Parameters
color

◆ vertexLabelColorSet()

void Graph::vertexLabelColorSet ( const int &  v1,
const QString &  color 
)

Changes the label color of vertex v1 or all vertices if v1 = 0.

Parameters
v1
color

◆ vertexLabelDistanceAllSet()

void Graph::vertexLabelDistanceAllSet ( const int &  newDistance)

Changes the distance.of all vertex labels from their vertices.

Parameters
size

◆ vertexLabelDistanceInit()

void Graph::vertexLabelDistanceInit ( const int &  distance)

Changes the default distance of vertex labels.

Parameters
distance

◆ vertexLabelDistanceSet()

void Graph::vertexLabelDistanceSet ( const int &  v,
const int &  newDistance 
)

Changes the distance.of vertex v label from the vertex.

Parameters
v
size

◆ vertexLabelSet()

void Graph::vertexLabelSet ( const int &  v1,
const QString &  label 
)

Changes the label of a vertex v1.

Parameters
v1
label

◆ vertexLabelSizeInit()

void Graph::vertexLabelSizeInit ( int  newSize)

Graph::vertexLabelSizeInit Changes the default size of vertex labels.

Parameters
newSize

◆ vertexLabelSizeSet()

void Graph::vertexLabelSizeSet ( const int &  v1,
const int &  labelSize 
)

Changes the label size of vertex v1 or all vertices if v1=0.

Parameters
v1
size

◆ vertexLabelsVisibilitySet()

void Graph::vertexLabelsVisibilitySet ( bool  toggle)

◆ vertexNeighborhoodList()

QList< int > Graph::vertexNeighborhoodList ( const int &  v1)

Returns a list of all vertices mutually connected to vertex v1 in the current relation.

Parameters
v1
Returns
QList<int>

◆ vertexNumberColorInit()

void Graph::vertexNumberColorInit ( const QString &  color)

Changes the initial color of the vertex numbers.

Parameters
color

◆ vertexNumberColorSet()

void Graph::vertexNumberColorSet ( const int &  v1 = 0,
const QString &  color = "#000000" 
)

Graph::vertexColorSet Changes the color of vertex v1.

Parameters
v1
color

◆ vertexNumberDistanceInit()

void Graph::vertexNumberDistanceInit ( const int &  distance)

Changes the initial distance of vertex numbers.

Parameters
distance

◆ vertexNumberDistanceSet()

void Graph::vertexNumberDistanceSet ( const int &  v,
const int &  newDistance 
)

Changes the distance.of vertex v number from the vertex.

Parameters
v
size

◆ vertexNumberMax()

int Graph::vertexNumberMax ( )

Graph::vertexNumberMax Returns the name of the last vertex. Used by slotEditNodeRemove of MW.

Returns
int

◆ vertexNumberMin()

int Graph::vertexNumberMin ( )

Graph::vertexNumberMin Returns the name of the first vertex. Used by slotRemoveNode of MW.

Returns
int

◆ vertexNumberSizeInit()

void Graph::vertexNumberSizeInit ( const int &  size)

Changes the initial size of vertex numbers.

Parameters
size

◆ vertexNumberSizeSet()

void Graph::vertexNumberSizeSet ( const int &  v,
const int &  size 
)

Changes the size of vertex v number.

Parameters
v
size

◆ vertexPos()

QPointF Graph::vertexPos ( const int &  v1) const

Graph::vertexPos.

Parameters
v1
Returns

◆ vertexPosSet()

void Graph::vertexPosSet ( const int &  v1,
const int &  x,
const int &  y 
)

Graph::vertexPosSet Called from MW/GW when node moves to update its position.

Parameters
v1
x
y

◆ vertexRemove()

void Graph::vertexRemove ( const int &  v1)

Removes the vertex v1 from the graph First, it removes all edges to doomed from other vertices Then it changes the vpos of all subsequent vertices inside m_graph Finally, it removes the vertex.

Parameters
intv1

◆ vertexRemoveDummyNode

void Graph::vertexRemoveDummyNode ( int  i)
slot

Deletes any dymmy nodes This is called from loadPajek method of Parser in order to delete any redundant (dummy) nodes.

Parameters
[in]inumber of node

◆ vertexShape()

QString Graph::vertexShape ( const int &  v1)

Returns the shape of this vertex.

Parameters
v1
Returns

◆ vertexShapeIconPath()

QString Graph::vertexShapeIconPath ( const int &  v1)

Returns the IconPath of vertex v1.

Parameters
v1
Returns

◆ vertexShapeSet()

void Graph::vertexShapeSet ( const int &  v1,
const QString &  shape,
const QString &  iconPath = QString() 
)

Changes the shape and iconPath of vertex v1, or all vertices if v1=-1.

Parameters
v1
shape
iconPath

◆ vertexShapeSetDefault()

void Graph::vertexShapeSetDefault ( const QString  shape,
const QString &  iconPath = QString() 
)

Sets the default vertex shape and iconPath Called by MW::initApp()

Parameters
shape

◆ vertexSize()

int Graph::vertexSize ( const int &  v) const

Returns the size of vertex v.

Parameters
v
Returns
int

◆ vertexSizeInit()

void Graph::vertexSizeInit ( const int  size)

Graph::vertexSizeInit Initialization function.

Parameters
size

◆ vertexSizeSet()

void Graph::vertexSizeSet ( const int &  v,
const int &  size 
)

Changes the size.of a vertex v or all vertices if v=0 Called from MW (i.e. user changing node properties)

Parameters
v
size

◆ vertices()

int Graph::vertices ( const bool &  dropIsolates = false,
const bool &  countAll = false,
const bool &  recount = false 
)

Returns the set of all vertices mutually connected to vertex v1 in the current relation.

Parameters
v1
Returns
QList<int>

Returns the number |V| of graph If countAll = true, returns |V| where V the set of all (enabled or not) vertices If countAll = false, it skips disabled vertices If countAll = false and dropIsolates = true, it skips both disabled and isolated vertices

Parameters
dropIsolates
countAll
Returns

◆ verticesCreateSubgraph()

void Graph::verticesCreateSubgraph ( QList< int >  vList,
const int &  type = SUBGRAPH_CLIQUE,
const int &  center = 0 
)

Creates a subgraph (clique, star, cycle, line) with vertices in vList Iff vList is empty, then fallbacks to the m_verticesSelected.

Parameters
vList

◆ verticesList()

QList< int > Graph::verticesList ( )

Returns a list of all vertices numbers inside the graph.

Returns

◆ verticesListIsolated()

QList< int > Graph::verticesListIsolated ( )

Returns a list of all isolated vertices inside the graph Used by Graph::graphMatrixAdjacencyCreate() Graph::writeMatrixAdjacencyInvert() Graph::centralityInformation()

Returns

◆ verticesSet()

QSet< int > Graph::verticesSet ( )

Returns a QSet of all vertices numbers inside the graph.

Returns

◆ verticesWithInboundEdges()

int Graph::verticesWithInboundEdges ( )

Returns the sum of vertices having edgesInbound.

Returns

◆ verticesWithOutboundEdges()

int Graph::verticesWithOutboundEdges ( )

Returns the sum of vertices having edgesOutbound.

Returns

◆ verticesWithReciprocalEdges()

int Graph::verticesWithReciprocalEdges ( )

Returns the sum of vertices having reciprocal edges.

Returns

◆ walksBetween()

int Graph::walksBetween ( int  v1,
int  v2,
int  length 
)

Calculates and returns the number of walks of a given length between v1 and v2.

Parameters
v1
v2
length
Returns

◆ webCrawl

void Graph::webCrawl ( const QString &  seedUrl,
const QStringList &  urlPatternsIncluded,
const QStringList &  urlPatternsExcluded,
const QStringList &  linkClasses,
const int &  maxNodes,
const int &  maxLinksPerPage,
const bool &  intLinks,
const bool &  childLinks,
const bool &  parentLinks,
const bool &  selfLinks,
const bool &  extLinksIncluded,
const bool &  extLinksCrawl,
const bool &  socialLinks,
const bool &  delayedRequests 
)
slot

Called by MW to start a web crawler thread...

Parameters
seed
maxNodes
maxRecursion
extLinks
intLinks

◆ webCrawlTerminateThreads()

void Graph::webCrawlTerminateThreads ( QString  reason)

called from Graph, when closing network, to terminate all processes Also called indirectly when wc_spider finishes

Parameters
reason

◆ writeCentralityBetweenness()

void Graph::writeCentralityBetweenness ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes Betweenness centralities to file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityCloseness()

void Graph::writeCentralityCloseness ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes the closeness centralities to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityClosenessInfluenceRange()

void Graph::writeCentralityClosenessInfluenceRange ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes the "improved" closeness centrality indices to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityDegree()

void Graph::writeCentralityDegree ( const QString  fileName,
const bool  considerWeights,
const bool  dropIsolates 
)

Writes the Degree Centrality to a file.

Parameters
fileName
considerWeights
dropIsolates

◆ writeCentralityEccentricity()

void Graph::writeCentralityEccentricity ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes the Eccentricity centralities (aka Harary Graph Centrality) to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityEigenvector()

void Graph::writeCentralityEigenvector ( const QString  fileName,
const bool &  considerWeights = true,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false 
)

Writes the eigenvector centralities to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityInformation()

void Graph::writeCentralityInformation ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights 
)

Writes the information centralities to file.

Parameters
fileName
considerWeights
inverseWeights

◆ writeCentralityPower()

void Graph::writeCentralityPower ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes Power Centralities to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCentralityStress()

void Graph::writeCentralityStress ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Writes the Stress centralities to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeCliqueCensus()

bool Graph::writeCliqueCensus ( const QString &  fileName,
const bool  considerWeights 
)

Graph::writeCliqueCensus Calls graphCliques() to compute all cliques (maximal connected subgraphs) of the network. Then writes the results into a file, along with the Actor by clique analysis, the Co-membership matrix and the Hierarchical clustering of overlap matrix.

Parameters
fileName
considerWeights

Write the actor by clique analysis matrix. For each actor-clique pair, we compute the proportion of clique members adjacent

Write the actor by actor analysis matrix. For each pair, we compute their clique co-membership

Write the Hierarchical clustering of overlap matrix

◆ writeClusteringCoefficient()

void Graph::writeClusteringCoefficient ( const QString  fileName,
const bool  considerWeights 
)

Graph::writeClusteringCoefficient Writes the clustering coefficients to a file.

Parameters
fileName
considerWeights

◆ writeClusteringHierarchical()

bool Graph::writeClusteringHierarchical ( const QString &  fileName,
const QString &  varLocation,
const QString &  matrix = "Adjacency",
const QString &  metric = "Manhattan",
const QString &  method = "Complete",
const bool &  diagonal = false,
const bool &  dendrogram = false,
const bool &  considerWeights = true,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false 
)

Writes Hierarchical Clustering Analysis to a given file.

Parameters
fileName
matrix
similarityMeasure
method
considerWeights
inverseWeights
dropIsolates

◆ writeClusteringHierarchicalResultsToStream()

void Graph::writeClusteringHierarchicalResultsToStream ( QTextStream &  outText,
const int  N,
const bool &  dendrogram = false 
)

Writes Hierarchical Clustering results to given output stream Before running this methos, the method Graph::graphClusteringHierarchical() must execute and return true. Otherwise, the result is unpredictable...

Parameters
outText
N
dendrogram

◆ writeDataSetToFile()

void Graph::writeDataSetToFile ( const QString  dir,
const QString  fileName 
)

Writes a "famous" dataset to the given file Datasets are hardcoded! They are exported in the given fileName...

Parameters
fileName

◆ writeEccentricity()

void Graph::writeEccentricity ( const QString  fileName,
const bool  considerWeights = false,
const bool  inverseWeights = false,
const bool  dropIsolates = false 
)

Writes the Eccentricity scores to file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeMatrix()

void Graph::writeMatrix ( const QString &  fn,
const int &  matrix = MATRIX_ADJACENCY,
const bool &  considerWeights = true,
const bool &  inverseWeights = false,
const bool &  dropIsolates = false,
const QString &  varLocation = "Rows",
const bool &  simpler = false 
)

Writes the specified matrix of social network to file fn

◆ writeMatrixAdjacency()

void Graph::writeMatrixAdjacency ( const QString  fn,
const bool &  markDiag = true 
)

Writes the adjacency matrix of G to a specified file fn

◆ writeMatrixAdjacencyInvert()

void Graph::writeMatrixAdjacencyInvert ( const QString &  fn,
const QString &  method 
)

Calls Graph::graphMatrixAdjacencyInvert(method) to compute the inverse of the adjacency matrix and writes it to file fn in HTML notation.

Parameters
fn
method

◆ writeMatrixAdjacencyPlot()

void Graph::writeMatrixAdjacencyPlot ( const QString  fn,
const bool &  simpler = false 
)

Writes a visual representation of the adjacency matrix of G to a specified file fn This is called by MainWindow::slotViewAdjacencyMatrixPlotText() The resulting matrix HAS NO spaces between elements.

◆ writeMatrixAdjacencyTo()

void Graph::writeMatrixAdjacencyTo ( QTextStream &  os,
const bool &  saveEdgeWeights = true 
)

Exports the adjacency matrix to a given textstream

◆ writeMatrixDegreeText()

void Graph::writeMatrixDegreeText ( const QString &  fn)

Computes the Degree matrix of the graph and writes it to given file.

Parameters
fn

◆ writeMatrixDissimilarities()

void Graph::writeMatrixDissimilarities ( const QString  fileName,
const QString &  metricStr,
const QString &  varLocation,
const bool &  diagonal,
const bool &  considerWeights 
)

Writes dissimilarity matrix based on a metric/measure to given html file.

Parameters
fileName
measure
varLocation
diagonal
considerWeights

◆ writeMatrixDistancesPlainText()

void Graph::writeMatrixDistancesPlainText ( const QString &  fn,
const bool &  considerWeights,
const bool &  inverseWeights,
const bool &  dropIsolates 
)

Graph::writeMatrixDistancesPlainText Writes the matrix of distances to a file.

Parameters
fn
considerWeights
inverseWeights
dropIsolates

◆ writeMatrixHTMLTable()

void Graph::writeMatrixHTMLTable ( QTextStream &  outText,
Matrix M,
const bool &  markDiag = true,
const bool &  plain = false,
const bool &  printInfinity = true,
const bool &  dropIsolates = false 
)

Writes the matrix M as HTML.

specified text stream outText It is the same as Matrix::printHTMLTable except that this method omits disabled vertices, thus the table header is correct

Parameters
outText
M
markDiag
plain
printInfinity

◆ writeMatrixLaplacianPlainText()

void Graph::writeMatrixLaplacianPlainText ( const QString &  fn)

Computes the Laplacian matrix of the graph and writes it to given file.

Parameters
fn

◆ writeMatrixShortestPathsPlainText()

void Graph::writeMatrixShortestPathsPlainText ( const QString &  fn,
const bool &  considerWeights,
const bool &  inverseWeights 
)

Writes the shortest paths matrix to a file Each SIGMA(i,j) element is the number of shortest paths (geodesics) from i and j.

Parameters
fn
considerWeights
inverseWeights

◆ writeMatrixSimilarityMatching()

void Graph::writeMatrixSimilarityMatching ( const QString  fileName,
const QString &  measure = "Simple",
const QString &  matrix = "adjacency",
const QString &  varLocation = "rows",
const bool &  diagonal = false,
const bool &  considerWeights = true 
)

Writes similarity matrix based on a matching measure to given html file.

Parameters
fileName
measure
matrix
varLocation
diagonal
considerWeights

◆ writeMatrixSimilarityMatchingPlain()

void Graph::writeMatrixSimilarityMatchingPlain ( const QString  fileName,
const int &  measure = METRIC_SIMPLE_MATCHING,
const QString &  matrix = "adjacency",
const QString &  varLocation = "rows",
const bool &  diagonal = false,
const bool &  considerWeights = true 
)

Writes similarity matrix based on a matching measure to given file.

Parameters
fileName
measure
matrix
varLocation
diagonal
considerWeights

◆ writeMatrixSimilarityPearson()

void Graph::writeMatrixSimilarityPearson ( const QString  fileName,
const bool  considerWeights,
const QString &  matrix = "adjacency",
const QString &  varLocation = "rows",
const bool &  diagonal = false 
)

Calls Graph::graphMatrixSimilarityPearsonCreate() and writes Pearson Correlation Coefficients to given file.

Parameters
fileName
considerWeights

◆ writeMatrixSimilarityPearsonPlainText()

void Graph::writeMatrixSimilarityPearsonPlainText ( const QString  fileName,
const bool  considerWeights,
const QString &  matrix = "adjacency",
const QString &  varLocation = "rows",
const bool &  diagonal = false 
)

Calls Graph::graphSimilariyPearsonCorrelationCoefficients() and writes Pearson Correlation Coefficients to given file.

Parameters
fileName
considerWeights

◆ writeMatrixWalks()

void Graph::writeMatrixWalks ( const QString &  fn,
const int &  length = 0,
const bool &  simpler = false 
)

Calls graphWalksMatrixCreate() to compute walks and writes the Walks of given length matrix to a file in HTML. If length = 0, it writes the Total Walks matrix.

Parameters
fn
length
simpler

◆ writePrestigeDegree()

void Graph::writePrestigeDegree ( const QString  fileName,
const bool  considerWeights,
const bool  dropIsolates 
)

Writes the Degree Prestige of each node to a file.

Parameters
fileName
considerWeights
dropIsolates

◆ writePrestigePageRank()

void Graph::writePrestigePageRank ( const QString  fileName,
const bool  dropIsolates = false 
)

Writes the PageRank scores of vertices to a file.

Parameters
fileName
dropIsolates

◆ writePrestigeProximity()

void Graph::writePrestigeProximity ( const QString  fileName,
const bool  considerWeights,
const bool  inverseWeights,
const bool  dropIsolates 
)

Graph::writePrestigeProximity Writes the proximity prestige indices to a file.

Parameters
fileName
considerWeights
inverseWeights
dropIsolates

◆ writeReachabilityMatrixPlainText()

void Graph::writeReachabilityMatrixPlainText ( const QString &  fn,
const bool &  dropIsolates = false 
)

Writes the reachability matrix X^R of the graph to a file

◆ writeReciprocity()

void Graph::writeReciprocity ( const QString  fileName,
const bool  considerWeights = false 
)

Writes reciprocity report to filename.

Parameters
fileName
considerWeights

◆ writeTriadCensus()

void Graph::writeTriadCensus ( const QString  fileName,
const bool  considerWeights 
)

◆ writeWalksOfLengthMatrixPlainText()

void Graph::writeWalksOfLengthMatrixPlainText ( const QString &  fn,
const int &  length 
)

◆ writeWalksTotalMatrixPlainText()

void Graph::writeWalksTotalMatrixPlainText ( const QString &  fn)

Graph::writeWalksTotalMatrixPlainText Writes the total number of walks matrix.

Parameters
fn
netName
length

Member Data Documentation

◆ actualDateTime

QDateTime Graph::actualDateTime
private

◆ AM

Matrix Graph::AM
private

◆ averageCLC

qreal Graph::averageCLC
private

◆ calculatedAdjacencyMatrix

bool Graph::calculatedAdjacencyMatrix
private

◆ calculatedCentralities

bool Graph::calculatedCentralities
private

◆ calculatedDC

bool Graph::calculatedDC
private

◆ calculatedDistances

bool Graph::calculatedDistances
private

◆ calculatedDP

bool Graph::calculatedDP
private

◆ calculatedEdges

bool Graph::calculatedEdges
private

◆ calculatedEVC

bool Graph::calculatedEVC
private

◆ calculatedGraphDensity

bool Graph::calculatedGraphDensity
private

◆ calculatedGraphReciprocity

bool Graph::calculatedGraphReciprocity
private

◆ calculatedGraphSymmetry

bool Graph::calculatedGraphSymmetry
private

◆ calculatedGraphWeighted

bool Graph::calculatedGraphWeighted
private

◆ calculatedIC

bool Graph::calculatedIC
private

◆ calculatedIRCC

bool Graph::calculatedIRCC
private

◆ calculatedIsolates

bool Graph::calculatedIsolates
private

◆ calculatedPP

bool Graph::calculatedPP
private

◆ calculatedPRP

bool Graph::calculatedPRP
private

◆ calculatedTriad

bool Graph::calculatedTriad
private

◆ calculatedVertices

bool Graph::calculatedVertices
private

◆ calculatedVerticesList

bool Graph::calculatedVerticesList
private

◆ calculatedVerticesSet

bool Graph::calculatedVerticesSet
private

◆ canvasHeight

qreal Graph::canvasHeight
private

◆ canvasWidth

qreal Graph::canvasWidth
private

◆ classesEC

int Graph::classesEC
private

◆ classesEccentricity

int Graph::classesEccentricity
private

◆ classesEVC

int Graph::classesEVC
private

◆ classesIC

int Graph::classesIC
private

◆ classesIRCC

int Graph::classesIRCC
private

◆ classesPP

int Graph::classesPP
private

◆ classesPRP

int Graph::classesPRP
private

◆ classesSBC

int Graph::classesSBC
private

◆ classesSCC

int Graph::classesSCC
private

◆ classesSDC

int Graph::classesSDC
private

◆ classesSDP

int Graph::classesSDP
private

◆ classesSPC

int Graph::classesSPC
private

◆ classesSSC

int Graph::classesSSC
private

◆ CLQM

Matrix Graph::CLQM
private

◆ csRecDepth

int Graph::csRecDepth
private

◆ d_factor

qreal Graph::d_factor
private

◆ denomEC

qreal Graph::denomEC
private

◆ denomEVC

qreal Graph::denomEVC
private

◆ denomIC

qreal Graph::denomIC
private

◆ denomIRCC

qreal Graph::denomIRCC
private

◆ denomPP

qreal Graph::denomPP
private

◆ denomPRC

qreal Graph::denomPRC
private

◆ denomSBC

qreal Graph::denomSBC
private

◆ denomSCC

qreal Graph::denomSCC
private

◆ denomSPC

qreal Graph::denomSPC
private

◆ discreteBCs

H_StrToInt Graph::discreteBCs
private

◆ discreteCCs

H_StrToInt Graph::discreteCCs
private

◆ discreteDPs

H_StrToInt Graph::discreteDPs
private

used in resolveClasses and graphDistancesGeodesic()

◆ discreteEccentricities

H_StrToInt Graph::discreteEccentricities
private

◆ discreteECs

H_StrToInt Graph::discreteECs
private

◆ discreteEVCs

H_StrToInt Graph::discreteEVCs
private

◆ discreteICs

H_StrToInt Graph::discreteICs
private

◆ discreteIRCCs

H_StrToInt Graph::discreteIRCCs
private

◆ discretePCs

H_StrToInt Graph::discretePCs
private

◆ discretePPs

H_StrToInt Graph::discretePPs
private

◆ discretePRPs

H_StrToInt Graph::discretePRPs
private

◆ discreteSCs

H_StrToInt Graph::discreteSCs
private

◆ discreteSDCs

H_StrToInt Graph::discreteSDCs
private

◆ DM

Matrix Graph::DM
private

◆ edgeReverseWeightTemp

qreal Graph::edgeReverseWeightTemp
private

◆ edgeWeightTemp

qreal Graph::edgeWeightTemp
private

◆ file_parser

Parser* Graph::file_parser
private

◆ file_parserThread

QThread Graph::file_parserThread
private

◆ fileName

QString Graph::fileName
private

◆ groupCC

qreal Graph::groupCC
private

◆ groupDC

qreal Graph::groupDC
private

◆ groupDP

qreal Graph::groupDP
private

◆ groupEC

qreal Graph::groupEC
private

◆ groupEVC

qreal Graph::groupEVC
private

◆ groupIRCC

qreal Graph::groupIRCC
private

◆ groupPP

qreal Graph::groupPP
private

◆ groupSBC

qreal Graph::groupSBC
private

◆ groupSC

qreal Graph::groupSC
private

◆ groupSPC

qreal Graph::groupSPC
private

◆ htmlEnd

QString Graph::htmlEnd
private

◆ htmlHead

QString Graph::htmlHead
private

◆ htmlHeadLight

QString Graph::htmlHeadLight
private

◆ inboundEdgesVert

int Graph::inboundEdgesVert
private

◆ influenceDomains

QMultiHash<int, int> Graph::influenceDomains
private

◆ influenceRanges

QMultiHash<int, int> Graph::influenceRanges
private

◆ initEdgeColor

QString Graph::initEdgeColor
private

◆ initEdgeLabels

bool Graph::initEdgeLabels
private

◆ initEdgeWeightNumbers

bool Graph::initEdgeWeightNumbers
private

◆ initVertexColor

QString Graph::initVertexColor
private

◆ initVertexIconPath

QString Graph::initVertexIconPath
private

◆ initVertexLabelColor

QString Graph::initVertexLabelColor
private

◆ initVertexLabelDistance

int Graph::initVertexLabelDistance
private

◆ initVertexLabelSize

int Graph::initVertexLabelSize
private

◆ initVertexNumberColor

QString Graph::initVertexNumberColor
private

◆ initVertexNumberDistance

int Graph::initVertexNumberDistance
private

◆ initVertexNumberSize

int Graph::initVertexNumberSize
private

◆ initVertexShape

QString Graph::initVertexShape
private

◆ initVertexSize

int Graph::initVertexSize
private

◆ invAM

Matrix Graph::invAM
private

◆ invM

Matrix Graph::invM
private

◆ m_canvas

GraphicsWidget* Graph::m_canvas
private

◆ m_clickedEdge

MyEdge Graph::m_clickedEdge
private

◆ m_cliques

QMultiMap<int, L_int > Graph::m_cliques
private

◆ m_clusteringLevel

QList<qreal> Graph::m_clusteringLevel
private

◆ m_clusterPairNamesPerSeq

QMap<int, V_str> Graph::m_clusterPairNamesPerSeq
private

◆ m_clustersByName

QMap<QString, V_int> Graph::m_clustersByName
private

◆ m_clustersPerSequence

QMap<int, V_int> Graph::m_clustersPerSequence
private

◆ m_curRelation

int Graph::m_curRelation
private

◆ m_fieldWidth

int Graph::m_fieldWidth
private

◆ m_fileFormat

int Graph::m_fileFormat
private

◆ m_graph

VList Graph::m_graph
private

List of pointers to the vertices. A vertex stores all the info: links, colours, etc

◆ m_graphAverageDistance

qreal Graph::m_graphAverageDistance
private

◆ m_graphDensity

qreal Graph::m_graphDensity
private

◆ m_graphDiameter

int Graph::m_graphDiameter
private

◆ m_graphFileFormatExportSupported

QList<int> Graph::m_graphFileFormatExportSupported
private

◆ m_graphGeodesicsCount

qreal Graph::m_graphGeodesicsCount
private

◆ m_graphHasChanged

int Graph::m_graphHasChanged
private

General & initialisation variables

◆ m_graphHasVertexCustomIcons

bool Graph::m_graphHasVertexCustomIcons
private

◆ m_graphIsConnected

bool Graph::m_graphIsConnected
private

◆ m_graphIsDirected

bool Graph::m_graphIsDirected
private

◆ m_graphIsSymmetric

bool Graph::m_graphIsSymmetric
private

◆ m_graphIsWeighted

bool Graph::m_graphIsWeighted
private

◆ m_graphName

QString Graph::m_graphName
private

◆ m_graphReciprocityArc

qreal Graph::m_graphReciprocityArc
private

◆ m_graphReciprocityDyad

qreal Graph::m_graphReciprocityDyad
private

◆ m_graphReciprocityPairsReciprocated

int Graph::m_graphReciprocityPairsReciprocated
private

◆ m_graphReciprocityPairsTotal

int Graph::m_graphReciprocityPairsTotal
private

◆ m_graphReciprocityTiesNonSymmetric

int Graph::m_graphReciprocityTiesNonSymmetric
private

◆ m_graphReciprocityTiesReciprocated

int Graph::m_graphReciprocityTiesReciprocated
private

◆ m_graphReciprocityTiesTotal

int Graph::m_graphReciprocityTiesTotal
private

◆ m_graphSumDistance

qreal Graph::m_graphSumDistance
private

◆ m_relationsList

QList<QString> Graph::m_relationsList
private

◆ m_reportsChartType

ChartType Graph::m_reportsChartType
private

◆ m_reportsDataDir

QString Graph::m_reportsDataDir
private

◆ m_reportsLabelLength

int Graph::m_reportsLabelLength
private

◆ m_reportsRealPrecision

int Graph::m_reportsRealPrecision
private

◆ m_selectedEdges

QList<SelectedEdge> Graph::m_selectedEdges
private

◆ m_totalEdges

int Graph::m_totalEdges
private

◆ m_totalVertices

int Graph::m_totalVertices
private

◆ m_vertexClicked

int Graph::m_vertexClicked
private

◆ m_vertexPairsNotConnected

QMultiHash<int, int> Graph::m_vertexPairsNotConnected
private

◆ m_vertexPairsUnilaterallyConnected

QHash<int, int> Graph::m_vertexPairsUnilaterallyConnected
private

◆ m_verticesIsolatedList

QList<int> Graph::m_verticesIsolatedList
private

◆ m_verticesList

QList<int> Graph::m_verticesList
private

◆ m_verticesSelected

QList<int> Graph::m_verticesSelected
private

◆ m_verticesSet

QSet<int> Graph::m_verticesSet
private

◆ maxCLC

qreal Graph::maxCLC
private

◆ maxEC

qreal Graph::maxEC
private

◆ maxEccentricity

qreal Graph::maxEccentricity
private

◆ maxEVC

qreal Graph::maxEVC
private

◆ maxIC

qreal Graph::maxIC
private

◆ maxIndexBC

qreal Graph::maxIndexBC
private

◆ maxIndexCC

qreal Graph::maxIndexCC
private

◆ maxIndexEC

qreal Graph::maxIndexEC
private

◆ maxIndexIC

qreal Graph::maxIndexIC
private

◆ maxIndexPC

qreal Graph::maxIndexPC
private

◆ maxIndexSC

qreal Graph::maxIndexSC
private

◆ maxIRCC

qreal Graph::maxIRCC
private

◆ maxNodeCLC

int Graph::maxNodeCLC
private

◆ maxNodeDP

int Graph::maxNodeDP
private

◆ maxNodeEC

int Graph::maxNodeEC
private

◆ maxNodeEccentricity

int Graph::maxNodeEccentricity
private

◆ maxNodeEVC

int Graph::maxNodeEVC
private

◆ maxNodeIC

int Graph::maxNodeIC
private

◆ maxNodeIRCC

int Graph::maxNodeIRCC
private

◆ maxNodePP

int Graph::maxNodePP
private

◆ maxNodePRP

int Graph::maxNodePRP
private

◆ maxNodeSBC

int Graph::maxNodeSBC
private

◆ maxNodeSCC

int Graph::maxNodeSCC
private

◆ maxNodeSDC

int Graph::maxNodeSDC
private

◆ maxNodeSPC

int Graph::maxNodeSPC
private

◆ maxNodeSSC

int Graph::maxNodeSSC
private

◆ maxPP

qreal Graph::maxPP
private

◆ maxPRP

qreal Graph::maxPRP
private

◆ maxSBC

qreal Graph::maxSBC
private

◆ maxSCC

qreal Graph::maxSCC
private

◆ maxSDC

qreal Graph::maxSDC
private

◆ maxSDP

qreal Graph::maxSDP
private

◆ maxSPC

qreal Graph::maxSPC
private

◆ maxSSC

qreal Graph::maxSSC
private

◆ meanEC

qreal Graph::meanEC
private

◆ meanEVC

qreal Graph::meanEVC
private

◆ meanIC

qreal Graph::meanIC
private

◆ meanIRCC

qreal Graph::meanIRCC
private

◆ meanPP

qreal Graph::meanPP
private

◆ meanPRP

qreal Graph::meanPRP
private

◆ meanSBC

qreal Graph::meanSBC
private

◆ meanSCC

qreal Graph::meanSCC
private

◆ meanSDC

qreal Graph::meanSDC
private

◆ meanSDP

qreal Graph::meanSDP
private

◆ meanSPC

qreal Graph::meanSPC
private

◆ meanSSC

qreal Graph::meanSSC
private

◆ minCLC

qreal Graph::minCLC
private

◆ minEC

qreal Graph::minEC
private

◆ minEccentricity

qreal Graph::minEccentricity
private

◆ minEVC

qreal Graph::minEVC
private

◆ minIC

qreal Graph::minIC
private

◆ minIRCC

qreal Graph::minIRCC
private

◆ minNodeCLC

int Graph::minNodeCLC
private

◆ minNodeDP

int Graph::minNodeDP
private

◆ minNodeEC

int Graph::minNodeEC
private

◆ minNodeEccentricity

int Graph::minNodeEccentricity
private

◆ minNodeEVC

int Graph::minNodeEVC
private

◆ minNodeIC

int Graph::minNodeIC
private

◆ minNodeIRCC

int Graph::minNodeIRCC
private

◆ minNodePP

int Graph::minNodePP
private

◆ minNodePRP

int Graph::minNodePRP
private

◆ minNodeSBC

int Graph::minNodeSBC
private

◆ minNodeSCC

int Graph::minNodeSCC
private

◆ minNodeSDC

int Graph::minNodeSDC
private

◆ minNodeSPC

int Graph::minNodeSPC
private

◆ minNodeSSC

int Graph::minNodeSSC
private

◆ minPP

qreal Graph::minPP
private

◆ minPRP

qreal Graph::minPRP
private

◆ minSBC

qreal Graph::minSBC
private

◆ minSCC

qreal Graph::minSCC
private

◆ minSDC

qreal Graph::minSDC
private

◆ minSDP

qreal Graph::minSDP
private

◆ minSPC

qreal Graph::minSPC
private

◆ minSSC

qreal Graph::minSSC
private

◆ neighboursHash

QHash<int, QSet<int> > Graph::neighboursHash
private

◆ nomEC

qreal Graph::nomEC
private

◆ nomEVC

qreal Graph::nomEVC
private

◆ nomIC

qreal Graph::nomIC
private

◆ nomIRCC

qreal Graph::nomIRCC
private

◆ nomPP

qreal Graph::nomPP
private

◆ nomPRC

qreal Graph::nomPRC
private

◆ nomSBC

qreal Graph::nomSBC
private

◆ nomSCC

qreal Graph::nomSCC
private

◆ nomSPC

qreal Graph::nomSPC
private

◆ order

bool Graph::order
private

◆ outboundEdgesVert

int Graph::outboundEdgesVert
private

◆ reciprocalEdgesVert

int Graph::reciprocalEdgesVert
private

◆ SIGMA

Matrix Graph::SIGMA
private

◆ sizeOfComponent

qreal Graph::sizeOfComponent
private

◆ sizeOfNthOrderNeighborhood

H_f_i Graph::sizeOfNthOrderNeighborhood

◆ Stack

stack<int> Graph::Stack
private

◆ sumBC

qreal Graph::sumBC
private

◆ sumCC

qreal Graph::sumCC
private

◆ sumDC

qreal Graph::sumDC
private

◆ sumDP

qreal Graph::sumDP
private

◆ sumEC

qreal Graph::sumEC
private

◆ sumEVC

qreal Graph::sumEVC
private

◆ sumIC

qreal Graph::sumIC
private

◆ sumIRCC

qreal Graph::sumIRCC
private

◆ sumM

Matrix Graph::sumM
private

◆ sumPC

qreal Graph::sumPC
private

◆ sumPP

qreal Graph::sumPP
private

◆ sumPRP

qreal Graph::sumPRP
private

◆ sumSBC

qreal Graph::sumSBC
private

◆ sumSC

qreal Graph::sumSC
private

◆ sumSCC

qreal Graph::sumSCC
private

◆ sumSDC

qreal Graph::sumSDC
private

◆ sumSDP

qreal Graph::sumSDP
private

◆ sumSEVC

qreal Graph::sumSEVC
private

◆ sumSPC

qreal Graph::sumSPC
private

◆ sumSSC

qreal Graph::sumSSC
private

◆ t_sumIC

qreal Graph::t_sumIC
private

◆ t_sumPRP

qreal Graph::t_sumPRP
private

◆ triadTypeFreqs

QList<int> Graph::triadTypeFreqs
private

◆ varianceCLC

qreal Graph::varianceCLC
private

◆ varianceEC

qreal Graph::varianceEC
private

◆ varianceEVC

qreal Graph::varianceEVC
private

◆ varianceIC

qreal Graph::varianceIC
private

◆ varianceIRCC

qreal Graph::varianceIRCC
private

◆ variancePP

qreal Graph::variancePP
private

◆ variancePRP

qreal Graph::variancePRP
private

◆ varianceSBC

qreal Graph::varianceSBC
private

◆ varianceSCC

qreal Graph::varianceSCC
private

◆ varianceSDC

qreal Graph::varianceSDC
private

◆ varianceSDP

qreal Graph::varianceSDP
private

◆ varianceSPC

qreal Graph::varianceSPC
private

◆ varianceSSC

qreal Graph::varianceSSC
private

◆ VERSION

QString Graph::VERSION
private

◆ vpos

H_Int Graph::vpos

vpos stores the real position of each vertex inside m_graph. It starts at zero (0). We need to know the place of a vertex inside m_graph after adding or removing many vertices

◆ wc_parser

WebCrawler_Parser* Graph::wc_parser
private

◆ wc_parserThread

QThread Graph::wc_parserThread
private

◆ wc_spider

WebCrawler_Spider* Graph::wc_spider
private

◆ wc_spiderThread

QThread Graph::wc_spiderThread
private

◆ WM

Matrix Graph::WM
private

◆ XM

Matrix Graph::XM
private

◆ XRM

Matrix Graph::XRM
private

◆ XSM

Matrix Graph::XSM
private

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