pub struct MatchOrderResult {
pub ordering: Perm<usize>,
pub scaling: Vec<f64>,
pub matched: usize,
pub condensed_dim: usize,
pub singletons: usize,
pub two_cycles: usize,
}Expand description
Result of the combined matching-ordering pipeline.
Contains both the fill-reducing ordering (for symbolic analysis) and the MC64 scaling factors (for numeric factorization), plus diagnostics about the condensation process.
§Usage
use rivrs_sparse::ordering::match_order_metis;
use faer::sparse::{SparseColMat, Triplet};
let triplets = vec![
Triplet::new(0, 0, 4.0),
Triplet::new(0, 1, 1.0),
Triplet::new(1, 0, 1.0),
Triplet::new(1, 1, 3.0),
];
let matrix = SparseColMat::try_new_from_triplets(2, 2, &triplets).unwrap();
let result = match_order_metis(&matrix).unwrap();
assert_eq!(result.scaling.len(), 2);
// Use ordering for symbolic analysis:
// SymmetricOrdering::Custom(result.ordering.as_ref())Fields§
§ordering: Perm<usize>Fill-reducing permutation with matched pair adjacency guarantee.
Use with SymmetricOrdering::Custom(result.ordering.as_ref()).
scaling: Vec<f64>MC64 symmetric scaling factors (linear domain).
Apply as A_scaled[i,j] = scaling[i] * A[i,j] * scaling[j].
matched: usizeNumber of matched entries from MC64. Equals n for structurally nonsingular matrices.
condensed_dim: usizeDimension of the condensed graph passed to METIS. Strictly less than n when 2-cycles exist.
singletons: usizeNumber of singleton nodes (self-matched).
two_cycles: usizeNumber of 2-cycle pairs in the decomposed matching.
Auto Trait Implementations§
impl Freeze for MatchOrderResult
impl RefUnwindSafe for MatchOrderResult
impl Send for MatchOrderResult
impl Sync for MatchOrderResult
impl Unpin for MatchOrderResult
impl UnsafeUnpin for MatchOrderResult
impl UnwindSafe for MatchOrderResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more