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

Classes

struct  mtl::sparse::ordering::detail::nd_rng
 splitmix64 (Steele, Lea & Flood 2014): fixed output for a fixed seed on every platform, unlike the std:: distributions. More...
struct  mtl::sparse::ordering::detail::nd_graph
 A weighted undirected graph in CSR form, without self-loops; each edge is stored in both directions. More...
struct  mtl::sparse::ordering::detail::nd_weights
 Part weights of a labelling. More...

Namespaces

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

Functions

nd_graph mtl::sparse::ordering::detail::nd_coarsen (const nd_graph &g, std::vector< idx > &cmap, nd_rng &rng, idx maxvwgt)
 One level of heavy-edge matching.
nd_weights mtl::sparse::ordering::detail::nd_part_weights (const nd_graph &g, const std::vector< signed char > &where)
void mtl::sparse::ordering::detail::nd_refine (const nd_graph &g, std::vector< signed char > &where, double balance, int max_passes=10)
 Vertex-separator Fiduccia-Mattheyses refinement of where, in place.
std::vector< signed char > mtl::sparse::ordering::detail::nd_initial_separator (const nd_graph &g, double balance, nd_rng &rng, int trials=4)
 Initial separator on a (small) graph: for each of trials seeds, grow breadth-first regions of 1 - balance up to half the weight, take each region's boundary as a separator and refine it; keep the best.
void mtl::sparse::ordering::detail::nd_thin_separator (const nd_graph &g, std::vector< signed char > &where)
 Move separator vertices that touch only one side to that side.
std::vector< signed char > mtl::sparse::ordering::detail::multilevel_separator (const nd_graph &g, double balance, std::uint64_t seed, bool thin=true)
 Multilevel vertex separator of a connected graph.

Variables

constexpr signed char mtl::sparse::ordering::detail::nd_part_a = 0
 Part labels.
constexpr signed char mtl::sparse::ordering::detail::nd_part_b = 1
constexpr signed char mtl::sparse::ordering::detail::nd_part_s = 2