9 #ifndef CGRAPHPARTITIONER_H 10 #define CGRAPHPARTITIONER_H 35 template <
class GRAPH_MATRIX,
typename num_t =
typename GRAPH_MATRIX::Scalar>
57 std::vector<vector_uint> &out_parts,
58 num_t threshold_Ncut = 1,
59 bool forceSimetry =
true,
60 bool useSpectralBisection =
true,
61 bool recursive =
true,
62 unsigned minSizeClusters = 1,
63 const bool verbose =
false);
83 bool forceSimetry =
true );
101 num_t &out_cut_value,
102 bool forceSimetry =
true );
107 const GRAPH_MATRIX &in_A,
std::vector< uint32_t > vector_uint
static void RecursiveSpectralPartition(GRAPH_MATRIX &in_A, std::vector< vector_uint > &out_parts, num_t threshold_Ncut=1, bool forceSimetry=true, bool useSpectralBisection=true, bool recursive=true, unsigned minSizeClusters=1, const bool verbose=false)
Performs the spectral recursive partition into K-parts for a given graph.
This file implements miscelaneous matrix and matrix/vector operations, and internal functions in mrpt...
static void SpectralBisection(GRAPH_MATRIX &in_A, vector_uint &out_part1, vector_uint &out_part2, num_t &out_cut_value, bool forceSimetry=true)
Performs the spectral bisection of a graph.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static void exactBisection(GRAPH_MATRIX &in_A, vector_uint &out_part1, vector_uint &out_part2, num_t &out_cut_value, bool forceSimetry=true)
Performs an EXACT minimum n-Cut graph bisection, (Use CGraphPartitioner::SpectralBisection for a fast...
static num_t nCut(const GRAPH_MATRIX &in_A, const vector_uint &in_part1, const vector_uint &in_part2)
Returns the normaliced cut of a graph, given its adjacency matrix A and a bisection: ...
Algorithms for finding the min-normalized-cut of a weighted undirected graph.