Node potentials


Functions

TFloatabstractMixedGraph::InitPotentials (TFloat def=0) throw ()
TFloatabstractMixedGraph::GetPotentials () const throw ()
TFloatabstractMixedGraph::RawPotentials () throw ()
TFloat abstractMixedGraph::Pi (TNode v) const throw (ERRange)
void abstractMixedGraph::SetPotential (TNode v, TFloat thisPi) throw (ERRange)
void abstractMixedGraph::PushPotential (TNode v, TFloat epsilon) throw (ERRange)
void abstractMixedGraph::UpdatePotentials (TFloat cutValue) throw (ERRejected)
void abstractMixedGraph::ReleasePotentials () throw ()

Function Documentation

TFloat * GetPotentials  )  const throw () [inherited]
 

Get access to the node potentials.

Returns:
A pointer to the array of node potentials or NULL
Other than InitPotentials() and RawPotentials(), this operation does not allocate node potentials if those do not exist.

TFloat * InitPotentials TFloat  def = 0  )  throw () [inherited]
 

Initialize the node potentials.

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

TFloat Pi TNode  v  )  const throw (ERRange) [inherited]
 

Retrieve the potential of a given node.

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

void PushPotential TNode  v,
TFloat  epsilon
throw (ERRange) [inherited]
 

Change the potential of a given node by a given amount.

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

TFloat * RawPotentials  )  throw () [inherited]
 

Ensure existence of the node potentials.

Returns:
A pointer to the array of node potentials
If not already present, the node potential register is allocated. Other than InitNodePotentials(), this does not initialize the array element values.

void ReleasePotentials  )  throw () [inherited]
 

Release the node potentials from memory.

This implicitly sets all node potentials to zero.

void SetPotential TNode  v,
TFloat  thisPi
throw (ERRange) [inherited]
 

Assign a potential to a given node.

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

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

void UpdatePotentials TFloat  cutValue  )  throw (ERRejected) [inherited]
 

Adjust the node potentials with the result of a shortest path solver.

Parameters:
cutValue The maximum distance value
This increases each node potential by the distance label, provided that the distance label is less than the cutValue. This procedure is used to determine optimal node potentials for a given optimal flow.