Go to the documentation of this file. 1 #ifndef GRAPH_ANALYSIS_ALGORITHMS_CORRELATION_CLUSTERING_HPP
2 #define GRAPH_ANALYSIS_ALGORITHMS_CORRELATION_CLUSTERING_HPP
6 #include <numeric/Combinatorics.hpp>
7 #include <base-logging/Logging.hpp>
8 #include "../EdgeIterator.hpp"
9 #include "../Graph.hpp"
10 #include "../SharedPtr.hpp"
14 namespace algorithms {
55 std::map<Edge::Ptr, double> mEdgeActivation;
56 std::vector<Edge::Ptr> mColumnToEdge;
59 size_t mTotalNumberOfColumns;
61 double mInitialVolume;
73 bool areFormingTriangle(
const std::vector<size_t>& triangleIndices)
const;
78 static std::string
toString(
const std::map<Edge::Ptr, double>& solution);
113 #endif // GRAPH_ANALYSIS_ALGORITHMS_CORRELATION_CLUSTERING_HPP
double cut(Ball ball)
Definition: CorrelationClustering.cpp:184
function1< double, Edge::Ptr > EdgeWeightFunction
Definition: CorrelationClustering.hpp:16
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
shared_ptr< BaseGraph > Ptr
Definition: BaseGraph.hpp:34
CorrelationClustering(BaseGraph::Ptr graph, EdgeWeightFunction weightfunction)
Definition: CorrelationClustering.cpp:442
BaseGraph::Ptr graph
Definition: CorrelationClustering.hpp:29
Ball()
Definition: CorrelationClustering.hpp:23
double radius
Definition: CorrelationClustering.hpp:30
void round()
Definition: CorrelationClustering.cpp:308
double volume(Ball ball)
Definition: CorrelationClustering.cpp:218
static std::string toString(const std::map< Edge::Ptr, double > &solution)
Definition: CorrelationClustering.cpp:461
double volume
Definition: CorrelationClustering.hpp:31
shared_ptr< Vertex > Ptr
Definition: Vertex.hpp:22
Implementation of "Correlation Clustering in General Weighted Graphs" (Demaine et al....
Definition: CorrelationClustering.hpp:50
A Ball representation for the CorrelationClustering.
Definition: CorrelationClustering.hpp:21
Ball createBall(Vertex::Ptr vertex, double radius)
Definition: CorrelationClustering.cpp:256
std::map< Edge::Ptr, double > getEdgeActivation() const
Definition: CorrelationClustering.hpp:87