Edge colours


Functions

TArcabstractMixedGraph::InitEdgeColours (TArc def=NoArc) throw ()
TArcabstractMixedGraph::GetEdgeColours () const throw ()
TArcabstractMixedGraph::RawEdgeColours () throw ()
TArc abstractMixedGraph::EdgeColour (TArc a) const throw (ERRange)
void abstractMixedGraph::SetEdgeColour (TArc a, TArc thisColour) throw (ERRange)
void abstractMixedGraph::ReleaseEdgeColours () throw ()

Function Documentation

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

Retrieve a colour of a given edge.

Parameters:
a An arc index in the range [0,1..,2*m-1]
Returns:
A colour index ranged [0,1,..,m-1] or NoArc
This operation is little efficient if it is called for several edges due to the attribute lookup operations which occur.

TArc * GetEdgeColours  )  const throw () [inherited]
 

Get access to the edge colours.

Returns:
A pointer to the array of edge colours or NULL
Other than InitEdgeColours() and RawEdgeColours(), this operation does not allocate edge colours if those do not exist.

TArc * InitEdgeColours TArc  def = NoArc  )  throw () [inherited]
 

Initialize the edge colours.

Parameters:
def A default value
Returns:
A pointer to the array of edge colours
If not already present, the edge colour register is allocated. In any case, all edge colours are set to a default value.

TArc * RawEdgeColours  )  throw () [inherited]
 

Ensure existence of the edge colours.

Returns:
A pointer to the array of edge colours
If not already present, the edge colour register is allocated. Other than InitEdgeColours(), this does not initialize the array element values.

void ReleaseEdgeColours  )  throw () [inherited]
 

Release the edge colours from memory.

This implicitly sets all edge colours to NoArc.

void SetEdgeColour TArc  a,
TArc  thisColour
throw (ERRange) [inherited]
 

Assign a colour to a given edge.

Parameters:
a An arc index in the range [0,1..,2*m-1]
thisColour An arc index ranged [0,1,..,m-1] or NoArc
If not already present and if thisColour != NoArc, the edge colour register is allocated. In any case, thisColour is assigned as the colour of a. Note that the colours of reverse arcs a and (a^1) are the same.

This operation is little efficient if it is called for several nodes due to the attribute lookup operations which occur.