CAPD DynSys Library
5.2.0
|
It defines a graph that in each node can store additional data. More...
#include <capd/invset/Graph.h>
Public Types | |
typedef VertexT | VertexType |
typedef std::set< VertexT, lessT > | VertexSet |
typedef NodeDataT | NodeData |
typedef lessT | OrderType |
typedef GraphNode< VertexSet, NodeDataT > | Node |
typedef std::map< VertexType, Node, lessT > | Nodes |
typedef Nodes::iterator | iterator |
typedef Nodes::const_iterator | const_iterator |
Public Member Functions | |
Nodes & | nodes () |
const Node & | getNode (const VertexType &vertex) const |
void | setNode (const VertexType &vertex, const Node &node) |
void | insertNode (const VertexType &vertex) |
const NodeData & | getNodeData (const VertexType &vertex) const |
NodeData & | nodeData (const VertexType &vertex) |
void | setNodeData (const VertexType &vertex, const NodeData &nodeData) |
void | clearEdges () |
removes all edges for the graph More... | |
void | clearInEdges () |
removes all in-edges from the graph More... | |
void | insertInEdges () |
creates inverted graph More... | |
void | eraseNodeAndEdges (iterator &node) |
it removes node given by iterator and all edges pointing to it More... | |
void | erase (iterator &node) |
removes node given by iterator and all edges pointing to it More... | |
void | eraseAcyclicVertices () |
It iteratively erases acyclic vertices We assume that inverse graph is already created (e.g. by calling insertInEdges()) More... | |
void | eraseNoInVertices () |
It iteratively erase vertices that do not have any inward edges. More... | |
void | eraseNoOutVertices () |
It iteratively erase vertices that do not have any outward edges. More... | |
VertexSet | findFixedPoints () const |
returns set of vertices that have self-loop (edge that connects vertex to itself) More... | |
template<typename VertexContainer > | |
void | findCycles (VertexContainer result[], int maxlength) const |
finds cyclic vertices to a given maximal cycle length More... | |
int | findCycleLength (const_iterator vertex, int maxlength) const |
for given vertex returns the shortest cycle length starting at this vertex More... | |
It defines a graph that in each node can store additional data.
Graph is stored as association lists using standard map and set data types VertexT defines how to encode vertices lessT is a strict ordering of vertices needed by map and set containers NodeData type of data stored in each node
typedef Nodes::const_iterator capd::invset::Graph< VertexT, lessT, NodeDataT >::const_iterator |
typedef Nodes::iterator capd::invset::Graph< VertexT, lessT, NodeDataT >::iterator |
typedef GraphNode<VertexSet, NodeDataT> capd::invset::Graph< VertexT, lessT, NodeDataT >::Node |
typedef NodeDataT capd::invset::Graph< VertexT, lessT, NodeDataT >::NodeData |
typedef std::map<VertexType, Node, lessT> capd::invset::Graph< VertexT, lessT, NodeDataT >::Nodes |
typedef lessT capd::invset::Graph< VertexT, lessT, NodeDataT >::OrderType |
typedef std::set<VertexT, lessT> capd::invset::Graph< VertexT, lessT, NodeDataT >::VertexSet |
typedef VertexT capd::invset::Graph< VertexT, lessT, NodeDataT >::VertexType |
|
inline |
removes all edges for the graph
|
inline |
removes all in-edges from the graph
|
inline |
removes node given by iterator and all edges pointing to it
|
inline |
It iteratively erases acyclic vertices We assume that inverse graph is already created (e.g. by calling insertInEdges())
|
inline |
it removes node given by iterator and all edges pointing to it
|
inline |
It iteratively erase vertices that do not have any inward edges.
|
inline |
It iteratively erase vertices that do not have any outward edges.
|
inline |
for given vertex returns the shortest cycle length starting at this vertex
(for self-loop length = 0, for a-b-a length=1 etc.) returns -1 if it does not find cycle with length less or equal to maxlength.
|
inline |
finds cyclic vertices to a given maximal cycle length
in result[n] it returns vertices that belongs to some cycle of length n + 1 if vertex belongs to more than one cycle than the shortest cycle is concerned
|
inline |
returns set of vertices that have self-loop (edge that connects vertex to itself)
|
inline |
|
inline |
|
inline |
creates inverted graph
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |