Go to the documentation of this file.
33 #include <QStringList>
46 typedef QList<int>
L_int;
54 typedef QMultiHash < int, pair_i_fb >
H_edges;
74 const QString &numColor,
77 const QString &labelColor,
81 const QString &iconPath);
87 int name()
const {
return m_name; }
89 void setName (
const int &name) { m_name=name; }
94 void relationSet(
int newRel) ;
96 void edgeAddTo (
const int &v2,
const qreal &weight,
const QString &color=QString(),
const QString &label=QString());
97 void edgeAddFrom(
const int &v1,
const qreal &weight);
99 void changeOutEdgeWeight (
const int &target,
const qreal &weight);
101 void setOutEdgeEnabled (
const int,
bool);
103 void edgeRemoveTo (
const int target);
104 void edgeRemoveFrom(
const int source);
106 QHash<int, qreal> outEdgesEnabledHash(
const bool &allRelations=
false);
107 QHash<int,qreal>* outEdgesAllRelationsUniqueHash();
108 QHash<int,qreal>* inEdgesEnabledHash();
109 QHash<int,qreal> reciprocalEdgesHash();
110 QList<int> neighborhoodList();
113 int outEdgesConst()
const ;
116 int inEdgesConst()
const ;
119 int outDegreeConst();
124 qreal distance(
const int &v1) ;
125 void setDistance (
const int &v1,
const qreal &d) ;
126 void reserveDistance(
const int &N);
127 void clearDistance();
129 int shortestPaths(
const int &v1) ;
130 void setShortestPaths(
const int &v1,
const int &sp) ;
131 void reserveShortestPaths(
const int &N);
132 void clearShortestPaths();
141 qreal hasEdgeTo(
const int &v,
const bool &allRelations=
false);
145 qreal hasEdgeFrom (
const int &v,
const bool &allRelations=
false);
147 bool isIsolated() {
return !(isOutLinked() | isInLinked()) ; }
150 void edgeFilterByWeight(qreal m_threshold,
bool overThreshold);
152 void edgeFilterByRelation(
int relation,
bool status);
153 void edgeFilterUnilateral(
const bool &toggle=
false);
155 void setSize(
const int &size ) { m_size=size; }
156 int size()
const {
return m_size; }
158 void setShape(
const QString &shape,
const QString &iconPath = QString()) { m_shape=shape; m_iconPath=iconPath;}
159 QString
shape()
const {
return m_shape; }
162 void setColor(
const QString &color) { m_color=color; }
163 QString
color()
const {
return m_color; }
164 QString colorToPajek();
175 void setLabel (
const QString &label) { m_label=label; }
176 QString
label()
const {
return m_label; }
187 void setX(
const qreal &x) { m_x=x; }
188 qreal
x()
const {
return m_x; }
190 void setY(
const qreal &y) { m_y=y; }
191 qreal
y()
const {
return m_y; }
193 QPointF
pos ()
const {
return QPointF ( x(), y() ); }
194 void setPos (QPointF &p) { m_x=p.x(); m_y=p.y(); }
197 QPointF &
disp() {
return m_disp; }
204 const QString &color) { m_outLinkColors[v2]=color; }
206 return ( m_outLinkColors.contains(v2) ) ? m_outLinkColors.value(v2) :
"black";
211 const QString &label) { m_outEdgeLabels[v2]=label; }
213 return ( m_outEdgeLabels.contains(v2) ) ? m_outEdgeLabels.value(v2) : QString();
222 void appendToPs(
const int &vertex ) ;
229 void setOutEdgesNonSym(
int outEdgesNonSym=-1) { m_outEdgesNonSym = (outEdgesNonSym!=-1) ? outEdgesNonSym : m_outEdgesNonSym+1; }
232 void setInEdgesNonSym(
int inEdgesNonSym=-1) { m_inEdgesNonSym = (inEdgesNonSym!=-1) ? inEdgesNonSym : m_inEdgesNonSym+1; }
235 void setDC (
const qreal &c){ m_DC=c;}
236 void setSDC (
const qreal &c ) { m_SDC=c;}
237 qreal
DC() {
return m_DC;}
238 qreal
SDC() {
return m_SDC;}
242 void setCC (
const qreal &c){ m_CC=c;}
243 void setSCC (
const qreal &c ) { m_SCC=c;}
244 qreal
CC() {
return m_CC;}
245 qreal
SCC() {
return m_SCC; }
252 void setBC(
const qreal &c){ m_BC=c;}
253 void setSBC (
const qreal &c ) { m_SBC=c;}
254 qreal
BC() {
return m_BC;}
255 qreal
SBC() {
return m_SBC; }
257 void setSC (
const qreal &c){ m_SC=c;}
258 void setSSC (
const qreal &c ) { m_SSC=c;}
259 qreal
SC() {
return m_SC;}
260 qreal
SSC() {
return m_SSC; }
262 void setEC(
const qreal &dist) { m_EC=dist;}
264 qreal
EC() {
return m_EC;}
265 qreal
SEC() {
return m_SEC;}
267 void setPC (
const qreal &c){ m_PC=c;}
268 void setSPC (
const qreal &c ) { m_SPC=c;}
269 qreal
PC() {
return m_PC;}
270 qreal
SPC() {
return m_SPC; }
272 void setIC (
const qreal &c){ m_IC=c;}
273 void setSIC (
const qreal &c ) { m_SIC=c;}
274 qreal
IC() {
return m_IC;}
275 qreal
SIC() {
return m_SIC; }
277 void setDP (
const qreal &c){ m_DP=c;}
278 void setSDP (
const qreal &c ) { m_SDP=c;}
279 qreal
DP() {
return m_DP;}
280 qreal
SDP() {
return m_SDP;}
284 qreal
PRP() {
return m_PRC;}
285 qreal
SPRP() {
return m_SPRC; }
287 void setPP (
const qreal &c){ m_PP=c;}
288 void setSPP (
const qreal &c ) { m_SPP=c;}
289 qreal
PP() {
return m_PP;}
290 qreal
SPP() {
return m_SPP; }
292 qreal
CLC() {
return m_CLC; }
293 void setCLC(
const qreal &clucof) { m_CLC=clucof; m_hasCLC=
true; }
298 qreal
EVC() {
return m_EVC;}
302 int cliques (
const int &ofSize);
304 void cliqueAdd (
const QList<int> &clique);
319 void setEdgeVisibility (
const int &relation,
const int &name,
const int &target,
const bool &visible);
327 int m_value, m_size, m_labelSize, m_numberSize, m_numberDistance, m_labelDistance;
333 qreal m_DC, m_SDC, m_DP, m_SDP, m_CC, m_SCC, m_BC, m_SBC, m_IRCC, m_SIRCC, m_SC,
m_SSC;
334 qreal m_PC, m_SPC, m_SIC, m_IC,
m_SPRC, m_PRC;
338 QString m_color, m_numberColor, m_label, m_labelColor,
m_shape, m_iconPath;
QPair< int, int > pair_i_i
Definition: graphvertex.h:59
void setEVC(const qreal &c)
Definition: graphvertex.h:296
void setSDC(const qreal &c)
Definition: graphvertex.h:236
qreal m_SEC
Definition: graphvertex.h:332
qreal y() const
Definition: graphvertex.h:191
void setSSC(const qreal &c)
Definition: graphvertex.h:258
QPair< int, pair_f_b > pair_i_fb
Definition: graphvertex.h:53
int size() const
Definition: graphvertex.h:156
QString labelColor() const
Definition: graphvertex.h:179
void setSPP(const qreal &c)
Definition: graphvertex.h:288
bool isIsolated()
Definition: graphvertex.h:147
void setPP(const qreal &c)
Definition: graphvertex.h:287
int labelDistance() const
Definition: graphvertex.h:185
qreal SDC()
Definition: graphvertex.h:238
void setSEVC(const qreal &c)
Definition: graphvertex.h:297
QHash< int, QString > H_IntToStr
Definition: graphvertex.h:48
void setEC(const qreal &dist)
Definition: graphvertex.h:262
void setSEC(const qreal &c)
Definition: graphvertex.h:263
void setSize(const int &size)
Definition: graphvertex.h:155
qreal SC()
Definition: graphvertex.h:259
qreal SDP()
Definition: graphvertex.h:280
qreal m_SSC
Definition: graphvertex.h:333
L_int myPs
Definition: graphvertex.h:342
qreal EVC()
Definition: graphvertex.h:298
int m_curRelation
Definition: graphvertex.h:328
qreal SSC()
Definition: graphvertex.h:260
bool isEnabled() const
Definition: graphvertex.h:92
void setName(const int &name)
Definition: graphvertex.h:89
qreal CLC()
Definition: graphvertex.h:292
qreal m_SPRC
Definition: graphvertex.h:334
void setIsolated(bool isolated)
Definition: graphvertex.h:148
QString outLinkColor(const int &v2)
Definition: graphvertex.h:205
Definition: graphvertex.h:63
void setIRCC(const qreal &c)
Definition: graphvertex.h:247
void clearCliques()
Definition: graphvertex.h:306
H_IntToStr m_outLinkColors
Definition: graphvertex.h:345
void setLabel(const QString &label)
Definition: graphvertex.h:175
QList< int > L_int
Definition: graphvertex.h:43
qreal SPC()
Definition: graphvertex.h:270
QString color() const
Definition: graphvertex.h:163
qreal PC()
Definition: graphvertex.h:269
QString label() const
Definition: graphvertex.h:176
void setPos(QPointF &p)
Definition: graphvertex.h:194
void setNumberDistance(const int &distance)
Definition: graphvertex.h:172
void setDC(const qreal &c)
Definition: graphvertex.h:235
void setSPC(const qreal &c)
Definition: graphvertex.h:268
QHash< int, pair_i_f > H_distance
Definition: graphvertex.h:57
void setBC(const qreal &c)
Definition: graphvertex.h:252
QPointF & disp()
Definition: graphvertex.h:197
qreal SIRCC()
Definition: graphvertex.h:250
int m_outEdgesCounter
Definition: graphvertex.h:325
H_shortestPaths m_shortestPaths
Definition: graphvertex.h:316
qreal SPP()
Definition: graphvertex.h:290
void setLabelSize(const int &size)
Definition: graphvertex.h:181
H_distance m_distance
Definition: graphvertex.h:314
H_edges m_outEdges
Definition: graphvertex.h:309
QString m_shape
Definition: graphvertex.h:338
int outEdgesReciprocated()
Definition: graphvertex.h:227
void setOutEdgeLabel(const int &v2, const QString &label)
Definition: graphvertex.h:210
bool hasCLC()
Definition: graphvertex.h:294
void set_dispY(qreal y)
Definition: graphvertex.h:200
qreal BC()
Definition: graphvertex.h:254
void setNumberColor(const QString &color)
Definition: graphvertex.h:166
QMultiHash< int, pair_i_fb > H_edges
Definition: graph.h:90
qreal delta()
Definition: graphvertex.h:218
void setSDP(const qreal &c)
Definition: graphvertex.h:278
qreal x() const
Definition: graphvertex.h:188
void setShape(const QString &shape, const QString &iconPath=QString())
Definition: graphvertex.h:158
qreal m_Eccentricity
Definition: graphvertex.h:331
int numberDistance() const
Definition: graphvertex.h:173
qreal distanceSum()
Definition: graphvertex.h:241
L_int m_neighborhoodList
Definition: graphvertex.h:344
void setPRP(const qreal &c)
Definition: graphvertex.h:282
QPair< qreal, bool > pair_f_b
Definition: graphvertex.h:52
void setNumberSize(const int &size)
Definition: graphvertex.h:169
QHash< QString, int > H_StrToInt
Definition: graphvertex.h:49
QString shapeIconPath()
Definition: graphvertex.h:160
QPointF m_disp
Definition: graphvertex.h:339
QPointF pos() const
Definition: graphvertex.h:193
void setSIC(const qreal &c)
Definition: graphvertex.h:273
void setPC(const qreal &c)
Definition: graphvertex.h:267
QMultiHash< int, pair_i_fb > H_edges
Definition: graphvertex.h:54
qreal SEVC()
Definition: graphvertex.h:299
bool isInLinked()
Definition: graphvertex.h:144
qreal DP()
Definition: graphvertex.h:279
double m_y
Definition: graphvertex.h:330
int inEdgesNonSym()
Definition: graphvertex.h:233
void setSPRP(const qreal &c)
Definition: graphvertex.h:283
qreal SBC()
Definition: graphvertex.h:255
void setSIRCC(const qreal &c)
Definition: graphvertex.h:248
qreal SIC()
Definition: graphvertex.h:275
void setOutLinkColor(const int &v2, const QString &color)
Definition: graphvertex.h:203
qreal m_SPP
Definition: graphvertex.h:335
int numberSize() const
Definition: graphvertex.h:170
void setX(const qreal &x)
Definition: graphvertex.h:187
void setDelta(const qreal &c)
Definition: graphvertex.h:217
qreal EC()
Definition: graphvertex.h:264
QMultiHash< int, qreal > m_reciprocalEdges
Definition: graphvertex.h:341
qreal PRP()
Definition: graphvertex.h:284
int outEdgesNonSym()
Definition: graphvertex.h:230
void setDP(const qreal &c)
Definition: graphvertex.h:277
void set_dispX(qreal x)
Definition: graphvertex.h:199
qreal SCC()
Definition: graphvertex.h:245
void setCC(const qreal &c)
Definition: graphvertex.h:242
void setLabelDistance(const int &distance)
Definition: graphvertex.h:184
qreal IRCC()
Definition: graphvertex.h:249
bool m_reciprocalLinked
Definition: graphvertex.h:329
void setIC(const qreal &c)
Definition: graphvertex.h:272
int name() const
Definition: graphvertex.h:87
QList< int > L_int
Definition: graph.h:92
QMultiHash< int, L_int > m_cliques
Definition: graphvertex.h:343
void setSC(const qreal &c)
Definition: graphvertex.h:257
void setOutEdgesNonSym(int outEdgesNonSym=-1)
Definition: graphvertex.h:229
qreal IC()
Definition: graphvertex.h:274
void setLabelColor(const QString &labelColor)
Definition: graphvertex.h:178
qreal SEC()
Definition: graphvertex.h:265
int m_value
Definition: graphvertex.h:327
Graph * m_graph
Definition: graphvertex.h:324
qreal eccentricity()
Definition: graphvertex.h:137
void setInEdgesNonSym(int inEdgesNonSym=-1)
Definition: graphvertex.h:232
QHash< int, pair_i_i > H_shortestPaths
Definition: graphvertex.h:60
qreal CC()
Definition: graphvertex.h:244
QString outEdgeLabel(const int &v2) const
Definition: graphvertex.h:212
void setDistanceSum(const qreal &c)
Definition: graphvertex.h:240
void setSBC(const qreal &c)
Definition: graphvertex.h:253
qreal SPRP()
Definition: graphvertex.h:285
The Graph class This is the main class for a Graph, used in conjuction with GraphVertex,...
Definition: graph.h:121
qreal PP()
Definition: graphvertex.h:289
int labelSize() const
Definition: graphvertex.h:182
QPair< int, qreal > pair_i_f
Definition: graphvertex.h:56
int m_outEdgesSym
Definition: graphvertex.h:326
void setY(const qreal &y)
Definition: graphvertex.h:190
qreal m_distanceSum
Definition: graphvertex.h:336
void setColor(const QString &color)
Definition: graphvertex.h:162
QString numberColor() const
Definition: graphvertex.h:167
QString shape() const
Definition: graphvertex.h:159
void setEnabled(const bool &flag)
Definition: graphvertex.h:91
void setCLC(const qreal &clucof)
Definition: graphvertex.h:293
bool isOutLinked()
Definition: graphvertex.h:140
void setSCC(const qreal &c)
Definition: graphvertex.h:243
qreal DC()
Definition: graphvertex.h:237
void setEccentricity(const qreal &c)
Definition: graphvertex.h:136
void setOutEdgesReciprocated(int outEdgesSym=-1)
Definition: graphvertex.h:226