9 #ifndef CGRAPHPARTITIONER_H 10 #define CGRAPHPARTITIONER_H 41 template <
class GRAPH_MATRIX,
typename num_t =
typename GRAPH_MATRIX::Scalar>
77 GRAPH_MATRIX& in_A, std::vector<vector_uint>& out_parts,
78 num_t threshold_Ncut = 1,
bool forceSimetry =
true,
79 bool useSpectralBisection =
true,
bool recursive =
true,
80 unsigned minSizeClusters = 1,
const bool verbose =
false);
108 num_t& out_cut_value,
bool forceSimetry =
true);
136 num_t& out_cut_value,
bool forceSimetry =
true);
142 const GRAPH_MATRIX& in_A,
const vector_uint& in_part1,
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.