libgexf  0.1.3
Public Member Functions | List of all members
libgexf::DirectedGraph Class Reference

Interpretation of the topology structure as a directed graph. More...

#include <directedgraph.h>

Inheritance diagram for libgexf::DirectedGraph:
libgexf::Graph

Public Member Functions

 DirectedGraph (const DirectedGraph &orig)
 Copy constructor.
 
void removeInEdges (const libgexf::t_id target_id)
 Remove incoming edges from a node. More...
 
void removeOutEdges (const libgexf::t_id source_id)
 Remove outgoing edges from a node. More...
 
std::vector< libgexf::t_idgetInEdges (const libgexf::t_id node_id) const
 Get incoming edges from a node. More...
 
std::vector< libgexf::t_idgetOutEdges (const libgexf::t_id node_id) const
 Get outgoing edges from a node. More...
 
std::vector< libgexf::t_idgetSuccessors (const libgexf::t_id node_id) const
 Get node successors. More...
 
std::vector< libgexf::t_idgetPredecessors (const libgexf::t_id node_id) const
 Get node predecessors. More...
 
unsigned int getInDegree (const libgexf::t_id node_id) const
 Get indegree value. More...
 
unsigned int getOutDegree (const libgexf::t_id node_id) const
 Get outdegree value. More...
 
bool isSuccessor (const libgexf::t_id node_id, const libgexf::t_id successor_id) const
 Test a possible successor. More...
 
bool isPredecessor (const libgexf::t_id node_id, const libgexf::t_id predecessor_id) const
 Test a possible predecessor. More...
 
- Public Member Functions inherited from libgexf::Graph
 Graph (const Graph &orig)
 Copy constructor.
 
void addNode (const libgexf::t_id id)
 Add a node. More...
 
void addEdge (const libgexf::t_id id, const libgexf::t_id source_id, const libgexf::t_id target_id, const float weight=1.0, const libgexf::t_edge_type type=EDGE_UNDEF)
 Add an edge. More...
 
void removeNode (const libgexf::t_id id)
 Remove a node. More...
 
void removeEdge (const libgexf::t_id source_id, const libgexf::t_id target_id)
 Remove an edge. More...
 
bool containsNode (const libgexf::t_id id) const
 Test node existence. More...
 
bool containsEdge (const libgexf::t_id source_id, const libgexf::t_id target_id) const
 Test edge existence. More...
 
t_id getEdge (const libgexf::t_id source_id, const libgexf::t_id target_id) const
 Get the edge id. More...
 
libgexf::NodeItergetNodes () const
 Get all nodes. More...
 
libgexf::EdgeItergetEdges () const
 Get all edges. More...
 
std::vector< libgexf::t_idgetNeighbors (const libgexf::t_id node_id) const
 Get node neighbors. More...
 
unsigned int getNodeCount () const
 Count the nodes. More...
 
unsigned int getEdgeCount () const
 Count the edges. More...
 
unsigned int getDegree (const libgexf::t_id node_id) const
 Get node degree. More...
 
void clearEdges (const libgexf::t_id node_id)
 Delete node links. More...
 
void clear ()
 Clear the graph.
 
void clearEdges ()
 Delete all edges.
 
void readLock () throw (libgexf::ReadLockException)
 Set a lock on reading. More...
 
void readUnlock ()
 Unset a lock on reading.
 
void writeLock () throw (libgexf::WriteLockException)
 Get a lock on writing. More...
 
void writeUnlock ()
 Unset a lock on writing.
 
bool isReadLock ()
 Test if a read lock exists.
 
bool isWriteLock ()
 Test if a write lock exists.
 
bool isUnlock ()
 Unset all locks.
 

Additional Inherited Members

- Protected Attributes inherited from libgexf::Graph
std::set< t_id_nodes
 
std::map< t_id, std::map< t_id, t_id > > _edges
 
std::map< t_id, std::set< t_id > > _reverse_edges
 
std::set< t_id_bloom_edges
 
std::map< t_id, std::map< t_edge_property, t_edge_value > > _edges_properties
 
unsigned short int _rlock_count
 
char _lock_flag
 Flag used for determining the lock type: More...
 

Detailed Description

Interpretation of the topology structure as a directed graph.

Member Function Documentation

◆ getInDegree()

unsigned int libgexf::DirectedGraph::getInDegree ( const libgexf::t_id  node_id) const

Get indegree value.

Parameters
node_id: node ID
Returns
indegree value

◆ getInEdges()

std::vector< t_id > libgexf::DirectedGraph::getInEdges ( const libgexf::t_id  node_id) const

Get incoming edges from a node.

Parameters
node_id: node ID
Returns
Vector of IDs of incoming edges

◆ getOutDegree()

unsigned int libgexf::DirectedGraph::getOutDegree ( const libgexf::t_id  node_id) const

Get outdegree value.

Parameters
node_id: node ID
Returns
outdegree value

◆ getOutEdges()

std::vector< t_id > libgexf::DirectedGraph::getOutEdges ( const libgexf::t_id  node_id) const

Get outgoing edges from a node.

Parameters
node_id: node ID
Returns
Vector of IDs of outgoing edges

◆ getPredecessors()

std::vector< t_id > libgexf::DirectedGraph::getPredecessors ( const libgexf::t_id  node_id) const

Get node predecessors.

Parameters
node_id: node ID
Returns
Vector of node IDs

◆ getSuccessors()

std::vector< t_id > libgexf::DirectedGraph::getSuccessors ( const libgexf::t_id  node_id) const

Get node successors.

Parameters
node_id: node ID
Returns
Vector of node IDs

◆ isPredecessor()

bool libgexf::DirectedGraph::isPredecessor ( const libgexf::t_id  node_id,
const libgexf::t_id  predecessor_id 
) const

Test a possible predecessor.

Check if the predecessor_id is a predecessor of the node node_id.

Parameters
node_id: node ID
predecessor_id: node ID of the tested predecessor
Returns
true if predecessor_id is a predecessor of node_id

◆ isSuccessor()

bool libgexf::DirectedGraph::isSuccessor ( const libgexf::t_id  node_id,
const libgexf::t_id  successor_id 
) const

Test a possible successor.

Check if the successor_id is a successor of the node node_id.

Parameters
node_id: node ID
successor_id: node ID of the tested successor
Returns
true if successor_id is a successor of node_id

◆ removeInEdges()

void libgexf::DirectedGraph::removeInEdges ( const libgexf::t_id  target_id)

Remove incoming edges from a node.

Parameters
target_id: node ID

◆ removeOutEdges()

void libgexf::DirectedGraph::removeOutEdges ( const libgexf::t_id  source_id)

Remove outgoing edges from a node.

Parameters
source_id: node ID

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