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

Nested dissection ordering. More...

#include <nested_dissection.hpp>

Public Member Functions

 nested_dissection ()=default
 nested_dissection (std::size_t cutoff_, double balance_=0.7, nd_separator method_=nd_separator::multilevel)
 nested_dissection (nd_separator method_)
template<typename Value, typename Parameters>
std::vector< std::size_t > operator() (const mat::compressed2D< Value, Parameters > &A) const

Public Attributes

std::size_t cutoff = 64
double balance = 0.7
nd_separator method = nd_separator::multilevel

Detailed Description

Nested dissection ordering.

Callable object: given a square sparse matrix, returns a permutation p (p[new] = old) that reduces fill in a Cholesky or LDL^T factorization, and in LU when the pivots stay near the diagonal. It works on the pattern of A + A^T, as amd does.

cutoff: subgraphs of at most this many vertices are ordered with AMD instead of being dissected further. Measured on 2-D grids, 16 to 256 change the fill by under 3%; 64 is the default.

balance: a separator is acceptable when the larger of the two parts holds at most this fraction of their vertices; among acceptable separators the smallest is taken. On 2-D grids 0.7 gave the least fill of 0.5-0.9 for level structures, and of 0.65-0.8 for multilevel separators.

method: nd_separator::multilevel (the default) or nd_separator::level_structure. Multilevel gives less fill on every graph measured, and much less on irregular ones. It costs 10-40x AMD's ordering time (0.45 s on a 256 x 256 grid), against 3-4x for level structures.

Constructor & Destructor Documentation

◆ nested_dissection() [1/3]

mtl::sparse::ordering::nested_dissection::nested_dissection ( )
default

◆ nested_dissection() [2/3]

mtl::sparse::ordering::nested_dissection::nested_dissection ( std::size_t cutoff_,
double balance_ = 0.7,
nd_separator method_ = nd_separator::multilevel )
inlineexplicit

◆ nested_dissection() [3/3]

mtl::sparse::ordering::nested_dissection::nested_dissection ( nd_separator method_)
inlineexplicit

Member Function Documentation

◆ operator()()

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

Member Data Documentation

◆ balance

double mtl::sparse::ordering::nested_dissection::balance = 0.7

◆ cutoff

std::size_t mtl::sparse::ordering::nested_dissection::cutoff = 64

◆ method

nd_separator mtl::sparse::ordering::nested_dissection::method = nd_separator::multilevel

The documentation for this struct was generated from the following file: