|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
34 #define OGDF_MINCUTNI_MAXLISTSIZE 100
35 #define OGDF_MINCUTNI_PRTHR 100
36 #define OGDF_MINCUTNI_CLUSTERSIZE 10
48 #include <unordered_set>
80 const int& minCutWeighted(
const Graph& G,
const std::vector<int>& capacity);
86 const int& minCutUnweighted(
const Graph& G);
89 virtual inline int call(
const Graph& G)
override {
return minCutUnweighted(G); }
94 for (
edge e : G.edges) {
95 edgeCapacity[m_GC.copy(e)->index()] = weights[e];
97 const int& value {minCutWeighted()};
103 int value()
const override {
return barLambda; };
126 nodesInList = nodesInList_init;
152 const int& minCutWeighted();
163 void contractClusters(
const std::vector<clusterstruct>& clusters);
172 void contract(
const node& s,
const ListPure<node>& toContract,
const int& clusterlevel,
173 const std::vector<clusterstruct>& clusters);
179 void PRPass1_2(
const node& lastContracted);
185 inline bool PRTest1(
const unsigned int& eIndex) {
return (edgeCapacity[eIndex] >= barLambda); };
193 inline bool PRTest2(
const unsigned int& eIndex,
const unsigned int& uIndex,
194 const unsigned int& vIndex) {
195 return 2 * edgeCapacity[eIndex] >= min(degree[uIndex], degree[vIndex]);
205 void updateClusters(
const node& head,
const node& currentNode,
206 std::vector<clusterstruct>& clusters,
int& level);
228 void fillL(
const int& maxAdj,
ListPure<node>& unviewed, BoundedList& L,
229 std::vector<adjInfo>& adjToViewed);
235 node getFirstNode(BoundedList& L);
245 opposite = e->opposite(s);
254 if (nodeDegree < barLambda && size >= 2) {
255 barLambda = nodeDegree;
265 unsigned int NIRounds = 0;
266 unsigned int prRounds = 0;
The namespace for all OGDF objects.
Declaration and implementation of ArrayBuffer class.
Includes declaration of graph class.
ArrayBuffer< node > m_partition
virtual int call(const Graph &G, const EdgeArray< int > &weights) override
Computes a minimum cut on graph G with non-negative weights on edges.
Functionality for temporarily hiding edges in constant time.
std::unordered_set< node > allNodes
Graph::HiddenEdgeSet * hiddenEdges
Serves as an interface for various methods to compute minimum cuts with or without edge weights.
static edge getAdjEdge(const adjEntry &adj, const node &s, node &opposite)
Returns edge corresponding to adj.
Copies of graphs supporting edge splitting.
Level
supported log-levels from lowest to highest importance
const unsigned int & getNIRounds() const
Output the number of Nagamochi-Ibaraki rounds (equals to MAO-Computations)
Class for adjacency list elements.
Contains logging functionality.
edge theEdge() const
Returns the edge associated with this adjacency entry.
bool PRTest2(const unsigned int &eIndex, const unsigned int &uIndex, const unsigned int &vIndex)
Test for rule 2 of Padberg-Rinaldi.
bool PRTest1(const unsigned int &eIndex)
Test for rule 1 of Padberg-Rinaldi.
Decralation of GraphElement and GraphList classes.
int value() const override
Output value of last minimum cut computation.
void updateLambda(const int nodeDegree)
Checks for new upper bound.
Declaration of graph copy classes.
Declaration of ogdf::MinimumCutModule.
Data type for general directed graphs (adjacency list representation).
const unsigned int & getPrRounds() const
Output the number of Padberg-Rinaldi rounds.
Calculate minimum cut value for a given Graph.
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
ListPure< node > clusterNodes
virtual const ArrayBuffer< node > & nodes() override
Returns a list of nodes belonging to one side of the bipartition.
virtual const ArrayBuffer< edge > & edges() override
Returns the edges defining the computed mincut.
Class for the representation of edges.
Declaration of doubly linked lists and iterators.
BoundedList(ListPure< node > l_init=ListPure< node >(), int nodesInList_init=0, int size_init=0)
std::vector< int > degree
Encapsulates a pointer to a list element.
Centralized global and local logging facility working on streams like std::cout.
ArrayBuffer< edge > m_cutEdges
std::vector< int > edgeCapacity
Class for the representation of nodes.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
virtual int call(const Graph &G) override
Computes a minimum cut on graph G.