Graphs: |
directed |
Properties: |
out degree |
template <class AdjacencyGraph, class OutDegreeMap,
class InversePermutationMap,
class PermutationMap, class SuperNodeSizeMap, class VertexIndexMap>
void minimum_degree_ordering
(AdjacencyGraph& G,
OutDegreeMap outdegree,
InversePermutationMap inverse_perm,
PermutationMap perm,
SuperNodeSizeMap supernode_size, int delta, VertexIndexMap id)
The minimum degree ordering algorithm [21, 35] is a fill-in
reduction reordering algorithm. It chooses the vertex with minimum
degree in the graph at each step of simulating Gaussian elimination
process. This implementation provided a number of enhancements
including mass elimination, incomplete degree update, multiple
elimination, and external degree. See [35] for a historical
survey of the minimum degree algorithm.
The graph G corresponding to a symmetric matrix A
should be directed one instead of a undirected graph in this
implementation. Therefore, nonzero entry A(i, j) corresponds
two directed edges (e(i,j) and e(j,i)) in G.
The output of the algorithm are the vertices in the new ordering.
inverse_perm[new_index[u]] == old_index[u]
and the permutation from the old index to the new index.
perm[old_index[u]] == new_index[u]
The following equations are always held.
for (size_type i = 0; i != inverse_perm.size(); ++i)
perm[inverse_perm[i]] == i;
Parameters
- AdjacencyGraph& G (IN)
A directed graph. The graph's type must be a model of Adjacency Graph,
Vertex List Graph,
and Mutable Incidence Graph.
In addition, the functions num_vertices() and
out_degree() are required.
- OutDegreeMap outdegree  (WORK)
This is used internally to store the out degree of vertices. This
must be a
LvaluePropertyMap with key type the same as the vertex
descriptor type of the graph, and with a value type that is an
integer type.
- InversePermutationMap inverse_perm  (OUT)
The new vertex ordering, given as the mapping from the
new indices to the old indices (an inverse permutation).
This must be an
LvaluePropertyMap with a value type and key type a signed integer.
- PermutationMap perm  (OUT)
The new vertex ordering, given as the mapping from the
old indices to the new indices (a permutation).
This must be an
LvaluePropertyMap with a value type and key type a signed integer.
- SuperNodeSizeMap supernode_size  (WORK/OUT)
This is used internally to record the size of supernodes and is also
useful information to have. This is a
LvaluePropertyMap with an unsigned integer value type and key
type of vertex descriptor.
- int delta  (IN)
Multiple elimination control variable. If it is larger than or equal
to zero then multiple elimination is enabled. The value of
delta specifies the difference between the minimum degree
and the degree of vertices that are to be eliminated.
- VertexIndexMap id  (IN)
Used internally to map vertices to their indices. This must be a Readable
Property Map with key type the same as the vertex descriptor of
the graph and a value type that is some unsigned integer type.
Example
See example/minimum_degree_ordering.cpp.