MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
minimum_degree.hpp File Reference
#include <cmath>
#include <cstddef>
#include <type_traits>
#include <vector>
#include <mtl/mat/compressed2D.hpp>

Namespaces

namespace  mtl
namespace  mtl::sparse
namespace  mtl::sparse::ordering
namespace  mtl::sparse::ordering::detail

Typedefs

using mtl::sparse::ordering::detail::idx = std::ptrdiff_t

Functions

constexpr idx mtl::sparse::ordering::detail::cs_flip (idx i)
constexpr idx mtl::sparse::ordering::detail::cs_unflip (idx i)
idx mtl::sparse::ordering::detail::mark_add (idx a, idx b)
idx mtl::sparse::ordering::detail::cs_wclear (idx mark, idx lemax, std::vector< idx > &w, std::size_t n)
idx mtl::sparse::ordering::detail::tdfs (idx j, idx k, std::vector< idx > &head, std::vector< idx > &next, std::vector< idx > &post, std::vector< idx > &stack)
std::vector< std::size_t > mtl::sparse::ordering::detail::minimum_degree_core (std::size_t n, const std::vector< idx > &Cp_in, const std::vector< idx > &Ci_in, idx dense)
 Minimum-degree ordering on a prebuilt symmetric pattern C (no diagonal), given as integer CSC arrays: Cp_in (size n+1) and Ci_in (size Cp_in[n]).
idx mtl::sparse::ordering::detail::dense_threshold (std::size_t n)
template<typename Value, typename Parameters>
void mtl::sparse::ordering::detail::build_aplusat_pattern (const mat::compressed2D< Value, Parameters > &A, std::vector< idx > &Cp, std::vector< idx > &Ci)
 Build the symmetric pattern of A + A^T (no diagonal) as CSC integer arrays.
template<typename Value, typename Parameters>
void mtl::sparse::ordering::detail::build_ata_pattern (const mat::compressed2D< Value, Parameters > &A, std::vector< idx > &Cp, std::vector< idx > &Ci)
 Build the column-intersection pattern (A^T*A, no diagonal) over the columns of A, dropping dense rows of A.
template<typename Value, typename Parameters>
std::vector< std::size_t > mtl::sparse::ordering::detail::minimum_degree (int order, const mat::compressed2D< Value, Parameters > &A)
 order == 1 : AMD (A + A^T). order == 2 : COLAMD (A^T A, drop dense rows).