MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::sparse::ordering Namespace Reference

Namespaces

namespace  detail

Classes

struct  amd
 Approximate Minimum Degree ordering. More...
struct  colamd
 Column Approximate Minimum Degree ordering. More...
struct  btf_result
 Result of a Block Triangular Form decomposition. More...
struct  nested_dissection
 Nested dissection ordering. More...
struct  rcm
 Reverse Cuthill-McKee ordering. More...

Enumerations

enum class  nd_separator { level_structure , multilevel }
 How nested_dissection finds its separators. More...

Functions

template<typename Value, typename Parameters>
std::vector< std::ptrdiff_t > maximum_matching (const mat::compressed2D< Value, Parameters > &A)
 Maximum-cardinality bipartite matching between rows and columns of A.
template<typename Value, typename Parameters>
btf_result block_triangular_form (const mat::compressed2D< Value, Parameters > &A)
 Compute the Block Triangular Form of a square sparse matrix.

Enumeration Type Documentation

◆ nd_separator

How nested_dissection finds its separators.

level_structure: one level of a breadth-first search from a pseudo-peripheral vertex (George's automatic ND). multilevel: coarsening by heavy-edge matching, an initial separator on the coarsest graph, and vertex-separator Fiduccia-Mattheyses refinement while uncoarsening (METIS-style); see multilevel_separator.hpp.

Enumerator
level_structure 
multilevel 

Function Documentation

◆ block_triangular_form()

template<typename Value, typename Parameters>
btf_result mtl::sparse::ordering::block_triangular_form ( const mat::compressed2D< Value, Parameters > & A)

Compute the Block Triangular Form of a square sparse matrix.

Returns row/column permutations and block boundaries such that A(row_perm, col_perm) is block upper triangular with a zero-free diagonal. If A is structurally singular, the result is flagged and the permutations are still valid (matched columns first, leftover columns filling the rest), but the block-triangular guarantee does not hold.

◆ maximum_matching()

template<typename Value, typename Parameters>
std::vector< std::ptrdiff_t > mtl::sparse::ordering::maximum_matching ( const mat::compressed2D< Value, Parameters > & A)

Maximum-cardinality bipartite matching between rows and columns of A.

Returns match_row where match_row[i] is the column matched to row i, or -1 if row i is unmatched. Uses Kuhn's augmenting-path algorithm with an explicit DFS stack (no recursion).