Detailed Description
class gcg::GraphAlgorithms< T >
Definition at line 54 of file graphalgorithms.h.
#include <graphalgorithms.h>
Static Public Member Functions | |
| static SCIP_Real | computeSoed (Hypergraph< T > &graph) |
| static SCIP_Real | computeMincut (Hypergraph< T > &graph) |
| static SCIP_Real | computekMetric (Hypergraph< T > &graph) |
| static std::vector< int > | dbscan (Graph< GraphGCG > &graph, double eps, int minPts=4) |
| static std::vector< int > | mst (Graph< GraphGCG > &graph, double cutoff, int minPts=4) |
| static std::vector< int > | mcl (Graph< GraphGCG > &graph, int &stoppedAfter, double inflatefac, int maxiters=25, int expandfac=2) |
| static void | expandCluster (Graph< T > &graph, std::vector< bool > &visited, std::vector< bool > &is_core, std::vector< int > &labels, int point, std::vector< int > &NeighborPts, int curr_cluster, double eps, int minPts) |
| static bool | cutoffif (EdgeGCG &a) |
| static int | weightComp (const void *a, const void *b) |
| static int | mstfind (std::vector< subset > &subsets, int i) |
| static void | mstunion (std::vector< subset > &subsets, int x, int y) |
Static Public Attributes | |
| static double | cutoff |
Member Function Documentation
◆ computeSoed()
|
static |
compute weighted sum of external degrees
- Parameters
-
graph the hypergraph
Definition at line 60 of file graphalgorithms_def.h.
References gcg::Hypergraph< T >::getHyperedgeNodes(), gcg::Hypergraph< T >::getHyperedgeWeight(), gcg::Hypergraph< T >::getNHyperedges(), gcg::GraphInterface::getPartition(), and i.
◆ computeMincut()
|
static |
compute minimum hyperedge cut
- Parameters
-
graph the hypergraph
Definition at line 84 of file graphalgorithms_def.h.
References gcg::Hypergraph< T >::getHyperedgeNodes(), gcg::Hypergraph< T >::getHyperedgeWeight(), gcg::Hypergraph< T >::getNHyperedges(), gcg::GraphInterface::getPartition(), and i.
◆ computekMetric()
|
static |
compute k-1 metric
- Parameters
-
graph the hypergraph
Definition at line 110 of file graphalgorithms_def.h.
References gcg::Hypergraph< T >::getHyperedgeNodes(), gcg::Hypergraph< T >::getHyperedgeWeight(), gcg::Hypergraph< T >::getNHyperedges(), gcg::GraphInterface::getPartition(), and i.
◆ dbscan()
|
static |
run DBSCAN on the distance graph
- Parameters
-
graph the graph with weighted edges eps radius in which we search for the neighbors minPts minimum number of neighbors needed to define a core point (can be fixed to 4 as stated in the paper)
Definition at line 136 of file graphalgorithms_def.h.
References expandCluster(), gcg::Graph< T >::getNeighborWeights(), gcg::Graph< T >::getNNodes(), i, and j.
Referenced by gcg::RowGraphWeighted< T >::computePartitionDBSCAN(), and gcg::RowGraphWeighted< T >::computePartitionDBSCANForPartialGraph().
◆ mst()
|
static |
run MST on the distance graph
- Parameters
-
graph the graph with weighted edges cutoff threshold below which we cut the edges minPts minimum number of points needed in a cluster
Definition at line 261 of file graphalgorithms_def.h.
References assert(), cutoff, cutoffif(), gcg::EdgeGCG::dest, gcg::Graph< T >::getEdges(), gcg::Graph< T >::getNEdges(), gcg::Graph< T >::getNNodes(), i, j, mstfind(), mstunion(), nnodes, gcg::EdgeGCG::src, and weightComp().
Referenced by gcg::RowGraphWeighted< T >::computePartitionMST(), and gcg::RowGraphWeighted< T >::computePartitionMSTForPartialGraph().
◆ mcl()
|
static |
run MCL on the similarity graph
- Parameters
-
graph the graph with weighted edges stoppedAfter number of iterations after which the clustering terminated inflatefac inflate factor maxiters max number of iterations, set to 25 per default expandfac expand factor, should be always set to 2
Definition at line 435 of file graphalgorithms_def.h.
Referenced by gcg::RowGraphWeighted< T >::computePartitionMCL(), and gcg::RowGraphWeighted< T >::computePartitionMCLForPartialGraph().
◆ expandCluster()
|
static |
help function for DBSCAN
Definition at line 202 of file graphalgorithms_def.h.
References gcg::Graph< T >::getNeighborWeights(), i, and j.
Referenced by dbscan().
◆ cutoffif()
|
static |
◆ weightComp()
|
static |
Definition at line 388 of file graphalgorithms_def.h.
References gcg::EdgeGCG::weight.
Referenced by mst().
◆ mstfind()
|
static |
Definition at line 399 of file graphalgorithms_def.h.
Referenced by mst(), mstfind(), and mstunion().
◆ mstunion()
|
static |
Field Documentation
◆ cutoff
|
static |
Definition at line 115 of file graphalgorithms.h.
Referenced by cutoffif(), and mst().