Function sprs::linalg::ordering::cuthill_mckee_custom
source · pub fn cuthill_mckee_custom<N, I, Iptr, S, D>(
mat: CsMatViewI<'_, N, I, Iptr>,
starting_strategy: S,
directed_ordering: D
) -> Ordering<I>where
N: PartialEq,
I: SpIndex,
Iptr: SpIndex,
S: Strategy<N, I, Iptr>,
D: DirectedOrdering<I>,
Expand description
A customized Cuthill-McKee algorithm.
Runs a customized Cuthill-McKee algorithm on the given matrix, returning a permutation reducing its bandwidth.
The strategy employed to find starting vertices is critical for the quallity
of the reordering computed. This library implements several common
strategies, like PseudoPeripheral
and MinimumDegree
, but also allows
users to implement custom strategies if needed.
Arguments
-
mat
- The matrix to compute a permutation for. -
starting_strategy
- The strategy to use for choosing a starting vertex. -
directed_ordering
- The order of the computed ordering, should either beForward
orReverse
.