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::colamd Struct Reference

Column Approximate Minimum Degree ordering. More...

#include <colamd.hpp>

Public Member Functions

template<typename Value, typename Parameters>
std::vector< std::size_t > operator() (const mat::compressed2D< Value, Parameters > &A) const
 Compute the COLAMD ordering for a sparse matrix.

Detailed Description

Column Approximate Minimum Degree ordering.

Callable object: given a (possibly rectangular) sparse matrix, returns a column permutation that reduces fill-in during LU or QR factorization.

Member Function Documentation

◆ operator()()

template<typename Value, typename Parameters>
std::vector< std::size_t > mtl::sparse::ordering::colamd::operator() ( const mat::compressed2D< Value, Parameters > & A) const
inline

Compute the COLAMD ordering for a sparse matrix.

Returns permutation p where p[new] = old (column indices).

Runs the near-linear quotient-graph minimum-degree algorithm (CSparse cs_amd, order 2) on the column-intersection graph A^T*A, dropping dense rows. Works for rectangular and unsymmetric matrices.


The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/sparse/ordering/colamd.hpp