This finds the shortcuts in a table of neighbors and replaces them with INVALID_INDEX.
More...
#include <GNeighborFinder.h>
|
| GCycleCut (size_t *pNeighborhoods, const GMatrix *pPoints, size_t k) |
| pNeighborMap is expected to be an array of size n*k, where n is the number pPoints->rows(), and k is the number of neighbors. More...
|
|
| ~GCycleCut () |
|
size_t | cut () |
| Do the cutting. Returns the number of edges that were removed. Any atomic cycles in the graph (where neighbors are treated as bi-directional) with a cycle-length of cycleThresh or bigger will be cut. It will make the smallest cut that removes all big atomic cycles. More...
|
|
void | onDetectBigAtomicCycle (std::vector< size_t > &cycle) |
| Internal method. More...
|
|
void | setCycleThreshold (size_t cycleThresh) |
| Sets the cycle-length threshold. (The default is 14.) More...
|
|
|
static void | test () |
| Performs unit tests for this class. Throws an exception if there is a failure. More...
|
|
This finds the shortcuts in a table of neighbors and replaces them with INVALID_INDEX.
GClasses::GCycleCut::GCycleCut |
( |
size_t * |
pNeighborhoods, |
|
|
const GMatrix * |
pPoints, |
|
|
size_t |
k |
|
) |
| |
pNeighborMap is expected to be an array of size n*k, where n is the number pPoints->rows(), and k is the number of neighbors.
GClasses::GCycleCut::~GCycleCut |
( |
| ) |
|
size_t GClasses::GCycleCut::cut |
( |
| ) |
|
Do the cutting. Returns the number of edges that were removed. Any atomic cycles in the graph (where neighbors are treated as bi-directional) with a cycle-length of cycleThresh or bigger will be cut. It will make the smallest cut that removes all big atomic cycles.
bool GClasses::GCycleCut::doAnyBigAtomicCyclesExist |
( |
| ) |
|
|
protected |
void GClasses::GCycleCut::onDetectBigAtomicCycle |
( |
std::vector< size_t > & |
cycle | ) |
|
void GClasses::GCycleCut::setCycleThreshold |
( |
size_t |
cycleThresh | ) |
|
|
inline |
Sets the cycle-length threshold. (The default is 14.)
static void GClasses::GCycleCut::test |
( |
| ) |
|
|
static |
Performs unit tests for this class. Throws an exception if there is a failure.
double GClasses::GCycleCut::m_aveDist |
|
protected |
std::map<std::pair<size_t, size_t>, double> GClasses::GCycleCut::m_capacities |
|
protected |
size_t GClasses::GCycleCut::m_cutCount |
|
protected |
std::vector<size_t> GClasses::GCycleCut::m_cuts |
|
protected |
size_t GClasses::GCycleCut::m_cycleThresh |
|
protected |
size_t GClasses::GCycleCut::m_k |
|
protected |
size_t* GClasses::GCycleCut::m_pNeighborhoods |
|
protected |
const GMatrix* GClasses::GCycleCut::m_pPoints |
|
protected |