Distance labels


Functions

TFloatabstractMixedGraph::InitDistanceLabels (TFloat def=InfFloat) throw ()
TFloatabstractMixedGraph::GetDistanceLabels () const throw ()
TFloatabstractMixedGraph::RawDistanceLabels () throw ()
virtual TFloat abstractMixedGraph::Dist (TNode v) const throw (ERRange)
void abstractMixedGraph::SetDist (TNode v, TFloat thisDist) throw (ERRange)
void abstractMixedGraph::ReleaseLabels () throw ()

Function Documentation

TFloat Dist TNode  v  )  const throw (ERRange) [virtual, inherited]
 

Retrieve the distance label of a given node.

Parameters:
v A node index in the range [0,1..,n-1]
Returns:
The distance label of node v
This operation is little efficient if it is called for several nodes due to the attribute lookup operations which occur.

TFloat * GetDistanceLabels  )  const throw () [inherited]
 

Get access to the distance labels.

Returns:
A pointer to the array of distance labels or NULL
Other than InitDistanceLabels() and RawDistanceLabels(), this operation does not allocate distance labels if those do not exist.

TFloat * InitDistanceLabels TFloat  def = InfFloat  )  throw () [inherited]
 

Initialize the distance labels.

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

TFloat * RawDistanceLabels  )  throw () [inherited]
 

Ensure existence of the distance labels.

Returns:
A pointer to the array of distance labels
If not already present, the distance label register is allocated. Other than InitDistanceLabels(), this does not initialize the array element values.

void ReleaseLabels  )  throw () [inherited]
 

Release the distance labels from memory.

This implicitly sets all distance labels to InfFloat.

void SetDist TNode  v,
TFloat  thisDist
throw (ERRange) [inherited]
 

Assign a distance label to a given node.

Parameters:
v A node index in the range [0,1..,n-1]
thisDist The desired distance value for v
If not already present and if thisDist != InfFloat, the distance label register is allocated. In any case, InfFloat is assigned as the distance label of v.

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