Arc orientations


Functions

virtual char abstractMixedGraph::Orientation (TArc a) const throw (ERRange)
char abstractMixedGraph::Orientation () const throw ()
virtual bool abstractMixedGraph::COrientation () const throw ()
TArc abstractMixedGraph::Reverse (TArc a) const throw (ERRange)
virtual bool abstractMixedGraph::Blocking (TArc a) const throw (ERRange)
virtual TFloat abstractMixedGraph::RedLength (const TFloat *pi, TArc a) const throw (ERRange)

Function Documentation

bool Blocking TArc  a  )  const throw (ERRange) [virtual, inherited]
 

Sort out backward arcs.

Parameters:
a The index of the considered arc ranged [0,1,..,2m-1]
Return values:
true The arc is the reverse of a directed arc

Reimplemented in layeredAuxNetwork, balancedToBalanced, bigraphToDigraph, digraphToDigraph, graphToBalanced, and surfaceGraph.

bool COrientation  )  const throw () [virtual, inherited]
 

Check if the arc orientations are all the same.

Return values:
true Either all arcs are directed or undirected

char Orientation  )  const throw () [inherited]
 

Check if the graph has directed arcs.

Return values:
0 All arcs are undirected
1 Some arcs are directed

char Orientation TArc  a  )  const throw (ERRange) [virtual, inherited]
 

Retrieve an arc orientation.

Parameters:
a An arc index ranged [0,1,..,2m-1]
Return values:
0 This edge is undirected
1 This edge is directed

TFloat RedLength const TFloat pi,
TArc  a
const throw (ERRange) [virtual, inherited]
 

Retrieve a reduced arc length.

Parameters:
pi A pointer to an array of node potentials
a An arc index ranged [0,1,..,2m-1]
Returns:
The reduced length of arc a
This used by several optimization codes to derive benefit from dual solutions (the node potentials) which have been computed in advance.

For undirected edges: RedLength(u,v) = RedLength(v,u) = Length(u,v) + pi[u] + pi[v]

For directed arcs: RedLength(u,v) = -RedLength(v,u) = Length(u,v) + pi[u] - pi[v]

Reimplemented in surfaceGraph.

TArc Reverse TArc  a  )  const throw (ERRange) [inherited]
 

Retrieve a reverse arc index.

Parameters:
a An arc index ranged [0,1,..,2m-1]
Returns:
The reverse arc a^1