Code Documentation 3.5
Social Network Visualizer
Loading...
Searching...
No Matches
graphvertex.h
Go to the documentation of this file.
1
16#ifndef GRAPHVERTEX_H
17#define GRAPHVERTEX_H
18
19#include <QObject>
20#include <QString>
21#include <QStringList>
22#include <QHash>
23#include <QMultiHash>
24#include <QList>
25#include <QPointF>
26#include <QPair>
27
28#include <map>
29
30using namespace std;
31
32class Graph;
33
34
35typedef QList<int> L_int;
36
37typedef QHash<int,QString> H_IntToStr;
38typedef QHash <QString, int> H_StrToInt;
39
40typedef QPair <qreal, bool> pair_f_b;
41typedef QPair <int, pair_f_b > pair_i_fb;
42typedef QMultiHash < int, pair_i_fb > H_edges;
43
44typedef QPair <int, qreal > pair_i_f;
45typedef QHash < int, pair_i_f > H_distance;
46
47typedef QPair <int, int> pair_i_i;
48typedef QHash < int, pair_i_i > H_shortestPaths;
49
50
51class GraphVertex : public QObject{
52 Q_OBJECT
53
54public:
55
56 GraphVertex(Graph* parentGraph,
57 const int &name,
58 const int &relation,
59 const int &size,
60 const QString &color,
61 const QString &numColor,
62 const int &numSize,
63 const QString &label,
64 const QString &labelColor,
65 const int &labelSize,
66 const QPointF &p,
67 const QString &shape,
68 const QString &iconPath,
69 const int &edgesEstimate = 2000,
70 const QHash<QString,QString> &nodeAttr = QHash<QString,QString>()
71 );
72
73 GraphVertex(const int &name);
74
76
77 int number() const;
78 void setNumber(const int &number);
79
80 void setEnabled(const bool &status);
81 bool isEnabled () const;
82
83 void setSize(const int &size );
84 int size() const;
85
86 void setShape(const QString &shape, const QString &iconPath = QString());
87 QString shape() const;
88 QString shapeIconPath();
89
90 void setColor(const QString &color);
91 QString color() const;
92 QString colorToPajek();
93
94 void setNumberColor (const QString &color);
95 QString numberColor() const;
96
97 void setNumberSize (const int &size);
98 int numberSize() const;
99
100 void setNumberDistance (const int &distance);
101 int numberDistance() const;
102
103 void setLabel (const QString &label);
104 QString label() const;
105
106 void setLabelColor (const QString &labelColor);
107 QString labelColor() const;
108
109 void setLabelSize(const int &size);
110 int labelSize() const;
111
112 void setLabelDistance (const int &distance);
113 int labelDistance() const;
114
115 void setCustomAttributes(QHash<QString,QString> customAttributes);
116 QHash<QString,QString> customAttributes() const;
117
118 void setX(const qreal &x);
119 qreal x() const;
120
121 void setY(const qreal &y);
122 qreal y() const;
123
124 void setPos (QPointF &p);
125 QPointF pos () const;
126
127 void set_dispX (qreal x);
128 void set_dispY (qreal y);
129 QPointF & disp();
130
131 void setRelation(int newRel) ;
132
133 void addOutEdge (const int &v2, const qreal &weight, const QString &color=QString(), const QString &label=QString());
134 qreal hasEdgeTo(const int &v, const bool &allRelations=false);
135 void removeOutEdge (const int target);
136 void setOutEdgeWeight (const int &target, const qreal &weight);
137 void setOutEdgeEnabled (const int &target, bool);
138 void setOutLinkColor(const int &v2, const QString &color);
139 QString outLinkColor(const int &v2);
140 void setOutEdgeLabel(const int &v2, const QString &label);
141 QString outEdgeLabel(const int &v2) const;
142 void setOutEdgeCustomAttributes(const int &v2, const QHash<QString,QString> &attrs);
143 QHash<QString,QString> outEdgeCustomAttributes(const int &v2) const;
144
145 void addInEdge(const int &v1, const qreal &weight);
146 qreal hasEdgeFrom (const int &v, const bool &allRelations=false);
147 void removeInEdge(const int source);
148 void setInEdgeWeight (const int &source, const qreal &weight);
149 void setInEdgeEnabled (const int &source, bool);
150
151 int outEdgesCount();
152 int outEdgesCountConst() const ;
153
154 int inEdgesCount();
155 int inEdgesCountConst() const ;
156
157 bool isOutLinked();
158 bool isInLinked();
159
160 void setIsolated(bool isolated);
161 bool isIsolated();
162
163 const H_edges& outEdges() const { return m_outEdges; }
164 QHash<int, qreal> outEdgesEnabledHash(const bool &allRelations=false);
165 QHash<int,qreal>* outEdgesAllRelationsUniqueHash();
166
167 const H_edges& inEdges() const { return m_inEdges; }
168 QHash<int,qreal>* inEdgesEnabledHash();
169 QHash<int,qreal> reciprocalEdgesHash();
170 QList<int> reciprocalNeighborhoodList();
171
172 int degreeOut();
173 int outDegreeConst();
174 int degreeIn();
175 int inDegreeConst();
176 int localDegree();
177
178 void setEnabledEdgesByRelation(const int relation, const bool status);
179 void setEnabledUnilateralEdges(const bool &status=false);
180
181 qreal distance(const int &v1) ;
182 void setDistance (const int &v1, const qreal &d) ;
183 void reserveDistance(const int &N);
184 void clearDistance();
185
186 int shortestPaths(const int &v1) ;
187 void setShortestPaths(const int &v1, const int &sp) ;
188 void reserveShortestPaths(const int &N);
189 void clearShortestPaths();
190
191 void setEccentricity(const qreal &c);
192 qreal eccentricity();
193
194 void setDelta(const qreal &c);
195 qreal delta();
196
197 void clearPs() ;
198
199 void appendToPs(const int &vertex ) ;
200 L_int Ps(void);
201
202 //used in reciprocity report
203 void setOutEdgesReciprocated(int outEdgesSym=-1) { m_outEdgesSym = (outEdgesSym!=-1) ? outEdgesSym : m_outEdgesSym+1; }
205
208
211
212 void setDC (const qreal &c){ m_DC=c;} /* Sets vertex Degree Centrality*/
213 void setSDC (const qreal &c ) { m_SDC=c;} /* Sets standard vertex Degree Centrality*/
214 qreal DC() { return m_DC;} /* Returns vertex Degree Centrality*/
215 qreal SDC() { return m_SDC;} /* Returns standard vertex Degree Centrality*/
216
217 void setDistanceSum (const qreal &c) { m_distanceSum = c; }
218 qreal distanceSum () { return m_distanceSum; }
219 void setCC (const qreal &c){ m_CC=c;} /* sets vertex Closeness Centrality*/
220 void setSCC (const qreal &c ) { m_SCC=c;} /* sets standard vertex Closeness Centrality*/
221 qreal CC() { return m_CC;} /* Returns vertex Closeness Centrality*/
222 qreal SCC() { return m_SCC; } /* Returns standard vertex Closeness Centrality*/
223
224 void setIRCC (const qreal &c){ m_IRCC=c;} /* sets vertex IRCC */
225 void setSIRCC (const qreal &c ) { m_SIRCC=c;} /* sets standard vertex IRCC */
226 qreal IRCC() { return m_IRCC;} /* Returns vertex IRCC */
227 qreal SIRCC() { return m_SIRCC; } /* Returns standard vertex IRCC*/
228
229 void setBC(const qreal &c){ m_BC=c;} /* sets s vertex Betweenness Centrality*/
230 void setSBC (const qreal &c ) { m_SBC=c;} /* sets standard vertex Betweenness Centrality*/
231 qreal BC() { return m_BC;} /* Returns vertex Betweenness Centrality*/
232 qreal SBC() { return m_SBC; } /* Returns standard vertex Betweenness Centrality*/
233
234 void setSC (const qreal &c){ m_SC=c;} /* sets vertex Stress Centrality*/
235 void setSSC (const qreal &c ) { m_SSC=c;} /* sets standard vertex Stress Centrality*/
236 qreal SC() { return m_SC;} /* Returns vertex Stress Centrality*/
237 qreal SSC() { return m_SSC; } /* Returns standard vertex Stress Centrality*/
238
239 void setEC(const qreal &dist) { m_EC=dist;} /* Sets max Geodesic Distance to all other vertices*/
240 void setSEC(const qreal &c) {m_SEC=c;}
241 qreal EC() { return m_EC;} /* Returns max Geodesic Distance to all other vertices*/
242 qreal SEC() { return m_SEC;}
243
244 void setPC (const qreal &c){ m_PC=c;} /* sets vertex Power Centrality*/
245 void setSPC (const qreal &c ) { m_SPC=c;} /* sets standard vertex Power Centrality*/
246 qreal PC() { return m_PC;} /* Returns vertex Power Centrality*/
247 qreal SPC() { return m_SPC; } /* Returns standard vertex Power Centrality*/
248
249 void setIC (const qreal &c){ m_IC=c;} /* sets vertex Information Centrality*/
250 void setSIC (const qreal &c ) { m_SIC=c;} /* sets standard vertex Information Centrality*/
251 qreal IC() { return m_IC;} /* Returns vertex Information Centrality*/
252 qreal SIC() { return m_SIC; } /* Returns standard vertex Information Centrality*/
253
254 void setDP (const qreal &c){ m_DP=c;} /* Sets vertex Degree Prestige */
255 void setSDP (const qreal &c ) { m_SDP=c;} /* Sets standard vertex Degree Prestige */
256 qreal DP() { return m_DP;} /* Returns vertex Degree Prestige */
257 qreal SDP() { return m_SDP;} /* Returns standard vertex Degree Prestige */
258
259 void setPRP (const qreal &c){ m_PRC=c;} /* sets vertex PageRank*/
260 void setSPRP (const qreal &c ) { m_SPRC=c;} /* sets standard vertex PageRank*/
261 qreal PRP() { return m_PRC;} /* Returns vertex PageRank */
262 qreal SPRP() { return m_SPRC; } /* Returns standard vertex PageRank*/
263
264 void setPP (const qreal &c){ m_PP=c;} /* sets vertex Proximity Prestige */
265 void setSPP (const qreal &c ) { m_SPP=c;} /* sets standard vertex Proximity Prestige */
266 qreal PP() { return m_PP;} /* Returns vertex Proximity Prestige */
267 qreal SPP() { return m_SPP; } /* Returns standard vertex Proximity Prestige */
268
269 qreal CLC() { return m_CLC; }
270 void setCLC(const qreal &clucof) { m_CLC=clucof; m_hasCLC=true; }
271 bool hasCLC() { return m_hasCLC; }
272
273 void setEVC (const qreal &c){ m_EVC=c;} /* Sets vertex Degree Centrality*/
274 void setSEVC (const qreal &c ) { m_SEVC=c;} /* Sets standard vertex Degree Centrality*/
275 qreal EVC() { return m_EVC;} /* Returns vertex Degree Centrality*/
276 qreal SEVC() { return m_SEVC;} /* Returns standard vertex Degree Centrality*/
277
278
279 int cliques (const int &ofSize);
280
281 void cliqueAdd (const QList<int> &clique);
282
283 void clearCliques() { m_cliques.clear(); }
284
285 //Hashes of all outbound and inbound edges of this vertex.
287
288 //Hash dictionary of this vertex pair-wise distances to all other vertices for each relationship
289 //The key is the relationship
290 //The value is a QPair < int target, qreal weight >
292
294
295signals:
296 void signalSetEdgeVisibility (const int &relation,
297 const int &name,
298 const int &target,
299 const bool &visible,
300 const bool &preserveReverseEdge=false,
301 const int &edgeWeight=1,
302 const int &reverseEdgeWeight=1
303 );
304
305protected:
306
307private:
314 double m_x, m_y;
321
323 QPointF m_disp;
324
325 QHash<QString,QString> m_customAttributes;
326 QHash<int,qreal> m_reciprocalEdges;
328 QMultiHash <int, L_int> m_cliques;
330 QHash<int, QHash<QString,QString>> m_outEdgeCustomAttributes;
331
332 //FIXME vertex coords
333
334
335
336};
337
338#endif
Definition graphvertex.h:51
void setInEdgeEnabled(const int &source, bool)
Sets the status of an inbound edge from the given source vertex.
Definition graphvertex.cpp:711
qreal DP()
Definition graphvertex.h:256
int m_inEdgesNonSym
Definition graphvertex.h:310
qreal IRCC()
Definition graphvertex.h:226
qreal BC()
Definition graphvertex.h:231
void setInEdgeWeight(const int &source, const qreal &weight)
Sets the weight of the inbound edge from the given vertex.
Definition graphvertex.cpp:742
qreal m_SSC
Definition graphvertex.h:317
qreal delta()
Returns the stored pair dependency of the vertex.
Definition graphvertex.cpp:1334
void setOutEdgeEnabled(const int &target, bool)
Sets the status of an outbound edge to the given target vertex.
Definition graphvertex.cpp:519
qreal SPRP()
Definition graphvertex.h:262
void setLabel(const QString &label)
Sets the label of the vertex.
Definition graphvertex.cpp:260
void clearPs()
Clears the list of predecessors of this vertex.
Definition graphvertex.cpp:1343
int m_inEdgesCounter
Definition graphvertex.h:309
QString m_labelColor
Definition graphvertex.h:322
qreal m_SPP
Definition graphvertex.h:319
H_edges m_outEdges
Definition graphvertex.h:286
void cliqueAdd(const QList< int > &clique)
Adds clique to my cliques.
Definition graphvertex.cpp:1384
QHash< int, qreal > * outEdgesAllRelationsUniqueHash()
Returns a qhash of all edges to neighbors in all relations.
Definition graphvertex.cpp:930
qreal m_BC
Definition graphvertex.h:317
qreal CC()
Definition graphvertex.h:221
void setEnabled(const bool &status)
Toggles the status of the vertex.
Definition graphvertex.cpp:128
QString numberColor() const
Returns the color of the vertex number.
Definition graphvertex.cpp:220
int m_outDegree
Definition graphvertex.h:309
QString m_color
Definition graphvertex.h:322
qreal EC()
Definition graphvertex.h:241
L_int myPs
Definition graphvertex.h:327
int numberSize() const
Returns the size of the vertex number.
Definition graphvertex.cpp:236
void setEC(const qreal &dist)
Definition graphvertex.h:239
void setDelta(const qreal &c)
Stores the pair dependency of the vertex.
Definition graphvertex.cpp:1326
void clearDistance()
Removes all items from m_distance hash dictionary.
Definition graphvertex.cpp:1245
int size() const
Returns the size of the vertex.
Definition graphvertex.cpp:152
QString shape() const
Returns the shape of the vertex.
Definition graphvertex.cpp:170
qreal m_SPC
Definition graphvertex.h:318
void setInEdgesNonSym(int inEdgesNonSym=-1)
Definition graphvertex.h:209
void setLabelDistance(const int &distance)
Sets the distance (in pixels) of the label from the vertex.
Definition graphvertex.cpp:308
void setSEVC(const qreal &c)
Definition graphvertex.h:274
QString outEdgeLabel(const int &v2) const
Returns the label of the outbound edge to the given vertex.
Definition graphvertex.cpp:600
void set_dispX(qreal x)
Sets the x coordinate of the displacement vector.
Definition graphvertex.cpp:398
qreal m_delta
Definition graphvertex.h:316
void setSDP(const qreal &c)
Definition graphvertex.h:255
void setPC(const qreal &c)
Definition graphvertex.h:244
double m_x
Definition graphvertex.h:314
void setNumberSize(const int &size)
Sets the size of the vertex number.
Definition graphvertex.cpp:228
int inDegreeConst()
Returns the indegree. Avoid using it alone.
Definition graphvertex.cpp:1110
qreal m_IC
Definition graphvertex.h:318
void setLabelSize(const int &size)
Sets the size of the vertex label.
Definition graphvertex.cpp:292
void setSCC(const qreal &c)
Definition graphvertex.h:220
qreal SDC()
Definition graphvertex.h:215
QString labelColor() const
Returns the color of the vertex label.
Definition graphvertex.cpp:284
void setEVC(const qreal &c)
Definition graphvertex.h:273
qreal m_SDC
Definition graphvertex.h:317
void addOutEdge(const int &v2, const qreal &weight, const QString &color=QString(), const QString &label=QString())
Adds an outbound edge to vertex v2 with weight w.
Definition graphvertex.cpp:436
void setSPP(const qreal &c)
Definition graphvertex.h:265
int m_outEdgesSym
Definition graphvertex.h:310
H_IntToStr m_outLinkColors
Definition graphvertex.h:329
void setSDC(const qreal &c)
Definition graphvertex.h:213
void setDistanceSum(const qreal &c)
Definition graphvertex.h:217
void appendToPs(const int &vertex)
Appends a vertex to the list of predecessors of this vertex.
Definition graphvertex.cpp:1351
void setNumberColor(const QString &color)
Sets the color of the vertex number.
Definition graphvertex.cpp:212
QString colorToPajek()
Returns the vertex color in pajek format.
Definition graphvertex.cpp:201
void setSIRCC(const qreal &c)
Definition graphvertex.h:225
QHash< int, qreal > reciprocalEdgesHash()
Returns a qhash of all reciprocal edges to neighbors in the active relation.
Definition graphvertex.cpp:951
void setIC(const qreal &c)
Definition graphvertex.h:249
qreal m_DP
Definition graphvertex.h:317
int inEdgesCount()
Returns the number of active inbound arcs to this vertex for the current relation.
Definition graphvertex.cpp:818
void setShortestPaths(const int &v1, const int &sp)
Stores the number of shortest paths from this vertex to vertex v1.
Definition graphvertex.cpp:1256
void setEccentricity(const qreal &c)
Stores the eccentricity of the vertex.
Definition graphvertex.cpp:1310
void setOutEdgeWeight(const int &target, const qreal &weight)
Sets the weight of the outbound edge to the given vertex.
Definition graphvertex.cpp:550
void setSPC(const qreal &c)
Definition graphvertex.h:245
void setSEC(const qreal &c)
Definition graphvertex.h:240
QMultiHash< int, L_int > m_cliques
Definition graphvertex.h:328
qreal m_EC
Definition graphvertex.h:316
qreal m_SDP
Definition graphvertex.h:317
qreal m_SEVC
Definition graphvertex.h:319
void setY(const qreal &y)
Sets the vertical position (in pixels) of the vertex.
Definition graphvertex.cpp:363
int m_labelDistance
Definition graphvertex.h:311
int labelSize() const
Returns the size of the vertex label.
Definition graphvertex.cpp:300
L_int Ps(void)
Returns the list of predecessors of this vertex.
Definition graphvertex.cpp:1361
void setNumberDistance(const int &distance)
Sets the distance (in pixels) of the vertex number from the vertex.
Definition graphvertex.cpp:244
QList< int > reciprocalNeighborhoodList()
Returns a list of all vertices reciprocally connected to this vertex in the active relation.
Definition graphvertex.cpp:993
void setNumber(const int &number)
Sets the vertex number.
Definition graphvertex.cpp:120
qreal m_SIRCC
Definition graphvertex.h:317
QString m_shape
Definition graphvertex.h:322
void setIsolated(bool isolated)
Toggles this vertex as isolated or not.
Definition graphvertex.cpp:871
bool m_reciprocalLinked
Definition graphvertex.h:313
QPointF m_disp
Definition graphvertex.h:323
H_distance m_distance
Definition graphvertex.h:291
qreal hasEdgeTo(const int &v, const bool &allRelations=false)
Checks if the vertex has an enabled outbound edge to the given vertex. Returns the edge weight or 0.
Definition graphvertex.cpp:456
void setOutEdgeLabel(const int &v2, const QString &label)
Sets the label of the outbound edge to the given vertex.
Definition graphvertex.cpp:591
double m_y
Definition graphvertex.h:314
qreal m_PC
Definition graphvertex.h:318
bool isInLinked()
Returns true if there is an outEdge from this vertex.
Definition graphvertex.cpp:862
QPointF & disp()
Returns displacement vector.
Definition graphvertex.cpp:411
void setCLC(const qreal &clucof)
Definition graphvertex.h:270
void setRelation(int newRel)
Changes the current relation of this vertex.
Definition graphvertex.cpp:419
qreal SIC()
Definition graphvertex.h:252
qreal m_SPRC
Definition graphvertex.h:318
void removeOutEdge(const int target)
Removes the outbound edge to vertex v2.
Definition graphvertex.cpp:487
QHash< int, qreal > * inEdgesEnabledHash()
Returns a qhash of all enabled inEdges in the active relation.
Definition graphvertex.cpp:1016
qreal SEC()
Definition graphvertex.h:242
void setEnabledEdgesByRelation(const int relation, const bool status)
Changes the status of all edges in the given relation.
Definition graphvertex.cpp:1178
bool isIsolated()
Returns true if the vertex is isolated (no inbound our outbound edges)
Definition graphvertex.cpp:880
void setSC(const qreal &c)
Definition graphvertex.h:234
void set_dispY(qreal y)
Sets the y coordinate of the displacement vector.
Definition graphvertex.cpp:404
qreal m_CLC
Definition graphvertex.h:315
qreal SBC()
Definition graphvertex.h:232
QHash< int, qreal > m_reciprocalEdges
Definition graphvertex.h:326
int m_curRelation
Definition graphvertex.h:312
qreal m_PRC
Definition graphvertex.h:318
void setSPRP(const qreal &c)
Definition graphvertex.h:260
const H_edges & outEdges() const
Definition graphvertex.h:163
H_IntToStr m_outEdgeLabels
Definition graphvertex.h:329
QString label() const
Returns the vertex label.
Definition graphvertex.cpp:268
int outEdgesCount()
Computes and returns the number of active outbound arcs (outEdges) for the current relation.
Definition graphvertex.cpp:777
qreal m_Eccentricity
Definition graphvertex.h:315
void setSize(const int &size)
Sets the size of the vertex.
Definition graphvertex.cpp:144
qreal m_SEC
Definition graphvertex.h:316
QHash< QString, QString > outEdgeCustomAttributes(const int &v2) const
Returns the custom attributes stored on the outbound edge to vertex v2. Returns an empty hash if no a...
Definition graphvertex.cpp:620
int inEdgesCountConst() const
Returns the number of active inbound arcs.
Definition graphvertex.cpp:844
void setSBC(const qreal &c)
Definition graphvertex.h:230
QString outLinkColor(const int &v2)
Returns the color of the outbound edge to the given vertex.
Definition graphvertex.cpp:582
void signalSetEdgeVisibility(const int &relation, const int &name, const int &target, const bool &visible, const bool &preserveReverseEdge=false, const int &edgeWeight=1, const int &reverseEdgeWeight=1)
qreal m_distanceSum
Definition graphvertex.h:320
int m_outEdgesCounter
Definition graphvertex.h:309
qreal m_SBC
Definition graphvertex.h:317
qreal distance(const int &v1)
Returns the geodesic distance to vertex v1.
Definition graphvertex.cpp:1225
int outDegreeConst()
Returns the outDegree. Avoid using it alone.
Definition graphvertex.cpp:1072
qreal SPC()
Definition graphvertex.h:247
void removeInEdge(const int source)
Removes the inbound edge from vertex v2.
Definition graphvertex.cpp:680
int labelDistance() const
Returns the distance (in pixels) of the label from the vertex.
Definition graphvertex.cpp:316
qreal SEVC()
Definition graphvertex.h:276
bool isEnabled() const
Returns true if the vertex is enabled.
Definition graphvertex.cpp:136
int numberDistance() const
Returns the distance (in pixels) of the vertex number from the vertex.
Definition graphvertex.cpp:252
qreal y() const
Returns the vertical position (in pixels) of the vertex.
Definition graphvertex.cpp:371
QPointF pos() const
Returns the point where the vertex is positioned.
Definition graphvertex.cpp:389
int inEdgesNonSym()
Definition graphvertex.h:210
void setEnabledUnilateralEdges(const bool &status=false)
Changes the status of all unilateral (non-reciprocal) outbound edges, in current relation.
Definition graphvertex.cpp:1152
int cliques(const int &ofSize)
Returns the number of cliques sized size this vertex belongs to.
Definition graphvertex.cpp:1373
QHash< QString, QString > m_customAttributes
Definition graphvertex.h:325
qreal SDP()
Definition graphvertex.h:257
H_shortestPaths m_shortestPaths
Definition graphvertex.h:293
QString color() const
Returns the vertex color.
Definition graphvertex.cpp:194
~GraphVertex()
Definition graphvertex.cpp:1390
void setCC(const qreal &c)
Definition graphvertex.h:219
void addInEdge(const int &v1, const qreal &weight)
Adds an inbound edge from vertex v1.
Definition graphvertex.cpp:632
void setPRP(const qreal &c)
Definition graphvertex.h:259
int outEdgesReciprocated()
Definition graphvertex.h:204
void setSIC(const qreal &c)
Definition graphvertex.h:250
qreal m_SC
Definition graphvertex.h:317
void reserveShortestPaths(const int &N)
Reserves N items for the ShortestPaths hash.
Definition graphvertex.cpp:1293
QHash< int, QHash< QString, QString > > m_outEdgeCustomAttributes
Definition graphvertex.h:330
qreal PC()
Definition graphvertex.h:246
void setColor(const QString &color)
Sets the vertex color.
Definition graphvertex.cpp:186
void setOutLinkColor(const int &v2, const QString &color)
Sets the color of the outbound edge to the given vertex.
Definition graphvertex.cpp:572
void setDistance(const int &v1, const qreal &d)
Stores the geodesic distance to vertex v1.
Definition graphvertex.cpp:1202
void setOutEdgeCustomAttributes(const int &v2, const QHash< QString, QString > &attrs)
Sets all custom attributes on the outbound edge to vertex v2, replacing any previously stored attribu...
Definition graphvertex.cpp:610
int m_labelSize
Definition graphvertex.h:311
H_edges m_inEdges
Definition graphvertex.h:286
qreal m_EVC
Definition graphvertex.h:319
qreal m_DC
Definition graphvertex.h:317
int m_number
Definition graphvertex.h:309
void setIRCC(const qreal &c)
Definition graphvertex.h:224
qreal CLC()
Definition graphvertex.h:269
void setOutEdgesNonSym(int outEdgesNonSym=-1)
Definition graphvertex.h:206
QHash< int, qreal > outEdgesEnabledHash(const bool &allRelations=false)
Returns a qhash of all enabled outEdges, in the active relation or all relations if allRelations is t...
Definition graphvertex.cpp:892
qreal SSC()
Definition graphvertex.h:237
bool isOutLinked()
Returns true if the vertex has at least one outEdge.
Definition graphvertex.cpp:853
void clearCliques()
Definition graphvertex.h:283
void setX(const qreal &x)
Sets the horizontal position (in pixels) of the vertex.
Definition graphvertex.cpp:347
qreal SIRCC()
Definition graphvertex.h:227
int degreeOut()
Returns the outDegree (the sum of all enabled outEdges weights) of this vertex.
Definition graphvertex.cpp:1046
void setPos(QPointF &p)
Sets the point where the vertex is positioned.
Definition graphvertex.cpp:379
void setShape(const QString &shape, const QString &iconPath=QString())
Sets the shape of the vertex.
Definition graphvertex.cpp:161
QString m_label
Definition graphvertex.h:322
int localDegree()
Returns the localDegree of the vertex.
Definition graphvertex.cpp:1123
bool m_hasCLC
Definition graphvertex.h:313
QString shapeIconPath()
Returns the path of the custom vertex icon.
Definition graphvertex.cpp:178
int number() const
Returns the vertex number.
Definition graphvertex.cpp:112
qreal m_IRCC
Definition graphvertex.h:317
qreal m_SIC
Definition graphvertex.h:318
void setDP(const qreal &c)
Definition graphvertex.h:254
QString m_numberColor
Definition graphvertex.h:322
int degreeIn()
Returns the indegree (the sum of all enabled inEdges weights) of this vertex.
Definition graphvertex.cpp:1082
qreal distanceSum()
Definition graphvertex.h:218
qreal m_PP
Definition graphvertex.h:319
QString m_iconPath
Definition graphvertex.h:322
qreal DC()
Definition graphvertex.h:214
QHash< QString, QString > customAttributes() const
Returns the custom attributes of the graph vertex.
Definition graphvertex.cpp:338
void setCustomAttributes(QHash< QString, QString > customAttributes)
Sets custom attributes for the graph vertex.
Definition graphvertex.cpp:327
int m_outEdgesNonSym
Definition graphvertex.h:310
bool m_isolated
Definition graphvertex.h:313
const H_edges & inEdges() const
Definition graphvertex.h:167
int m_numberSize
Definition graphvertex.h:311
qreal PRP()
Definition graphvertex.h:261
void setLabelColor(const QString &labelColor)
Sets the color of the vertex label.
Definition graphvertex.cpp:276
qreal PP()
Definition graphvertex.h:266
int m_inDegree
Definition graphvertex.h:309
qreal EVC()
Definition graphvertex.h:275
int outEdgesCountConst() const
Returns the number of active outbound arcs. Avoid using it alone.
Definition graphvertex.cpp:807
qreal m_SCC
Definition graphvertex.h:317
int m_localDegree
Definition graphvertex.h:309
qreal SCC()
Definition graphvertex.h:222
qreal IC()
Definition graphvertex.h:251
void setDC(const qreal &c)
Definition graphvertex.h:212
int m_size
Definition graphvertex.h:311
void setPP(const qreal &c)
Definition graphvertex.h:264
qreal eccentricity()
Returns the stored eccentricity of the vertex.
Definition graphvertex.cpp:1318
bool m_enabled
Definition graphvertex.h:313
void setBC(const qreal &c)
Definition graphvertex.h:229
void setOutEdgesReciprocated(int outEdgesSym=-1)
Definition graphvertex.h:203
int outEdgesNonSym()
Definition graphvertex.h:207
void clearShortestPaths()
Removes all items from m_shortestPaths hash dictionary.
Definition graphvertex.cpp:1301
int m_numberDistance
Definition graphvertex.h:311
int shortestPaths(const int &v1)
Returns the stored number of shortest paths to vertex v1.
Definition graphvertex.cpp:1269
qreal hasEdgeFrom(const int &v, const bool &allRelations=false)
Checks if the vertex has an enabled inbound edge from v2 and returns the edge weight or 0.
Definition graphvertex.cpp:648
qreal SPP()
Definition graphvertex.h:267
qreal x() const
Returns the horizontal position (in pixels) of the vertex.
Definition graphvertex.cpp:355
void setSSC(const qreal &c)
Definition graphvertex.h:235
qreal m_CC
Definition graphvertex.h:317
qreal SC()
Definition graphvertex.h:236
void reserveDistance(const int &N)
Reserves N items for the distance hash. See QHash Algorithmic Complexity Not to be used on large nets...
Definition graphvertex.cpp:1212
bool hasCLC()
Definition graphvertex.h:271
Graph * m_graph
Definition graphvertex.h:308
The Graph class This is the main class for a Graph, used in conjuction with GraphVertex,...
Definition graph.h:74
QList< int > L_int
Definition graph.h:61
QHash< int, QString > H_IntToStr
Definition graphvertex.h:37
QPair< int, int > pair_i_i
Definition graphvertex.h:47
QList< int > L_int
Definition graphvertex.h:35
QHash< int, pair_i_i > H_shortestPaths
Definition graphvertex.h:48
QHash< int, pair_i_f > H_distance
Definition graphvertex.h:45
QPair< int, qreal > pair_i_f
Definition graphvertex.h:44
QMultiHash< int, pair_i_fb > H_edges
Definition graphvertex.h:42
QPair< qreal, bool > pair_f_b
Definition graphvertex.h:40
QHash< QString, int > H_StrToInt
Definition graphvertex.h:38
QPair< int, pair_f_b > pair_i_fb
Definition graphvertex.h:41