SparseSolverUtilities.GetReverseCuthillMcKeeOrdering<T> Method

Computes a deterministic reverse Cuthill–McKee ordering.

Definition

Namespace: Numerics.NET.LinearAlgebra.IterativeSolvers
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public static int[] GetReverseCuthillMcKeeOrdering<T>(
	SparseMatrix<T> matrix
)

Parameters

matrix  SparseMatrix<T>
A square sparse matrix.

Type Parameters

T
The matrix scalar type.

Return Value

Int32[]
An owned permutation whose element k is the original index at new index k.

Remarks

The graph uses the union of logical off-diagonal nonzeros in the matrix and its transpose. Each component starts at the lowest-degree unvisited vertex, breaking ties by original index. Breadth-first neighbors are ordered by degree and then index; the complete traversal is reversed. Isolated vertices are included. The source is not modified.

The result can be passed directly to the ordering argument of incomplete-factor preconditioners. This bandwidth/profile heuristic does not guarantee reduced bandwidth or fill.

Exceptions

ArgumentNullExceptionmatrix is null.
DimensionMismatchExceptionmatrix is not square.
NotSupportedExceptionThe matrix storage structure is unsupported.

See Also