MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
column_etree.hpp File Reference
#include <algorithm>
#include <cstddef>
#include <limits>
#include <stdexcept>
#include <vector>
#include <mtl/mat/compressed2D.hpp>
#include <mtl/sparse/util/csc.hpp>
#include <mtl/sparse/util/permutation.hpp>
#include <mtl/sparse/analysis/elimination_tree.hpp>
#include <mtl/sparse/analysis/postorder.hpp>
#include <mtl/sparse/analysis/supernodes.hpp>

Classes

struct  mtl::sparse::analysis::lu_symbolic_analysis
 Result of unsymmetric (column-etree) symbolic analysis. More...

Namespaces

namespace  mtl
namespace  mtl::sparse
namespace  mtl::sparse::analysis
namespace  mtl::sparse::analysis::detail

Functions

template<typename Value, typename SizeType>
std::vector< std::size_t > mtl::sparse::analysis::column_elimination_tree (const util::csc_matrix< Value, SizeType > &A)
 Column elimination tree of A: the elimination tree of A^T A, computed without forming the product (CSparse cs_etree with ata=1).
template<typename Value, typename Parameters>
std::vector< std::size_t > mtl::sparse::analysis::column_elimination_tree (const mat::compressed2D< Value, Parameters > &A)
 CSR overload: convert to CSC and compute the column elimination tree.
std::size_t mtl::sparse::analysis::detail::etree_leaf (std::size_t i, std::size_t j, const std::vector< std::size_t > &first, std::vector< std::size_t > &maxfirst, std::vector< std::size_t > &prevleaf, std::vector< std::size_t > &ancestor, int &jleaf)
 CSparse cs_leaf: is column j a leaf of the i-th row subtree of the column etree, and if so where?
template<typename Value, typename SizeType>
std::vector< std::size_t > mtl::sparse::analysis::column_counts_ata (const util::csc_matrix< Value, SizeType > &A, const std::vector< std::size_t > &parent, const std::vector< std::size_t > &post)
 Column counts of the Cholesky factor of A^T A given the column elimination tree parent and its postorder post, computed without forming A^T A (CSparse cs_counts with ata=1).
void mtl::sparse::analysis::column_supernodes (const std::vector< std::size_t > &parent, const std::vector< std::size_t > &col_counts, std::size_t n, std::size_t &nsuper, std::vector< std::size_t > &super, std::vector< std::size_t > &sn_first)
 Detect column-etree supernodes: maximal runs of consecutive columns where each column is the only child of the next in the column etree and the counts nest (col_counts[j] == col_counts[j+1] + 1) – the unsymmetric analogue of the fundamental supernodes from #178.
template<typename Value, typename Parameters>
lu_symbolic_analysis mtl::sparse::analysis::analyze_unsymmetric (const mat::compressed2D< Value, Parameters > &A)
 Full unsymmetric symbolic analysis on a square matrix already in the desired column order (apply a fill-reducing column ordering, e.g.