Manipulating the graph skeleton


Functions

TArc abstractMixedGraph::InsertArc (TNode u, TNode v) throw (ERRange,ERRejected)
TArc abstractMixedGraph::InsertArc (TNode u, TNode v, TCap cc, TFloat ll, TCap bb=0) throw (ERRange,ERRejected)
TNode abstractMixedGraph::InsertNode () throw (ERRange,ERRejected)
void abstractMixedGraph::DeleteNode (TNode v) throw (ERRange,ERRejected)
TArc sparseRepresentation::InsertArc (TNode v, TNode w, TCap _u, TFloat _c, TCap _l) throw (ERRange,ERRejected)
TNode sparseRepresentation::InsertNode () throw (ERRejected)
void sparseRepresentation::ExplicitParallels () throw ()
void sparseRepresentation::SwapArcs (TArc a1, TArc a2) throw (ERRange)
void sparseRepresentation::SwapNodes (TNode u, TNode v) throw (ERRange)
void sparseRepresentation::FlipArc (TArc a) throw (ERRange)
void sparseRepresentation::CancelArc (TArc a) throw (ERRange,ERRejected)
void sparseRepresentation::CancelNode (TNode v) throw (ERRange)
bool sparseRepresentation::ReleaseEdgeControlPoints (TArc a) throw (ERRange)
bool sparseRepresentation::ReleaseDoubleEdgeControlPoints () throw ()
bool sparseRepresentation::ReleaseCoveredEdgeControlPoints (TPortMode portMode) throw ()
bool sparseRepresentation::ReleaseNodeControlPoints (TNode v) throw (ERRange)
void sparseRepresentation::DeleteArc (TArc a) throw (ERRange)
void sparseRepresentation::DeleteNode (TNode v) throw (ERRange)
void sparseRepresentation::DeleteArcs () throw ()
void sparseRepresentation::DeleteNodes () throw ()
void sparseRepresentation::ContractArc (TArc a) throw (ERRange,ERRejected)
void sparseRepresentation::IdentifyNodes (TNode u, TNode v) throw (ERRange,ERRejected)
void sparseRepresentation::ReorderNodeIndices (const TFloat *key) throw ()
void sparseRepresentation::ReorderEdgeIndices (const TFloat *key) throw ()

Function Documentation

void CancelArc TArc  a  )  throw (ERRange,ERRejected) [inherited]
 

Mark an arc for deletion.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
This deletes the arc from the incidence list of its end nodes irreversibly, but does not invalidate any arc indices. The operation must be followed by a DeleteArcs() call for reindexing. Canceled arcs have undefined start nodes which can be used to distinguish them from regular arcs.

Where necessary, the cancel operation also updates the node degrees, node adjacencies and other data structures held by the graph object.

void CancelNode TNode  v  )  throw (ERRange) [inherited]
 

Mark a graph node for deletion.

Parameters:
v A node index ranged [0,1,..,nAct-1]
This cancels all incident arcs and marks the node as hidden. The operation must be followed by a DeleteNodes() call for reindexing. Canceled arcs are not distinguished from other nodes without incidences.

void ContractArc TArc  a  )  throw (ERRange,ERRejected) [inherited]
 

Contract a specified arc to a single node.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
This merges the incidence lists of the end nodes of the arc a, attaches the resulting list to the start node and cancels the end node and the arc itself. Planarity is maintained by this operation.

void DeleteArc TArc  a  )  throw (ERRange) [inherited]
 

Instant deletion of a specified arc.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
This is equivalent with calling CancelArc(a) followed by DeleteArcs() up to other cancelled arcs which are not deleted here. This operation invalidates all indices of other arcs!

void DeleteArcs  )  throw () [inherited]
 

Finalize the deletion of canceled arcs.

This causes a reindexing of all arcs by which the canceled arcs are omitted.

void DeleteNode TNode  v  )  throw (ERRange) [inherited]
 

Delete a specified graph node and reindex some other node.

Parameters:
v A node index ranged [0,1,..,nAct-1]
This is equivalent with calling CancelNode(v) followed by DeleteNodes() up to other zero degree nodes which are not deleted. Note that all cancelled arcs are deleted, not just those which are incident with v.

void DeleteNode TNode  v  )  throw (ERRange,ERRejected) [inherited]
 

Instant deletion of a node.

Parameters:
v A graph node index ranged [0,1,..,n-1]
For sparsely represented graphs, this may corrupt the indices of other nodes and arcs!

void DeleteNodes  )  throw () [inherited]
 

Finalize the deletion of canceled nodes.

This causes a reindexing of all nodes by which the nodes without incidences are omitted.

void ExplicitParallels  )  throw () [inherited]
 

Replace all arcs with capacity > 1 by a bunch of arcs with the same cardinality.

This also distributes the lower capacities and the subgraph multiplicities among the mapped arcs. Subgraph node degrees and edge cut capacities are preserved.

void FlipArc TArc  a  )  throw (ERRange) [inherited]
 

Revert the implicit orientation of a specified arc.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
If control points exist, this operation also reverts the sequence of control points and by that, is not O(1).

void IdentifyNodes TNode  u,
TNode  v
throw (ERRange,ERRejected) [inherited]
 

Identify two graph nodes.

Parameters:
u A node index ranged [0,1,..,nAct-1]
v A node index ranged [0,1,..,nAct-1]
This merges the incidence lists of the nodes u and v, attaches the resulting list to node u and cancels the node v.

TArc InsertArc TNode  v,
TNode  w,
TCap  _u,
TFloat  _c,
TCap  _l
throw (ERRange,ERRejected) [inherited]
 

Add an arc with specified attribute values.

Parameters:
v A node index ranged [0,1,..,nAct-1]
w A node index ranged [0,1,..,nAct-1]
_u The desired upper capacity bound
_l The desired lower capacity bound
_c The desired arc length
Returns:
The index mAct-1 of the generated arc
This operation adds an arc connecting v and w, inserts it into to the incidence lists of v and w, and assigns the given attribute values. All attribute pools are updated.

TArc InsertArc TNode  u,
TNode  v,
TCap  cc,
TFloat  ll,
TCap  bb = 0
throw (ERRange,ERRejected) [inherited]
 

Insert an arc with given end nodes and given representational arc labels.

Parameters:
u The start node index ranged [0,1,..,n-1]
v The start node index ranged [0,1,..,n-1]
cc An upper capacity bound
ll A length label
bb A lower capacity bound
Returns:
The index of the new arc ranged [0,1,..,m-1]
In sparsely represented graphs, this procedure adds an arc connecting u and v and inserts it into to the incidence lists of these node, adjusts the dimensions of all attributes. and return the value of M() in advance.

In densely represented graphs, the procedure only increases the capacity of an existing arc and returns that arc's index.

TArc InsertArc TNode  u,
TNode  v
throw (ERRange,ERRejected) [inherited]
 

Insert an arc with given end nodes and with default or random attribute values.

Parameters:
u The start node index ranged [0,1,..,n-1]
v The start node index ranged [0,1,..,n-1]
Returns:
The index of the new arc ranged [0,1,..,m-1]
In sparsely represented graphs, this procedure adds an arc connecting u and v and inserts it into to the incidence lists of these node, adjusts the dimensions of all attributes. and return the value of M() in advance.

In densely represented graphs, the procedure only increases the capacity of an existing arc and returns that arc's index.

The new arc is assigned with default or random attribute values, depending on the context parameter randLength, randUCap and randLCap.

TNode InsertNode  )  throw (ERRejected) [inherited]
 

Add a graph node.

Returns:
The index nAct-1 of the generated graph node
This operation adds a graph node without any incident arcs. All attribute pools are updated. The indices of layout points are possibly invalidated!

TNode InsertNode  )  throw (ERRange,ERRejected) [inherited]
 

Insert a node.

Returns:
The index of the new arc: The value of N() in advance

bool ReleaseCoveredEdgeControlPoints TPortMode  portMode  )  throw () [inherited]
 

Eliminate all spanned layout nodes assigned with arcs.

Parameters:
portMode The mode for displaying arc ends
Return values:
true If some layout node has been deleted
This operation traverses all control points assigned with the arcs, checks for triples of consecutive control points which are collinear and occasionally deletes the second of these points. The check includes the end nodes of all edges. The indices of the remaining layout nodes are invalidated!

bool ReleaseDoubleEdgeControlPoints  )  throw () [inherited]
 

Eliminate all collocated control points assigned with edges.

This operation traverses all control points assigned with the edges, checks for pairs of consecutive control points with the same position in the drawing and occasionally deletes one of these control points. The check includes the end nodes of all edges. Note that the indices of the remaining layout nodes are invalidated!

Return values:
true If some control point has been deleted

bool ReleaseEdgeControlPoints TArc  a  )  throw (ERRange) [inherited]
 

Eliminate all control points assigned with a given edge.

Parameters:
a An arc index ranged [0,1,..,2*mAct-1]
Return values:
true If some layout node has been deleted
This operation deletes the arc label anchor point and all control points assigned with the arc a. The indices of the remaining layout nodes are invalidated!

bool ReleaseNodeControlPoints TNode  v  )  throw (ERRange) [inherited]
 

Eliminate all layout nodes assigned with a given node.

Parameters:
v A node index ranged [0,1,..,nAct-1]
This operation deletes all control points assigned with the node v. The indices of the remaining layout nodes are invalidated!

void ReorderEdgeIndices const TFloat key  )  throw () [inherited]
 

Assign a specified edge index order.

Parameters:
key An array of edge key values
Reorder the edge indices based on the values specified in key[]. Edges with smaller key values obtain smaller indices. For equal key values, the tie breaking is arbitrary. This operation invalidates all arc indices.

void ReorderNodeIndices const TFloat key  )  throw () [inherited]
 

Assign a specified node index order.

Parameters:
key An array of node key values
Reorder the node indices based on the values specified in key[]. Nodes with smaller key values obtain smaller indices. For equal key values, the tie breaking is arbitrary. This operation invalidates all node indices.

void SwapArcs TArc  a1,
TArc  a2
throw (ERRange) [inherited]
 

Swap the indices of two given arcs.

Parameters:
a1 An arc index ranged [0,1,..,2*mAct-1]
a2 An arc index ranged [0,1,..,2*mAct-1]
This swaps all attribute values and incidence features of the given arcs. If control points exist, this operation may revert the sequence of control points and by that, is not O(1). To avoid such overhead, it is recommended only to swap forward arcs.

void SwapNodes TNode  u,
TNode  v
throw (ERRange) [inherited]
 

Swap the indices of two given nodes.

Parameters:
u A node index ranged [0,1,..,nAct-1]
v A node index ranged [0,1,..,nAct-1]
This swaps all attribute values and incidence features of the given nodes. Because the two incidence lists are traversed, this operation is not O(1).