Code Documentation 3.8
Social Network Visualizer
Loading...
Searching...
No Matches
graphvertex.h
Go to the documentation of this file.
1
15
16#ifndef GRAPHVERTEX_H
17#define GRAPHVERTEX_H
18
19#include <QString>
20#include <QStringList>
21#include <QHash>
22#include <QMultiHash>
23#include <QList>
24#include <QPointF>
25#include <QPair>
26
27#include <map>
28
29#include "global.h"
30
32
33using namespace std;
34
35class Graph;
36
37
38typedef QList<int> L_int;
39
40typedef QHash<int,QString> H_IntToStr;
41typedef QHash <QString, int> H_StrToInt;
42
43typedef QPair <qreal, bool> pair_f_b;
44typedef QPair <int, pair_f_b > pair_i_fb;
45typedef QMultiHash < int, pair_i_fb > H_edges;
46
47
56
57public:
58
59 GraphVertex(Graph* parentGraph,
60 const int &name,
61 const int &relation,
62 const int &size,
63 const QString &color,
64 const QString &numColor,
65 const int &numSize,
66 const QString &label,
67 const QString &labelColor,
68 const int &labelSize,
69 const QPointF &p,
70 const QString &shape,
71 const QString &iconPath,
72 const int &edgesEstimate = 2000,
73 const QHash<QString,QString> &nodeAttr = QHash<QString,QString>()
74 );
75
77
78 int number() const;
79 void setNumber(const int &number);
80
81 void setEnabled(const bool &status);
82 bool isEnabled () const;
83
84 void setSize(const int &size );
85 int size() const;
86
87 void setShape(const QString &shape, const QString &iconPath = QString());
88 QString shape() const;
89 QString shapeIconPath();
90
91 void setColor(const QString &color);
92 QString color() const;
93 QString colorToPajek();
94
95 void setNumberColor (const QString &color);
96 QString numberColor() const;
97
98 void setNumberSize (const int &size);
99 int numberSize() const;
100
101 void setNumberDistance (const int &distance);
102 int numberDistance() const;
103
104 void setLabel (const QString &label);
105 QString label() const;
106
107 void setLabelColor (const QString &labelColor);
108 QString labelColor() const;
109
110 void setLabelSize(const int &size);
111 int labelSize() const;
112
113 void setLabelDistance (const int &distance);
114 int labelDistance() const;
115
116 void setCustomAttributes(QHash<QString,QString> customAttributes);
117 QHash<QString,QString> customAttributes() const;
118
119 void setX(const qreal &x);
120 qreal x() const;
121
122 void setY(const qreal &y);
123 qreal y() const;
124
125 void setPos (QPointF &p);
126 QPointF pos () const;
127
128 void set_dispX (qreal x);
129 void set_dispY (qreal y);
130 QPointF & disp();
131
132 QList<EdgeVisibilityChange> setRelation(int newRel);
133
134 void addOutEdge (const int &v2, const qreal &weight, const QString &color=QString(), const QString &label=QString());
135 qreal hasEdgeTo(const int &v, const bool &allRelations=false);
136 void removeOutEdge (const int target);
137 void setOutEdgeWeight (const int &target, const qreal &weight);
138 void setOutEdgeEnabled (const int &target, bool);
139 void setOutLinkColor(const int &v2, const QString &color);
140 QString outLinkColor(const int &v2);
141 void setOutEdgeLabel(const int &v2, const QString &label);
142 QString outEdgeLabel(const int &v2) const;
143 void setOutEdgeCustomAttributes(const int &v2, const QHash<QString,QString> &attrs);
144 QHash<QString,QString> outEdgeCustomAttributes(const int &v2) const;
145
146 void addInEdge(const int &v1, const qreal &weight);
147 qreal hasEdgeFrom (const int &v, const bool &allRelations=false);
148 void removeInEdge(const int source);
149 void setInEdgeWeight (const int &source, const qreal &weight);
150 void setInEdgeEnabled (const int &source, bool);
151
152 int outEdgesCount();
153 int outEdgesCountConst() const ;
154
155 int inEdgesCount();
156 int inEdgesCountConst() const ;
157
158 bool isOutLinked();
159 bool isInLinked();
160
161 void setIsolated(bool isolated);
162 bool isIsolated();
163
164 const H_edges& outEdges() const { return m_outEdges; }
165 QHash<int, qreal> outEdgesEnabledHash(const bool &allRelations=false);
166 QHash<int,qreal>* outEdgesAllRelationsUniqueHash();
167
168 const H_edges& inEdges() const { return m_inEdges; }
169 QHash<int,qreal>* inEdgesEnabledHash();
170 QHash<int,qreal> reciprocalEdgesHash();
171 QList<int> reciprocalNeighborhoodList();
172
173 int degreeOut();
174 int outDegreeConst();
175 int degreeIn();
176 int inDegreeConst();
177 int localDegree();
178
179 QList<EdgeVisibilityChange> setEnabledEdgesByRelation(const int relation, const bool status);
180 QList<EdgeVisibilityChange> setEnabledUnilateralEdges(const bool &status=false);
181
182 void setEccentricity(const qreal &c);
183 qreal eccentricity();
184
185 //used in reciprocity report
186 void setOutEdgesReciprocated(int outEdgesSym=-1) { m_outEdgesSym = (outEdgesSym!=-1) ? outEdgesSym : m_outEdgesSym+1; }
188
191
194
195 void setDC (const qreal &c){ m_DC=c;} /* Sets vertex Degree Centrality*/
196 void setSDC (const qreal &c ) { m_SDC=c;} /* Sets standard vertex Degree Centrality*/
197 qreal DC() { return m_DC;} /* Returns vertex Degree Centrality*/
198 qreal SDC() { return m_SDC;} /* Returns standard vertex Degree Centrality*/
199
200 /* Signed degree centrality (WS18 P3) - out-degree only, no standardized/graph-wide stats. */
201 void setSignedDegreePos (const qreal &c) { m_signedDegreePos=c; }
202 void setSignedDegreeNeg (const qreal &c) { m_signedDegreeNeg=c; }
203 void setSignedDegreeRatio (const qreal &c) { m_signedDegreeRatio=c; }
204 void setSignedDegreeNet (const qreal &c) { m_signedDegreeNet=c; }
209
210 void setDistanceSum (const qreal &c) { m_distanceSum = c; }
211 qreal distanceSum () { return m_distanceSum; }
212 void setCC (const qreal &c){ m_CC=c;} /* sets vertex Closeness Centrality*/
213 void setSCC (const qreal &c ) { m_SCC=c;} /* sets standard vertex Closeness Centrality*/
214 qreal CC() { return m_CC;} /* Returns vertex Closeness Centrality*/
215 qreal SCC() { return m_SCC; } /* Returns standard vertex Closeness Centrality*/
216
217 void setIRCC (const qreal &c){ m_IRCC=c;} /* sets vertex IRCC */
218 void setSIRCC (const qreal &c ) { m_SIRCC=c;} /* sets standard vertex IRCC */
219 qreal IRCC() { return m_IRCC;} /* Returns vertex IRCC */
220 qreal SIRCC() { return m_SIRCC; } /* Returns standard vertex IRCC*/
221
222 void setBC(const qreal &c){ m_BC=c;} /* sets s vertex Betweenness Centrality*/
223 void setSBC (const qreal &c ) { m_SBC=c;} /* sets standard vertex Betweenness Centrality*/
224 qreal BC() { return m_BC;} /* Returns vertex Betweenness Centrality*/
225 qreal SBC() { return m_SBC; } /* Returns standard vertex Betweenness Centrality*/
226
227 void setSC (const qreal &c){ m_SC=c;} /* sets vertex Stress Centrality*/
228 void setSSC (const qreal &c ) { m_SSC=c;} /* sets standard vertex Stress Centrality*/
229 qreal SC() { return m_SC;} /* Returns vertex Stress Centrality*/
230 qreal SSC() { return m_SSC; } /* Returns standard vertex Stress Centrality*/
231
232 void setEC(const qreal &dist) { m_EC=dist;} /* Sets max Geodesic Distance to all other vertices*/
233 void setSEC(const qreal &c) {m_SEC=c;}
234 qreal EC() { return m_EC;} /* Returns max Geodesic Distance to all other vertices*/
235 qreal SEC() { return m_SEC;}
236
237 void setPC (const qreal &c){ m_PC=c;} /* sets vertex Power Centrality*/
238 void setSPC (const qreal &c ) { m_SPC=c;} /* sets standard vertex Power Centrality*/
239 qreal PC() { return m_PC;} /* Returns vertex Power Centrality*/
240 qreal SPC() { return m_SPC; } /* Returns standard vertex Power Centrality*/
241
242 void setIC (const qreal &c){ m_IC=c;} /* sets vertex Information Centrality*/
243 void setSIC (const qreal &c ) { m_SIC=c;} /* sets standard vertex Information Centrality*/
244 qreal IC() { return m_IC;} /* Returns vertex Information Centrality*/
245 qreal SIC() { return m_SIC; } /* Returns standard vertex Information Centrality*/
246
247 void setDP (const qreal &c){ m_DP=c;} /* Sets vertex Degree Prestige */
248 void setSDP (const qreal &c ) { m_SDP=c;} /* Sets standard vertex Degree Prestige */
249 qreal DP() { return m_DP;} /* Returns vertex Degree Prestige */
250 qreal SDP() { return m_SDP;} /* Returns standard vertex Degree Prestige */
251
252 void setPRP (const qreal &c){ m_PRC=c;} /* sets vertex PageRank*/
253 void setSPRP (const qreal &c ) { m_SPRC=c;} /* sets standard vertex PageRank*/
254 qreal PRP() { return m_PRC;} /* Returns vertex PageRank */
255 qreal SPRP() { return m_SPRC; } /* Returns standard vertex PageRank*/
256
257 void setPP (const qreal &c){ m_PP=c;} /* sets vertex Proximity Prestige */
258 void setSPP (const qreal &c ) { m_SPP=c;} /* sets standard vertex Proximity Prestige */
259 qreal PP() { return m_PP;} /* Returns vertex Proximity Prestige */
260 qreal SPP() { return m_SPP; } /* Returns standard vertex Proximity Prestige */
261
262 qreal CLC() { return m_CLC; }
263 void setCLC(const qreal &clucof) { m_CLC=clucof; m_hasCLC=true; }
264 bool hasCLC() { return m_hasCLC; }
265
266 void setEVC (const qreal &c){ m_EVC=c;} /* Sets vertex Degree Centrality*/
267 void setSEVC (const qreal &c ) { m_SEVC=c;} /* Sets standard vertex Degree Centrality*/
268 qreal EVC() { return m_EVC;} /* Returns vertex Degree Centrality*/
269 qreal SEVC() { return m_SEVC;} /* Returns standard vertex Degree Centrality*/
270
271 void setKC (const qreal &c){ m_KC=c;} /* Sets vertex Katz Centrality */
272 void setSKC (const qreal &c ) { m_SKC=c;} /* Sets standard vertex Katz Centrality */
273 qreal KC() { return m_KC;} /* Returns vertex Katz Centrality */
274 qreal SKC() { return m_SKC;} /* Returns standard vertex Katz Centrality */
275
276 void setBPC (const qreal &c){ m_BPC=c;} /* Sets vertex Bonacich Power Centrality */
277 void setSBPC (const qreal &c ) { m_SBPC=c;} /* Sets standard vertex Bonacich Power Centrality */
278 qreal BPC() { return m_BPC;} /* Returns vertex Bonacich Power Centrality */
279 qreal SBPC() { return m_SBPC;} /* Returns standard vertex Bonacich Power Centrality */
280
281 /* PN Centrality (WS18 P3, Everett & Borgatti 2014) - single raw score, no standardized
282 * variant (the reference formula doesn't define one). */
283 void setPN (const qreal &c) { m_PN = c; }
284 qreal PN() { return m_PN; }
285
286
287 int cliques (const int &ofSize);
288
289 void cliqueAdd (const QList<int> &clique);
290
291 void clearCliques() { m_cliques.clear(); }
292
293 //Hashes of all outbound and inbound edges of this vertex.
295
296protected:
297
298private:
305 double m_x, m_y;
307 qreal m_EC, m_SEC;
313 qreal m_PN;
315
317 QPointF m_disp;
318
319 QHash<QString,QString> m_customAttributes;
320 QMultiHash <int, L_int> m_cliques;
322 QHash<int, QHash<QString,QString>> m_outEdgeCustomAttributes;
323
324 //FIXME vertex coords
325
326
327
328};
329
330#endif
The Graph class This is the main class for a Graph, used in conjuction with GraphVertex,...
Definition graph.h:105
void setInEdgeEnabled(const int &source, bool)
Sets the status of an inbound edge from the given source vertex.
Definition graphvertex.cpp:668
void setBPC(const qreal &c)
Definition graphvertex.h:276
qreal m_BPC
Definition graphvertex.h:312
qreal DP()
Definition graphvertex.h:249
int m_inEdgesNonSym
Definition graphvertex.h:301
qreal IRCC()
Definition graphvertex.h:219
qreal BC()
Definition graphvertex.h:224
void setInEdgeWeight(const int &source, const qreal &weight)
Sets the weight of the inbound edge from the given vertex.
Definition graphvertex.cpp:694
qreal m_SSC
Definition graphvertex.h:308
qreal m_PN
Definition graphvertex.h:313
void setOutEdgeEnabled(const int &target, bool)
Sets the status of an outbound edge to the given target vertex.
Definition graphvertex.cpp:490
qreal SPRP()
Definition graphvertex.h:255
qreal m_KC
Definition graphvertex.h:312
void setLabel(const QString &label)
Sets the label of the vertex.
Definition graphvertex.cpp:240
int m_inEdgesCounter
Definition graphvertex.h:300
QString m_labelColor
Definition graphvertex.h:316
qreal m_SPP
Definition graphvertex.h:311
H_edges m_outEdges
Definition graphvertex.h:294
void cliqueAdd(const QList< int > &clique)
Adds clique to my cliques.
Definition graphvertex.cpp:1181
QHash< int, qreal > * outEdgesAllRelationsUniqueHash()
Returns a qhash of all edges to neighbors in all relations.
Definition graphvertex.cpp:883
qreal m_BC
Definition graphvertex.h:308
qreal CC()
Definition graphvertex.h:214
void setEnabled(const bool &status)
Toggles the status of the vertex.
Definition graphvertex.cpp:108
QString numberColor() const
Returns the color of the vertex number.
Definition graphvertex.cpp:200
int m_outDegree
Definition graphvertex.h:300
QString m_color
Definition graphvertex.h:316
qreal EC()
Definition graphvertex.h:234
int numberSize() const
Returns the size of the vertex number.
Definition graphvertex.cpp:216
void setEC(const qreal &dist)
Definition graphvertex.h:232
int size() const
Returns the size of the vertex.
Definition graphvertex.cpp:132
qreal m_signedDegreePos
Definition graphvertex.h:309
void setSignedDegreeRatio(const qreal &c)
Definition graphvertex.h:203
GraphVertex(Graph *parentGraph, const int &name, const int &relation, 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, const int &edgesEstimate=2000, const QHash< QString, QString > &nodeAttr=QHash< QString, QString >())
Definition graphvertex.cpp:23
qreal KC()
Definition graphvertex.h:273
QString shape() const
Returns the shape of the vertex.
Definition graphvertex.cpp:150
qreal m_SPC
Definition graphvertex.h:310
void setInEdgesNonSym(int inEdgesNonSym=-1)
Definition graphvertex.h:192
void setLabelDistance(const int &distance)
Sets the distance (in pixels) of the label from the vertex.
Definition graphvertex.cpp:288
void setSEVC(const qreal &c)
Definition graphvertex.h:267
QString outEdgeLabel(const int &v2) const
Returns the label of the outbound edge to the given vertex.
Definition graphvertex.cpp:565
qreal SKC()
Definition graphvertex.h:274
void set_dispX(qreal x)
Sets the x coordinate of the displacement vector.
Definition graphvertex.cpp:377
void setSDP(const qreal &c)
Definition graphvertex.h:248
void setPC(const qreal &c)
Definition graphvertex.h:237
double m_x
Definition graphvertex.h:305
void setNumberSize(const int &size)
Sets the size of the vertex number.
Definition graphvertex.cpp:208
int inDegreeConst()
Returns the indegree. Avoid using it alone.
Definition graphvertex.cpp:1062
qreal m_IC
Definition graphvertex.h:310
void setLabelSize(const int &size)
Sets the size of the vertex label.
Definition graphvertex.cpp:272
void setSCC(const qreal &c)
Definition graphvertex.h:213
qreal SDC()
Definition graphvertex.h:198
QString labelColor() const
Returns the color of the vertex label.
Definition graphvertex.cpp:264
void setEVC(const qreal &c)
Definition graphvertex.h:266
qreal m_SDC
Definition graphvertex.h:308
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:415
void setSPP(const qreal &c)
Definition graphvertex.h:258
int m_outEdgesSym
Definition graphvertex.h:301
void setKC(const qreal &c)
Definition graphvertex.h:271
H_IntToStr m_outLinkColors
Definition graphvertex.h:321
void setSDC(const qreal &c)
Definition graphvertex.h:196
void setDistanceSum(const qreal &c)
Definition graphvertex.h:210
void setNumberColor(const QString &color)
Sets the color of the vertex number.
Definition graphvertex.cpp:192
QString colorToPajek()
Returns the vertex color in pajek format.
Definition graphvertex.cpp:181
void setSIRCC(const qreal &c)
Definition graphvertex.h:218
QHash< int, qreal > reciprocalEdgesHash()
Returns a qhash of all reciprocal edges to neighbors in the active relation.
Definition graphvertex.cpp:908
void setIC(const qreal &c)
Definition graphvertex.h:242
qreal m_DP
Definition graphvertex.h:308
int inEdgesCount()
Returns the number of active inbound arcs to this vertex for the current relation.
Definition graphvertex.cpp:772
void setEccentricity(const qreal &c)
Stores the eccentricity of the vertex.
Definition graphvertex.cpp:1152
qreal m_SBPC
Definition graphvertex.h:312
void setOutEdgeWeight(const int &target, const qreal &weight)
Sets the weight of the outbound edge to the given vertex.
Definition graphvertex.cpp:516
void setSPC(const qreal &c)
Definition graphvertex.h:238
qreal SBPC()
Definition graphvertex.h:279
void setSEC(const qreal &c)
Definition graphvertex.h:233
QMultiHash< int, L_int > m_cliques
Definition graphvertex.h:320
qreal m_EC
Definition graphvertex.h:307
qreal m_SDP
Definition graphvertex.h:308
qreal m_SEVC
Definition graphvertex.h:311
void setY(const qreal &y)
Sets the vertical position (in pixels) of the vertex.
Definition graphvertex.cpp:342
int m_labelDistance
Definition graphvertex.h:302
int labelSize() const
Returns the size of the vertex label.
Definition graphvertex.cpp:280
void setNumberDistance(const int &distance)
Sets the distance (in pixels) of the vertex number from the vertex.
Definition graphvertex.cpp:224
QList< int > reciprocalNeighborhoodList()
Returns a list of all vertices reciprocally connected to this vertex in the active relation.
Definition graphvertex.cpp:948
void setNumber(const int &number)
Sets the vertex number.
Definition graphvertex.cpp:100
qreal m_SIRCC
Definition graphvertex.h:308
QString m_shape
Definition graphvertex.h:316
qreal m_signedDegreeNeg
Definition graphvertex.h:309
void setIsolated(bool isolated)
Toggles this vertex as isolated or not.
Definition graphvertex.cpp:825
QPointF m_disp
Definition graphvertex.h:317
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:433
void setOutEdgeLabel(const int &v2, const QString &label)
Sets the label of the outbound edge to the given vertex.
Definition graphvertex.cpp:556
double m_y
Definition graphvertex.h:305
qreal signedDegreeNet()
Definition graphvertex.h:208
qreal m_PC
Definition graphvertex.h:310
bool isInLinked()
Returns true if there is an outEdge from this vertex.
Definition graphvertex.cpp:816
QPointF & disp()
Returns displacement vector.
Definition graphvertex.cpp:390
qreal signedDegreeNeg()
Definition graphvertex.h:206
void setCLC(const qreal &clucof)
Definition graphvertex.h:263
qreal SIC()
Definition graphvertex.h:245
qreal m_SPRC
Definition graphvertex.h:310
void removeOutEdge(const int target)
Removes the outbound edge to vertex v2.
Definition graphvertex.cpp:464
QHash< int, qreal > * inEdgesEnabledHash()
Returns a qhash of all enabled inEdges in the active relation.
Definition graphvertex.cpp:971
qreal SEC()
Definition graphvertex.h:235
bool isIsolated()
Returns true if the vertex is isolated (no inbound our outbound edges).
Definition graphvertex.cpp:834
void setSignedDegreeNeg(const qreal &c)
Definition graphvertex.h:202
void setSC(const qreal &c)
Definition graphvertex.h:227
void setPN(const qreal &c)
Definition graphvertex.h:283
qreal signedDegreePos()
Definition graphvertex.h:205
void set_dispY(qreal y)
Sets the y coordinate of the displacement vector.
Definition graphvertex.cpp:383
qreal m_CLC
Definition graphvertex.h:306
qreal SBC()
Definition graphvertex.h:225
int m_curRelation
Definition graphvertex.h:303
QList< EdgeVisibilityChange > setEnabledEdgesByRelation(const int relation, const bool status)
Changes the status of all edges in the given relation.
Definition graphvertex.cpp:1129
qreal m_PRC
Definition graphvertex.h:310
void setSPRP(const qreal &c)
Definition graphvertex.h:253
const H_edges & outEdges() const
Definition graphvertex.h:164
H_IntToStr m_outEdgeLabels
Definition graphvertex.h:321
QString label() const
Returns the vertex label.
Definition graphvertex.cpp:248
int outEdgesCount()
Computes and returns the number of active outbound arcs (outEdges) for the current relation.
Definition graphvertex.cpp:728
qreal m_Eccentricity
Definition graphvertex.h:306
void setSize(const int &size)
Sets the size of the vertex.
Definition graphvertex.cpp:124
void setSignedDegreeNet(const qreal &c)
Definition graphvertex.h:204
qreal m_SEC
Definition graphvertex.h:307
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:585
int inEdgesCountConst() const
Returns the number of active inbound arcs.
Definition graphvertex.cpp:798
void setSBC(const qreal &c)
Definition graphvertex.h:223
QString outLinkColor(const int &v2)
Returns the color of the outbound edge to the given vertex.
Definition graphvertex.cpp:547
qreal m_distanceSum
Definition graphvertex.h:314
int m_outEdgesCounter
Definition graphvertex.h:300
qreal m_SBC
Definition graphvertex.h:308
int outDegreeConst()
Returns the outDegree. Avoid using it alone.
Definition graphvertex.cpp:1025
qreal SPC()
Definition graphvertex.h:240
void removeInEdge(const int source)
Removes the inbound edge from vertex v2.
Definition graphvertex.cpp:643
int labelDistance() const
Returns the distance (in pixels) of the label from the vertex.
Definition graphvertex.cpp:296
qreal SEVC()
Definition graphvertex.h:269
bool isEnabled() const
Returns true if the vertex is enabled.
Definition graphvertex.cpp:116
int numberDistance() const
Returns the distance (in pixels) of the vertex number from the vertex.
Definition graphvertex.cpp:232
qreal y() const
Returns the vertical position (in pixels) of the vertex.
Definition graphvertex.cpp:350
QPointF pos() const
Returns the point where the vertex is positioned.
Definition graphvertex.cpp:368
int inEdgesNonSym()
Definition graphvertex.h:193
int cliques(const int &ofSize)
Returns the number of cliques sized size this vertex belongs to.
Definition graphvertex.cpp:1170
QHash< QString, QString > m_customAttributes
Definition graphvertex.h:319
void setSBPC(const qreal &c)
Definition graphvertex.h:277
qreal SDP()
Definition graphvertex.h:250
QString color() const
Returns the vertex color.
Definition graphvertex.cpp:174
qreal PN()
Definition graphvertex.h:284
QList< EdgeVisibilityChange > setEnabledUnilateralEdges(const bool &status=false)
Changes the status of all unilateral (non-reciprocal) outbound edges, in current relation.
Definition graphvertex.cpp:1103
~GraphVertex()
Definition graphvertex.cpp:1186
qreal m_signedDegreeNet
Definition graphvertex.h:309
void setCC(const qreal &c)
Definition graphvertex.h:212
void setSKC(const qreal &c)
Definition graphvertex.h:272
void addInEdge(const int &v1, const qreal &weight)
Adds an inbound edge from vertex v1.
Definition graphvertex.cpp:597
void setPRP(const qreal &c)
Definition graphvertex.h:252
QList< EdgeVisibilityChange > setRelation(int newRel)
Changes the current relation of this vertex.
Definition graphvertex.cpp:398
int outEdgesReciprocated()
Definition graphvertex.h:187
qreal BPC()
Definition graphvertex.h:278
void setSIC(const qreal &c)
Definition graphvertex.h:243
qreal m_SC
Definition graphvertex.h:308
qreal m_signedDegreeRatio
Definition graphvertex.h:309
QHash< int, QHash< QString, QString > > m_outEdgeCustomAttributes
Definition graphvertex.h:322
qreal PC()
Definition graphvertex.h:239
void setColor(const QString &color)
Sets the vertex color.
Definition graphvertex.cpp:166
void setOutLinkColor(const int &v2, const QString &color)
Sets the color of the outbound edge to the given vertex.
Definition graphvertex.cpp:537
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:575
int m_labelSize
Definition graphvertex.h:302
H_edges m_inEdges
Definition graphvertex.h:294
qreal m_EVC
Definition graphvertex.h:311
qreal m_DC
Definition graphvertex.h:308
int m_number
Definition graphvertex.h:300
void setIRCC(const qreal &c)
Definition graphvertex.h:217
qreal CLC()
Definition graphvertex.h:262
void setOutEdgesNonSym(int outEdgesNonSym=-1)
Definition graphvertex.h:189
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:846
qreal SSC()
Definition graphvertex.h:230
bool isOutLinked()
Returns true if the vertex has at least one outEdge.
Definition graphvertex.cpp:807
void clearCliques()
Definition graphvertex.h:291
void setX(const qreal &x)
Sets the horizontal position (in pixels) of the vertex.
Definition graphvertex.cpp:326
qreal SIRCC()
Definition graphvertex.h:220
int degreeOut()
Returns the outDegree (the sum of all enabled outEdges weights) of this vertex.
Definition graphvertex.cpp:1000
void setPos(QPointF &p)
Sets the point where the vertex is positioned.
Definition graphvertex.cpp:358
void setShape(const QString &shape, const QString &iconPath=QString())
Sets the shape of the vertex.
Definition graphvertex.cpp:141
QString m_label
Definition graphvertex.h:316
int localDegree()
Returns the localDegree of the vertex.
Definition graphvertex.cpp:1075
bool m_hasCLC
Definition graphvertex.h:304
QString shapeIconPath()
Returns the path of the custom vertex icon.
Definition graphvertex.cpp:158
int number() const
Returns the vertex number.
Definition graphvertex.cpp:92
qreal m_IRCC
Definition graphvertex.h:308
qreal m_SIC
Definition graphvertex.h:310
void setDP(const qreal &c)
Definition graphvertex.h:247
QString m_numberColor
Definition graphvertex.h:316
int degreeIn()
Returns the indegree (the sum of all enabled inEdges weights) of this vertex.
Definition graphvertex.cpp:1035
qreal distanceSum()
Definition graphvertex.h:211
qreal m_PP
Definition graphvertex.h:311
QString m_iconPath
Definition graphvertex.h:316
qreal DC()
Definition graphvertex.h:197
QHash< QString, QString > customAttributes() const
Returns the custom attributes of the graph vertex.
Definition graphvertex.cpp:318
void setCustomAttributes(QHash< QString, QString > customAttributes)
Sets custom attributes for the graph vertex.
Definition graphvertex.cpp:307
int m_outEdgesNonSym
Definition graphvertex.h:301
bool m_isolated
Definition graphvertex.h:304
const H_edges & inEdges() const
Definition graphvertex.h:168
int m_numberSize
Definition graphvertex.h:302
qreal PRP()
Definition graphvertex.h:254
void setLabelColor(const QString &labelColor)
Sets the color of the vertex label.
Definition graphvertex.cpp:256
qreal PP()
Definition graphvertex.h:259
int m_inDegree
Definition graphvertex.h:300
qreal EVC()
Definition graphvertex.h:268
int outEdgesCountConst() const
Returns the number of active outbound arcs. Avoid using it alone.
Definition graphvertex.cpp:761
qreal m_SCC
Definition graphvertex.h:308
void setSignedDegreePos(const qreal &c)
Definition graphvertex.h:201
int m_localDegree
Definition graphvertex.h:300
qreal signedDegreeRatio()
Definition graphvertex.h:207
qreal SCC()
Definition graphvertex.h:215
qreal IC()
Definition graphvertex.h:244
void setDC(const qreal &c)
Definition graphvertex.h:195
int m_size
Definition graphvertex.h:302
qreal m_SKC
Definition graphvertex.h:312
void setPP(const qreal &c)
Definition graphvertex.h:257
qreal eccentricity()
Returns the stored eccentricity of the vertex.
Definition graphvertex.cpp:1160
bool m_enabled
Definition graphvertex.h:304
void setBC(const qreal &c)
Definition graphvertex.h:222
void setOutEdgesReciprocated(int outEdgesSym=-1)
Definition graphvertex.h:186
int outEdgesNonSym()
Definition graphvertex.h:190
int m_numberDistance
Definition graphvertex.h:302
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:611
qreal SPP()
Definition graphvertex.h:260
qreal x() const
Returns the horizontal position (in pixels) of the vertex.
Definition graphvertex.cpp:334
void setSSC(const qreal &c)
Definition graphvertex.h:228
qreal m_CC
Definition graphvertex.h:308
qreal SC()
Definition graphvertex.h:229
bool hasCLC()
Definition graphvertex.h:264
Graph * m_graph
Definition graphvertex.h:299
Global definitions, constants, enumerations, and utility types for SocNetV.
#define SOCNETV_USE_NAMESPACE
Definition global.h:28
QList< int > L_int
Definition graph.h:92
QPair< int, pair_f_b > pair_i_fb
Definition graph.h:89
QMultiHash< int, pair_i_fb > H_edges
Definition graph.h:90
QPair< qreal, bool > pair_f_b
Definition graph.h:88
QHash< QString, int > H_StrToInt
Definition graph.h:85
QHash< int, QString > H_IntToStr
Definition graphvertex.h:40