ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches

The partitions of KaHIP (https://github.com/KaHIP/KaHIP) of a StaticGraph, beyond the book. More...

Files

file  ADS/interop/kahip/KaHIP.h
 The partitions of KaHIP (https://github.com/KaHIP/KaHIP) of a StaticGraph, beyond the book: partition( g , k , o ) calls kaffpa(), the multilevel partitioner of KaHIP, on the compressed rows of \( g \) and gives back a Partition [see interop/Csr.h], the part of each node and the weight of the edges cut, whose order() relabels the graph part by part through StaticGraph::relabel().

Classes

struct  ADS::kahip::Options
 the options of a partition by KaHIP More...

Typedefs

using ADS::kahip::Input = CsrInput< kahip_idx , kahip_idx >
 the arrays of a graph for KaHIP: in place where the layouts agree

Functions

template<class G>
Partition ADS::kahip::partition (const G &g, const Input &I, int k, const Options &o=Options())
 the partition of the nodes of \( g \) into \( k \) parts by kaffpa(), on the input \( I \) of \( g \) (whose arrays it reads in place, or the copies of CsrInput)
template<class G>
Partition ADS::kahip::partition (const G &g, int k, const Options &o=Options())
 the partition of the nodes of \( g \) into \( k \) parts by kaffpa(), on the rows of \( g \) read in place where the layouts agree

Detailed description

The partitions of KaHIP (https://github.com/KaHIP/KaHIP) of a StaticGraph, beyond the book.

Typedef documentation

◆ Input

using ADS::kahip::Input = CsrInput< kahip_idx , kahip_idx >

the arrays of a graph for KaHIP: in place where the layouts agree

Function documentation

◆ partition() [1/2]

template<class G>
Partition ADS::kahip::partition ( const G & g,
const Input & I,
int k,
const Options & o = Options() )
nodiscard

the partition of the nodes of \( g \) into \( k \) parts by kaffpa(), on the input \( I \) of \( g \) (whose arrays it reads in place, or the copies of CsrInput)

Precondition
\( g \) unoriented, without loops, \( 1 \le k \le n \)

◆ partition() [2/2]

template<class G>
Partition ADS::kahip::partition ( const G & g,
int k,
const Options & o = Options() )
nodiscard

the partition of the nodes of \( g \) into \( k \) parts by kaffpa(), on the rows of \( g \) read in place where the layouts agree

Precondition
\( g \) unoriented, without loops, \( 1 \le k \le n \)