class for graph cut algorithms on undirected graphs (a graph is represented by an adjacency matrix).
More...
|
static float | minCut (DynMatrix< float > &adjacencyMatrix, std::vector< int > &subset1, std::vector< int > &subset2) |
| Applies a single minimum cut on a connected undirected graph. More...
|
|
static std::vector< std::vector< int > > | thresholdCut (DynMatrix< float > &adjacencyMatrix, float threshold) |
| Applies minimum cut as long as a cut with costs smaller a given threshold exists and returns a list of subsets (for weighted graphs). More...
|
|
static std::vector< std::vector< int > > | thresholdCut (DynMatrix< bool > &adjacencyMatrix, float threshold) |
| Applies minimum cut as long as a cut with costs smaller a given threshold exists and returns a list of subsets (unweighted graphs will be weighted). More...
|
|
static std::vector< CutNode > | hierarchicalCut (DynMatrix< float > &adjacencyMatrix) |
| Applies hierarchical minimum cut and returns a list of nodes including subset, parent, children and weight representing a cut tree (for weighted graphs). More...
|
|
static std::vector< CutNode > | hierarchicalCut (DynMatrix< bool > &adjacencyMatrix) |
| Applies hierarchical minimum cut and returns a list of nodes including subset, parent, children and weight representing a cut tree (unweighted graphs will be weighted). More...
|
|
static math::DynMatrix< float > | calculateProbabilityMatrix (math::DynMatrix< bool > &initialMatrix, bool symmetry=true) |
| Creates a weighted matrix from an unweighted boolean matrix. More...
|
|
static std::vector< std::vector< int > > | findUnconnectedSubgraphs (DynMatrix< float > &adjacencyMatrix) |
| Find all unconnected subgraphs and return a list of the subsets. More...
|
|
static DynMatrix< float > | createSubMatrix (DynMatrix< float > &adjacencyMatrix, std::vector< int > &subgraph) |
| Creates a submatrix with a given subset. More...
|
|
static void | mergeMatrix (DynMatrix< bool > &dst, DynMatrix< bool > &src) |
| Merges the src matrix into the dst matrix (dst is the maximum of both matrices). More...
|
|
static void | weightMatrix (DynMatrix< float > &dst, DynMatrix< bool > &featureMatrix, float weight) |
| Weights the dst matrix (value*=weight) for all true cells in the featureMatrix. More...
|
|
|
static std::vector< float > | capforest (std::vector< utils::Point > &edgeList, std::vector< float > &edgeCosts, int subsetsSize) |
|
static float | initialLambda (DynMatrix< float > &adjacencyMatrix, int &lambda_id) |
|
static void | createEdgeList (DynMatrix< float > &adjacencyMatrix, std::vector< utils::Point > &edgeList, std::vector< float > &edgeCosts) |
|
static std::vector< std::vector< int > > | createInitialNodes (DynMatrix< float > &adjacencyMatrix) |
|
static float | merge (std::vector< utils::Point > &edgeList, std::vector< float > &edgeCosts, std::vector< float > &q, std::vector< std::vector< int > > &subsets, float lambda_score, int j, int &lambda_id) |
|
class for graph cut algorithms on undirected graphs (a graph is represented by an adjacency matrix).
The GraphCutter class implements the CONTRACT/CAP algorithm from H. Nagamochi, T. Ono, T. Ibaraki, "Implementing an efficient
minimum capacity cut algorithm", Mathematical Programming 67 (1994).