33 #include <QStringList>
54 typedef QMultiHash < int, pair_i_fb >
H_edges;
74 const QString &numColor,
77 const QString &labelColor,
81 const QString &iconPath,
82 const int &edgesEstimate = 2000);
89 void setNumber(
const int &number);
91 void setEnabled(
const bool &status);
92 bool isEnabled ()
const;
94 void setSize(
const int &size );
97 void setShape(
const QString &shape,
const QString &iconPath = QString());
98 QString shape()
const;
99 QString shapeIconPath();
101 void setColor(
const QString &color);
102 QString color()
const;
103 QString colorToPajek();
105 void setNumberColor (
const QString &color);
106 QString numberColor()
const;
108 void setNumberSize (
const int &size);
109 int numberSize()
const;
111 void setNumberDistance (
const int &distance);
112 int numberDistance()
const;
114 void setLabel (
const QString &label);
115 QString label()
const;
117 void setLabelColor (
const QString &labelColor);
118 QString labelColor()
const;
120 void setLabelSize(
const int &size);
121 int labelSize()
const;
123 void setLabelDistance (
const int &distance);
124 int labelDistance()
const;
126 void setX(
const qreal &x);
129 void setY(
const qreal &y);
132 void setPos (QPointF &p);
133 QPointF pos ()
const;
135 void set_dispX (qreal x);
136 void set_dispY (qreal y);
139 void setRelation(
int newRel) ;
141 void addOutEdge (
const int &v2,
const qreal &weight,
const QString &color=QString(),
const QString &label=QString());
142 qreal hasEdgeTo(
const int &v,
const bool &allRelations=
false);
143 void removeOutEdge (
const int target);
144 void setOutEdgeWeight (
const int &target,
const qreal &weight);
145 void setOutEdgeEnabled (
const int &target,
bool);
146 void setOutLinkColor(
const int &v2,
const QString &color);
147 QString outLinkColor(
const int &v2);
148 void setOutEdgeLabel(
const int &v2,
const QString &label);
149 QString outEdgeLabel(
const int &v2)
const;
151 void addInEdge(
const int &v1,
const qreal &weight);
152 qreal hasEdgeFrom (
const int &v,
const bool &allRelations=
false);
153 void removeInEdge(
const int source);
154 void setInEdgeWeight (
const int &source,
const qreal &weight);
155 void setInEdgeEnabled (
const int &source,
bool);
158 int outEdgesCountConst()
const ;
161 int inEdgesCountConst()
const ;
166 void setIsolated(
bool isolated);
169 QHash<int, qreal> outEdgesEnabledHash(
const bool &allRelations=
false);
170 QHash<int,qreal>* outEdgesAllRelationsUniqueHash();
171 QHash<int,qreal>* inEdgesEnabledHash();
172 QHash<int,qreal> reciprocalEdgesHash();
173 QList<int> neighborhoodList();
176 int outDegreeConst();
181 void setEnabledEdgesByRelation(
const int relation,
const bool status);
182 void setEnabledUnilateralEdges(
const bool &status=
false);
184 qreal distance(
const int &v1) ;
185 void setDistance (
const int &v1,
const qreal &d) ;
186 void reserveDistance(
const int &N);
187 void clearDistance();
189 int shortestPaths(
const int &v1) ;
190 void setShortestPaths(
const int &v1,
const int &sp) ;
191 void reserveShortestPaths(
const int &N);
192 void clearShortestPaths();
194 void setEccentricity(
const qreal &c);
195 qreal eccentricity();
197 void setDelta(
const qreal &c);
202 void appendToPs(
const int &vertex ) ;
209 void setOutEdgesNonSym(
int outEdgesNonSym=-1) { m_outEdgesNonSym = (outEdgesNonSym!=-1) ? outEdgesNonSym : m_outEdgesNonSym+1; }
212 void setInEdgesNonSym(
int inEdgesNonSym=-1) { m_inEdgesNonSym = (inEdgesNonSym!=-1) ? inEdgesNonSym : m_inEdgesNonSym+1; }
215 void setDC (
const qreal &c){ m_DC=c;}
216 void setSDC (
const qreal &c ) { m_SDC=c;}
217 qreal
DC() {
return m_DC;}
218 qreal
SDC() {
return m_SDC;}
222 void setCC (
const qreal &c){ m_CC=c;}
223 void setSCC (
const qreal &c ) { m_SCC=c;}
224 qreal
CC() {
return m_CC;}
225 qreal
SCC() {
return m_SCC; }
232 void setBC(
const qreal &c){ m_BC=c;}
233 void setSBC (
const qreal &c ) { m_SBC=c;}
234 qreal
BC() {
return m_BC;}
235 qreal
SBC() {
return m_SBC; }
237 void setSC (
const qreal &c){ m_SC=c;}
238 void setSSC (
const qreal &c ) { m_SSC=c;}
239 qreal
SC() {
return m_SC;}
240 qreal
SSC() {
return m_SSC; }
242 void setEC(
const qreal &dist) { m_EC=dist;}
244 qreal
EC() {
return m_EC;}
245 qreal
SEC() {
return m_SEC;}
247 void setPC (
const qreal &c){ m_PC=c;}
248 void setSPC (
const qreal &c ) { m_SPC=c;}
249 qreal
PC() {
return m_PC;}
250 qreal
SPC() {
return m_SPC; }
252 void setIC (
const qreal &c){ m_IC=c;}
253 void setSIC (
const qreal &c ) { m_SIC=c;}
254 qreal
IC() {
return m_IC;}
255 qreal
SIC() {
return m_SIC; }
257 void setDP (
const qreal &c){ m_DP=c;}
258 void setSDP (
const qreal &c ) { m_SDP=c;}
259 qreal
DP() {
return m_DP;}
260 qreal
SDP() {
return m_SDP;}
264 qreal
PRP() {
return m_PRC;}
265 qreal
SPRP() {
return m_SPRC; }
267 void setPP (
const qreal &c){ m_PP=c;}
268 void setSPP (
const qreal &c ) { m_SPP=c;}
269 qreal
PP() {
return m_PP;}
270 qreal
SPP() {
return m_SPP; }
272 qreal
CLC() {
return m_CLC; }
273 void setCLC(
const qreal &clucof) { m_CLC=clucof; m_hasCLC=
true; }
278 qreal
EVC() {
return m_EVC;}
282 int cliques (
const int &ofSize);
284 void cliqueAdd (
const QList<int> &clique);
303 const bool &preserveReverseEdge=
false,
304 const int &edgeWeight=1,
305 const int &reverseEdgeWeight=1
312 int m_number, m_outEdgesCounter, m_inEdgesCounter, m_outDegree,
m_inDegree, m_localDegree;
316 bool m_reciprocalLinked,
m_enabled, m_hasCLC, m_isolated;
320 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;
321 qreal m_PC, m_SPC, m_SIC,
m_IC, m_SPRC, m_PRC;
325 QString
m_color, m_numberColor, m_label, m_labelColor, m_shape, m_iconPath;
Definition: graphvertex.h:63
qreal DP()
Definition: graphvertex.h:259
int m_inEdgesNonSym
Definition: graphvertex.h:313
qreal IRCC()
Definition: graphvertex.h:229
qreal BC()
Definition: graphvertex.h:234
qreal SPRP()
Definition: graphvertex.h:265
qreal m_BC
Definition: graphvertex.h:320
qreal CC()
Definition: graphvertex.h:224
QString m_color
Definition: graphvertex.h:325
qreal EC()
Definition: graphvertex.h:244
L_int myPs
Definition: graphvertex.h:329
void setEC(const qreal &dist)
Definition: graphvertex.h:242
void setInEdgesNonSym(int inEdgesNonSym=-1)
Definition: graphvertex.h:212
void setSEVC(const qreal &c)
Definition: graphvertex.h:277
qreal m_delta
Definition: graphvertex.h:319
void setSDP(const qreal &c)
Definition: graphvertex.h:258
void setPC(const qreal &c)
Definition: graphvertex.h:247
double m_x
Definition: graphvertex.h:317
qreal m_IC
Definition: graphvertex.h:321
void setSCC(const qreal &c)
Definition: graphvertex.h:223
qreal SDC()
Definition: graphvertex.h:218
void setEVC(const qreal &c)
Definition: graphvertex.h:276
void setSPP(const qreal &c)
Definition: graphvertex.h:268
L_int m_neighborhoodList
Definition: graphvertex.h:331
void setSDC(const qreal &c)
Definition: graphvertex.h:216
void setDistanceSum(const qreal &c)
Definition: graphvertex.h:220
void setSIRCC(const qreal &c)
Definition: graphvertex.h:228
void setIC(const qreal &c)
Definition: graphvertex.h:252
void setSPC(const qreal &c)
Definition: graphvertex.h:248
void setSEC(const qreal &c)
Definition: graphvertex.h:243
QMultiHash< int, L_int > m_cliques
Definition: graphvertex.h:330
int m_labelDistance
Definition: graphvertex.h:314
QPointF m_disp
Definition: graphvertex.h:326
H_distance m_distance
Definition: graphvertex.h:294
void setCLC(const qreal &clucof)
Definition: graphvertex.h:273
qreal SIC()
Definition: graphvertex.h:255
qreal SEC()
Definition: graphvertex.h:245
void setSC(const qreal &c)
Definition: graphvertex.h:237
qreal m_CLC
Definition: graphvertex.h:318
qreal SBC()
Definition: graphvertex.h:235
QHash< int, qreal > m_reciprocalEdges
Definition: graphvertex.h:328
int m_curRelation
Definition: graphvertex.h:315
void setSPRP(const qreal &c)
Definition: graphvertex.h:263
H_IntToStr m_outEdgeLabels
Definition: graphvertex.h:332
void setSBC(const qreal &c)
Definition: graphvertex.h:233
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:323
qreal SPC()
Definition: graphvertex.h:250
qreal SEVC()
Definition: graphvertex.h:279
int inEdgesNonSym()
Definition: graphvertex.h:213
qreal SDP()
Definition: graphvertex.h:260
H_shortestPaths m_shortestPaths
Definition: graphvertex.h:296
void setCC(const qreal &c)
Definition: graphvertex.h:222
void setPRP(const qreal &c)
Definition: graphvertex.h:262
int outEdgesReciprocated()
Definition: graphvertex.h:207
void setSIC(const qreal &c)
Definition: graphvertex.h:253
qreal PC()
Definition: graphvertex.h:249
H_edges m_inEdges
Definition: graphvertex.h:289
qreal m_EVC
Definition: graphvertex.h:322
void setIRCC(const qreal &c)
Definition: graphvertex.h:227
qreal CLC()
Definition: graphvertex.h:272
void setOutEdgesNonSym(int outEdgesNonSym=-1)
Definition: graphvertex.h:209
qreal SSC()
Definition: graphvertex.h:240
void clearCliques()
Definition: graphvertex.h:286
qreal SIRCC()
Definition: graphvertex.h:230
void setDP(const qreal &c)
Definition: graphvertex.h:257
qreal distanceSum()
Definition: graphvertex.h:221
qreal DC()
Definition: graphvertex.h:217
qreal PRP()
Definition: graphvertex.h:264
qreal PP()
Definition: graphvertex.h:269
int m_inDegree
Definition: graphvertex.h:312
qreal EVC()
Definition: graphvertex.h:278
qreal SCC()
Definition: graphvertex.h:225
qreal IC()
Definition: graphvertex.h:254
void setDC(const qreal &c)
Definition: graphvertex.h:215
void setPP(const qreal &c)
Definition: graphvertex.h:267
bool m_enabled
Definition: graphvertex.h:316
void setBC(const qreal &c)
Definition: graphvertex.h:232
void setOutEdgesReciprocated(int outEdgesSym=-1)
Definition: graphvertex.h:206
int outEdgesNonSym()
Definition: graphvertex.h:210
qreal SPP()
Definition: graphvertex.h:270
void setSSC(const qreal &c)
Definition: graphvertex.h:238
qreal SC()
Definition: graphvertex.h:239
bool hasCLC()
Definition: graphvertex.h:274
Graph * m_graph
Definition: graphvertex.h:311
The Graph class This is the main class for a Graph, used in conjuction with GraphVertex,...
Definition: graph.h:111
QList< int > L_int
Definition: graph.h:85
QMultiHash< int, pair_i_fb > H_edges
Definition: graph.h:83
QHash< int, QString > H_IntToStr
Definition: graphvertex.h:49
QPair< int, int > pair_i_i
Definition: graphvertex.h:59
QList< int > L_int
Definition: graphvertex.h:44
QHash< int, pair_i_i > H_shortestPaths
Definition: graphvertex.h:60
QHash< int, pair_i_f > H_distance
Definition: graphvertex.h:57
QPair< int, qreal > pair_i_f
Definition: graphvertex.h:56
QMultiHash< int, pair_i_fb > H_edges
Definition: graphvertex.h:54
QPair< qreal, bool > pair_f_b
Definition: graphvertex.h:52
QHash< QString, int > H_StrToInt
Definition: graphvertex.h:50
QPair< int, pair_f_b > pair_i_fb
Definition: graphvertex.h:53