#include <graphvertex.h>

+ Inheritance diagram for GraphVertex:
+ Collaboration diagram for GraphVertex:

Signals

void setEdgeVisibility (int, int, int, bool)
 

Public Member Functions

 GraphVertex (Graph *parent, const long int &name, const int &val, 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)
 
 GraphVertex (const long int &name)
 constructor with default values More...
 
 ~GraphVertex ()
 
long int name () const
 
void setName (const long int &name)
 
void setEnabled (const bool &flag)
 
bool isEnabled () const
 
void relationSet (int newRel)
 Changes the current relation of this vertex to newRel. More...
 
void edgeAddTo (const long int &v2, const float &weight)
 Adds an outbound edge to vertex v2 with weight w. More...
 
void edgeAddFrom (const long int &v1, const float &weight)
 Adds an inbound edge from vertex v1. More...
 
void changeOutEdgeWeight (long int target, float weight)
 
void setOutEdgeEnabled (long int, bool)
 GraphVertex::setOutEdgeEnabled. More...
 
void edgeRemoveTo (long int target)
 Removes outbound edge to vertex v2. More...
 
void edgeRemoveFrom (long int source)
 Removes the inbound edge from vertex v2. More...
 
QHash< int, float > outEdgesEnabledHash (const bool &allRelations=false)
 Returns a qhash of all enabled outEdges in the active relation. More...
 
QHash< int, float > * outEdgesAllRelationsUniqueHash ()
 Returns a qhash of all edges to neighbors in all relations. More...
 
QHash< int, float > * inEdgesEnabledHash ()
 Returns a qhash of all enabled inEdges in the active relation. More...
 
QHash< int, float > reciprocalEdgesHash ()
 Returns a qhash of all reciprocal edges to neighbors in the active relation. More...
 
QList< int > neighborhoodList ()
 Returns a list of all neighbors mutually connected to this vertex in the active relation Same as calling GraphVertex::reciprocalEdgesHash().keys() which returns a QList of int keys, where each key is a vertex reciprocally connected to this one. More...
 
long int outEdges ()
 Returns the number of active outbound arcs, aka the number of outEdges, from this vertex for the current relation. More...
 
long int outEdgesConst () const
 Returns the number of active outbound arcs Needs to have outEdges called before the call to this method. More...
 
long int inEdges ()
 Returns the number of active inbound arcs, aka the number of inEdges, to this vertex for the current relation. More...
 
long int inEdgesConst () const
 Returns the number of active inbound arcs Needs to have inEdges called before the call to this method. More...
 
long int degreeOut ()
 Returns the degreeOut (the sum of all enabled outEdges weights) of this vertex. More...
 
long int outDegreeConst ()
 
long int degreeIn ()
 Returns the degreeIn (the sum of all enabled inEdges weights) of this vertex. More...
 
long int inDegreeConst ()
 
long int localDegree ()
 
float distance (const long int &v1)
 Returns geodesic distance to vertex v1 If d to v1 has not been set previously, then return RAND_MAX. More...
 
void setDistance (const long int &v1, const float &d)
 Sets distance to vertex v1 to dist. More...
 
void reserveDistance (const int &N)
 Reserves N items for the distance hash. See QHash Algorithmic Complexity. More...
 
void clearDistance ()
 Removes all items from m_distance hash dictionary. More...
 
int shortestPaths (const long int &v1)
 Returns number of shortest paths to vertex v1 If it has not been set previously, then return 0. More...
 
void setShortestPaths (const long int &v1, const int &sp)
 Sets shortest paths to vertex v1 to sp. More...
 
void reserveShortestPaths (const int &N)
 Reserves N items for the ShortestPaths hash. See QHash Algorithmic Complexity Not to be used on large nets, atm. More...
 
void clearShortestPaths ()
 Removes all items from m_shortestPaths hash dictionary. More...
 
void setEccentricity (float c)
 
float eccentricity ()
 
bool isOutLinked ()
 
float hasEdgeTo (const long int &v, const bool &allRelations=false)
 GraphVertex::hasEdgeTo Checks if this vertex is outlinked to v2 and returns the weight of the edge only if the outbound edge is enabled. More...
 
bool isInLinked ()
 
float hasEdgeFrom (const long int &v, const bool &allRelations=false)
 GraphVertex::hasEdgeFrom Checks if this vertex is inLinked from v2 and returns the weight of the link only if the inLink is enabled. More...
 
bool isIsolated ()
 
void setIsolated (bool isolated)
 
void edgeFilterByWeight (float m_threshold, bool overThreshold)
 Filters out edges over or under a specified weight (m_threshold) More...
 
void edgeFilterByRelation (int relation, bool status)
 Filters out all edges of a given relation. More...
 
void edgeFilterUnilateral (const bool &toggle=false)
 Filters out unilateral (non-reciprocal) edges If allRelations is true, then all relations are checked. More...
 
void setSize (const int &size)
 
int size () const
 
void setShape (const QString &shape)
 
QString shape () const
 
void setColor (const QString &color)
 
QString color () const
 
QString colorToPajek ()
 returns the vertex color to pajek format More...
 
void setNumberColor (const QString &color)
 
QString numberColor () const
 
void setNumberSize (const int &size)
 
int numberSize () const
 
void setNumberDistance (const int &distance)
 
int numberDistance () const
 
void setLabel (const QString &label)
 
QString label () const
 
void setLabelColor (const QString &labelColor)
 
QString labelColor () const
 
void setLabelSize (const int &size)
 
int labelSize () const
 
void setLabelDistance (const int &distance)
 
int labelDistance () const
 
void setX (const float &x)
 
float x () const
 
void setY (const float &y)
 
float y () const
 
QPointF pos () const
 
void setPos (QPointF &p)
 
QPointF & disp ()
 
void set_dispX (float x)
 
void set_dispY (float y)
 
void setOutLinkColor (const long int &v2, const QString &color)
 
QString outLinkColor (const long int &v2)
 
void setOutEdgeLabel (const long int &v2, const QString &label)
 
QString outEdgeLabel (const long int &v2) const
 
void setDelta (float c)
 
float delta ()
 
void clearPs ()
 GraphVertex::clearPs. More...
 
void appendToPs (long int vertex)
 
L_int Ps (void)
 
void setOutEdgesReciprocated (int outEdgesSym=-1)
 
int outEdgesReciprocated ()
 
void setOutEdgesNonSym (int outEdgesNonSym=-1)
 
int outEdgesNonSym ()
 
void setInEdgesNonSym (int inEdgesNonSym=-1)
 
int inEdgesNonSym ()
 
void setDC (float c)
 
void setSDC (float c)
 
float DC ()
 
float SDC ()
 
void setCC (float c)
 
void setSCC (float c)
 
float CC ()
 
float SCC ()
 
void setIRCC (float c)
 
void setSIRCC (float c)
 
float IRCC ()
 
float SIRCC ()
 
void setBC (float c)
 
void setSBC (float c)
 
float BC ()
 
float SBC ()
 
void setSC (float c)
 
void setSSC (float c)
 
float SC ()
 
float SSC ()
 
void setEC (float dist)
 
void setSEC (float c)
 
float EC ()
 
float SEC ()
 
void setPC (float c)
 
void setSPC (float c)
 
float PC ()
 
float SPC ()
 
void setIC (float c)
 
void setSIC (float c)
 
float IC ()
 
float SIC ()
 
void setDP (float c)
 
void setSDP (float c)
 
float DP ()
 
float SDP ()
 
void setPRP (float c)
 
void setSPRP (float c)
 
float PRP ()
 
float SPRP ()
 
void setPP (float c)
 
void setSPP (float c)
 
float PP ()
 
float SPP ()
 
float CLC ()
 
void setCLC (float clucof)
 
bool hasCLC ()
 
void setEVC (float c)
 
void setSEVC (float c)
 
float EVC ()
 
float SEVC ()
 
int cliques (const int &ofSize)
 GraphVertex::cliques Returns the number of cliques sized size this vertex belongs to. More...
 
void cliqueAdd (const QList< int > &clique)
 GraphVertex::cliqueAdd. More...
 
void clearCliques ()
 

Public Attributes

H_edges m_outEdges
 
H_edges m_inEdges
 
H_distance m_distance
 
H_shortestPaths m_shortestPaths
 

Private Attributes

GraphparentGraph
 
long int m_name
 
long int m_outEdgesCounter
 
long int m_inEdgesCounter
 
long int m_outDegree
 
long int m_inDegree
 
long int m_localDegree
 
long int m_outEdgesNonSym
 
long int m_inEdgesNonSym
 
long int m_outEdgesSym
 
int m_value
 
int m_size
 
int m_labelSize
 
int m_numberSize
 
int m_numberDistance
 
int m_labelDistance
 
int m_curRelation
 
bool m_reciprocalLinked
 
bool m_enabled
 
bool m_hasCLC
 
bool m_isolated
 
double m_x
 
double m_y
 
float m_Eccentricity
 
float m_CLC
 
float m_delta
 
float m_EC
 
float m_SEC
 
float m_DC
 
float m_SDC
 
float m_DP
 
float m_SDP
 
float m_CC
 
float m_SCC
 
float m_BC
 
float m_SBC
 
float m_IRCC
 
float m_SIRCC
 
float m_SC
 
float m_SSC
 
float m_PC
 
float m_SPC
 
float m_SIC
 
float m_IC
 
float m_SPRC
 
float m_PRC
 
float m_PP
 
float m_SPP
 
float m_EVC
 
float m_SEVC
 
QString m_color
 
QString m_numberColor
 
QString m_label
 
QString m_labelColor
 
QString m_shape
 
QPointF m_disp
 
QHash< int, float > m_reciprocalEdges
 
L_int myPs
 
QHash< int, L_intm_cliques
 
L_int m_neighborhoodList
 
H_IntToStr m_outLinkColors
 
H_IntToStr m_outEdgeLabels
 

Constructor & Destructor Documentation

GraphVertex::GraphVertex ( Graph parent,
const long int &  name,
const int &  val,
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 
)
GraphVertex::GraphVertex ( const long int &  name)

constructor with default values

Parameters
name
GraphVertex::~GraphVertex ( )

Member Function Documentation

void GraphVertex::appendToPs ( long int  vertex)
float GraphVertex::BC ( )
inline
float GraphVertex::CC ( )
inline
void GraphVertex::changeOutEdgeWeight ( long int  target,
float  weight 
)
float GraphVertex::CLC ( )
inline
void GraphVertex::clearCliques ( )
inline
void GraphVertex::clearDistance ( )

Removes all items from m_distance hash dictionary.

void GraphVertex::clearPs ( )
void GraphVertex::clearShortestPaths ( )

Removes all items from m_shortestPaths hash dictionary.

void GraphVertex::cliqueAdd ( const QList< int > &  clique)

GraphVertex::cliqueAdd.

Parameters
clique
int GraphVertex::cliques ( const int &  ofSize)

GraphVertex::cliques Returns the number of cliques sized size this vertex belongs to.

Parameters
size
Returns
QString GraphVertex::color ( ) const
inline
QString GraphVertex::colorToPajek ( )

returns the vertex color to pajek format

Returns
float GraphVertex::DC ( )
inline
long int GraphVertex::degreeIn ( )

Returns the degreeIn (the sum of all enabled inEdges weights) of this vertex.

Returns
long int
long int GraphVertex::degreeOut ( )

Returns the degreeOut (the sum of all enabled outEdges weights) of this vertex.

Returns
long int
float GraphVertex::delta ( )
inline
QPointF& GraphVertex::disp ( )
inline
float GraphVertex::distance ( const long int &  v1)

Returns geodesic distance to vertex v1 If d to v1 has not been set previously, then return RAND_MAX.

Parameters
v1
float GraphVertex::DP ( )
inline
float GraphVertex::EC ( )
inline
float GraphVertex::eccentricity ( )
inline
void GraphVertex::edgeAddFrom ( const long int &  v1,
const float &  weight 
)

Adds an inbound edge from vertex v1.

Parameters
source
weight
void GraphVertex::edgeAddTo ( const long int &  v2,
const float &  weight 
)

Adds an outbound edge to vertex v2 with weight w.

Parameters
target
weight
void GraphVertex::edgeFilterByRelation ( int  relation,
bool  status 
)

Filters out all edges of a given relation.

Parameters
relation
void GraphVertex::edgeFilterByWeight ( float  m_threshold,
bool  overThreshold 
)

Filters out edges over or under a specified weight (m_threshold)

Parameters
m_threshold
overThreshold
void GraphVertex::edgeFilterUnilateral ( const bool &  toggle = false)

Filters out unilateral (non-reciprocal) edges If allRelations is true, then all relations are checked.

Parameters
toggle
void GraphVertex::edgeRemoveFrom ( long int  v2)

Removes the inbound edge from vertex v2.

Parameters
v2
void GraphVertex::edgeRemoveTo ( long int  v2)

Removes outbound edge to vertex v2.

Parameters
v2
float GraphVertex::EVC ( )
inline
bool GraphVertex::hasCLC ( )
inline
float GraphVertex::hasEdgeFrom ( const long int &  v2,
const bool &  allRelations = false 
)

GraphVertex::hasEdgeFrom Checks if this vertex is inLinked from v2 and returns the weight of the link only if the inLink is enabled.

Parameters
v2
Returns
float GraphVertex::hasEdgeTo ( const long int &  v2,
const bool &  allRelations = false 
)

GraphVertex::hasEdgeTo Checks if this vertex is outlinked to v2 and returns the weight of the edge only if the outbound edge is enabled.

Parameters
v2
Returns
float GraphVertex::IC ( )
inline
long int GraphVertex::inDegreeConst ( )
long int GraphVertex::inEdges ( )

Returns the number of active inbound arcs, aka the number of inEdges, to this vertex for the current relation.

Returns
long int
long int GraphVertex::inEdgesConst ( ) const

Returns the number of active inbound arcs Needs to have inEdges called before the call to this method.

Returns
long int
QHash< int, float > * GraphVertex::inEdgesEnabledHash ( )

Returns a qhash of all enabled inEdges in the active relation.

Returns
QHash<int,float>*
int GraphVertex::inEdgesNonSym ( )
inline
float GraphVertex::IRCC ( )
inline
bool GraphVertex::isEnabled ( ) const
inline
bool GraphVertex::isInLinked ( )
inline
bool GraphVertex::isIsolated ( )
inline
bool GraphVertex::isOutLinked ( )
inline
QString GraphVertex::label ( ) const
inline
QString GraphVertex::labelColor ( ) const
inline
int GraphVertex::labelDistance ( ) const
inline
int GraphVertex::labelSize ( ) const
inline
long int GraphVertex::localDegree ( )

localDegree is the degreeOut + degreeIn minus the edges counted twice.

long int GraphVertex::name ( ) const
inline
QList< int > GraphVertex::neighborhoodList ( )

Returns a list of all neighbors mutually connected to this vertex in the active relation Same as calling GraphVertex::reciprocalEdgesHash().keys() which returns a QList of int keys, where each key is a vertex reciprocally connected to this one.

Returns
QList<int>
QString GraphVertex::numberColor ( ) const
inline
int GraphVertex::numberDistance ( ) const
inline
int GraphVertex::numberSize ( ) const
inline
long int GraphVertex::outDegreeConst ( )
QString GraphVertex::outEdgeLabel ( const long int &  v2) const
inline
long int GraphVertex::outEdges ( )

Returns the number of active outbound arcs, aka the number of outEdges, from this vertex for the current relation.

Returns
long int
QHash< int, float > * GraphVertex::outEdgesAllRelationsUniqueHash ( )

Returns a qhash of all edges to neighbors in all relations.

Returns
long int GraphVertex::outEdgesConst ( ) const

Returns the number of active outbound arcs Needs to have outEdges called before the call to this method.

Returns
long int
QHash< int, float > GraphVertex::outEdgesEnabledHash ( const bool &  allRelations = false)

Returns a qhash of all enabled outEdges in the active relation.

Returns
QHash<int,float>*
int GraphVertex::outEdgesNonSym ( )
inline
int GraphVertex::outEdgesReciprocated ( )
inline
QString GraphVertex::outLinkColor ( const long int &  v2)
inline
float GraphVertex::PC ( )
inline
QPointF GraphVertex::pos ( ) const
inline
float GraphVertex::PP ( )
inline
float GraphVertex::PRP ( )
inline
L_int GraphVertex::Ps ( void  )
QHash< int, float > GraphVertex::reciprocalEdgesHash ( )

Returns a qhash of all reciprocal edges to neighbors in the active relation.

Returns
QHash<int,float>*
void GraphVertex::relationSet ( int  newRel)

Changes the current relation of this vertex to newRel.

Parameters
newRel
void GraphVertex::reserveDistance ( const int &  N)

Reserves N items for the distance hash. See QHash Algorithmic Complexity.

  • Not to be used on large nets, atm.
    Parameters
    N
void GraphVertex::reserveShortestPaths ( const int &  N)

Reserves N items for the ShortestPaths hash. See QHash Algorithmic Complexity Not to be used on large nets, atm.

Parameters
N
float GraphVertex::SBC ( )
inline
float GraphVertex::SC ( )
inline
float GraphVertex::SCC ( )
inline
float GraphVertex::SDC ( )
inline
float GraphVertex::SDP ( )
inline
float GraphVertex::SEC ( )
inline
void GraphVertex::set_dispX ( float  x)
inline
void GraphVertex::set_dispY ( float  y)
inline
void GraphVertex::setBC ( float  c)
inline
void GraphVertex::setCC ( float  c)
inline
void GraphVertex::setCLC ( float  clucof)
inline
void GraphVertex::setColor ( const QString &  color)
inline
void GraphVertex::setDC ( float  c)
inline
void GraphVertex::setDelta ( float  c)
inline
void GraphVertex::setDistance ( const long int &  v1,
const float &  d 
)

Sets distance to vertex v1 to dist.

Parameters
v1
dist
void GraphVertex::setDP ( float  c)
inline
void GraphVertex::setEC ( float  dist)
inline
void GraphVertex::setEccentricity ( float  c)
inline
void GraphVertex::setEdgeVisibility ( int  ,
int  ,
int  ,
bool   
)
signal
void GraphVertex::setEnabled ( const bool &  flag)
inline
void GraphVertex::setEVC ( float  c)
inline
void GraphVertex::setIC ( float  c)
inline
void GraphVertex::setInEdgesNonSym ( int  inEdgesNonSym = -1)
inline
void GraphVertex::setIRCC ( float  c)
inline
void GraphVertex::setIsolated ( bool  isolated)
inline
void GraphVertex::setLabel ( const QString &  label)
inline
void GraphVertex::setLabelColor ( const QString &  labelColor)
inline
void GraphVertex::setLabelDistance ( const int &  distance)
inline
void GraphVertex::setLabelSize ( const int &  size)
inline
void GraphVertex::setName ( const long int &  name)
inline
void GraphVertex::setNumberColor ( const QString &  color)
inline
void GraphVertex::setNumberDistance ( const int &  distance)
inline
void GraphVertex::setNumberSize ( const int &  size)
inline
void GraphVertex::setOutEdgeEnabled ( long int  target,
bool  status 
)

GraphVertex::setOutEdgeEnabled.

Parameters
target
status
void GraphVertex::setOutEdgeLabel ( const long int &  v2,
const QString &  label 
)
inline
void GraphVertex::setOutEdgesNonSym ( int  outEdgesNonSym = -1)
inline
void GraphVertex::setOutEdgesReciprocated ( int  outEdgesSym = -1)
inline
void GraphVertex::setOutLinkColor ( const long int &  v2,
const QString &  color 
)
inline
void GraphVertex::setPC ( float  c)
inline
void GraphVertex::setPos ( QPointF &  p)
inline
void GraphVertex::setPP ( float  c)
inline
void GraphVertex::setPRP ( float  c)
inline
void GraphVertex::setSBC ( float  c)
inline
void GraphVertex::setSC ( float  c)
inline
void GraphVertex::setSCC ( float  c)
inline
void GraphVertex::setSDC ( float  c)
inline
void GraphVertex::setSDP ( float  c)
inline
void GraphVertex::setSEC ( float  c)
inline
void GraphVertex::setSEVC ( float  c)
inline
void GraphVertex::setShape ( const QString &  shape)
inline
void GraphVertex::setShortestPaths ( const long int &  v1,
const int &  sp 
)

Sets shortest paths to vertex v1 to sp.

Parameters
v1
sp
void GraphVertex::setSIC ( float  c)
inline
void GraphVertex::setSIRCC ( float  c)
inline
void GraphVertex::setSize ( const int &  size)
inline
void GraphVertex::setSPC ( float  c)
inline
void GraphVertex::setSPP ( float  c)
inline
void GraphVertex::setSPRP ( float  c)
inline
void GraphVertex::setSSC ( float  c)
inline
void GraphVertex::setX ( const float &  x)
inline
void GraphVertex::setY ( const float &  y)
inline
float GraphVertex::SEVC ( )
inline
QString GraphVertex::shape ( ) const
inline
int GraphVertex::shortestPaths ( const long int &  v1)

Returns number of shortest paths to vertex v1 If it has not been set previously, then return 0.

Parameters
v1
float GraphVertex::SIC ( )
inline
float GraphVertex::SIRCC ( )
inline
int GraphVertex::size ( ) const
inline
float GraphVertex::SPC ( )
inline
float GraphVertex::SPP ( )
inline
float GraphVertex::SPRP ( )
inline
float GraphVertex::SSC ( )
inline
float GraphVertex::x ( ) const
inline
float GraphVertex::y ( ) const
inline

Member Data Documentation

float GraphVertex::m_BC
private
float GraphVertex::m_CC
private
float GraphVertex::m_CLC
private
QHash<int, L_int> GraphVertex::m_cliques
private
QString GraphVertex::m_color
private
int GraphVertex::m_curRelation
private
float GraphVertex::m_DC
private
float GraphVertex::m_delta
private
QPointF GraphVertex::m_disp
private
H_distance GraphVertex::m_distance
float GraphVertex::m_DP
private
float GraphVertex::m_EC
private
float GraphVertex::m_Eccentricity
private
bool GraphVertex::m_enabled
private
float GraphVertex::m_EVC
private
bool GraphVertex::m_hasCLC
private
float GraphVertex::m_IC
private
long int GraphVertex::m_inDegree
private
H_edges GraphVertex::m_inEdges
long int GraphVertex::m_inEdgesCounter
private
long int GraphVertex::m_inEdgesNonSym
private
float GraphVertex::m_IRCC
private
bool GraphVertex::m_isolated
private
QString GraphVertex::m_label
private
QString GraphVertex::m_labelColor
private
int GraphVertex::m_labelDistance
private
int GraphVertex::m_labelSize
private
long int GraphVertex::m_localDegree
private
long int GraphVertex::m_name
private
L_int GraphVertex::m_neighborhoodList
private
QString GraphVertex::m_numberColor
private
int GraphVertex::m_numberDistance
private
int GraphVertex::m_numberSize
private
long int GraphVertex::m_outDegree
private
H_IntToStr GraphVertex::m_outEdgeLabels
private
H_edges GraphVertex::m_outEdges
long int GraphVertex::m_outEdgesCounter
private
long int GraphVertex::m_outEdgesNonSym
private
long int GraphVertex::m_outEdgesSym
private
H_IntToStr GraphVertex::m_outLinkColors
private
float GraphVertex::m_PC
private
float GraphVertex::m_PP
private
float GraphVertex::m_PRC
private
QHash<int,float> GraphVertex::m_reciprocalEdges
private
bool GraphVertex::m_reciprocalLinked
private
float GraphVertex::m_SBC
private
float GraphVertex::m_SC
private
float GraphVertex::m_SCC
private
float GraphVertex::m_SDC
private
float GraphVertex::m_SDP
private
float GraphVertex::m_SEC
private
float GraphVertex::m_SEVC
private
QString GraphVertex::m_shape
private
H_shortestPaths GraphVertex::m_shortestPaths
float GraphVertex::m_SIC
private
float GraphVertex::m_SIRCC
private
int GraphVertex::m_size
private
float GraphVertex::m_SPC
private
float GraphVertex::m_SPP
private
float GraphVertex::m_SPRC
private
float GraphVertex::m_SSC
private
int GraphVertex::m_value
private
double GraphVertex::m_x
private
double GraphVertex::m_y
private
L_int GraphVertex::myPs
private
Graph* GraphVertex::parentGraph
private

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