|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
81 return doCall(pr, cc, pCostOrig, pForbiddenOrig, pEdgeSubGraphs, crossingNumber);
103 return call(pr, cc, crossingNumber, pCostOrig, pForbiddenOrig, pEdgeSubGraphs);
124 int& crossingNumber) = 0;
138 if (pCost ==
nullptr) {
141 int crossingNumber = 0;
147 if (pEdgeSubGraphs !=
nullptr) {
148 int subgraphCounter = 0;
149 for (
int i = 0; i < 32; i++) {
150 if (((*pEdgeSubGraphs)[e1] & (1 << i)) != 0
151 && ((*pEdgeSubGraphs)[e2] & (1 << i)) != 0) {
155 crossingNumber += (subgraphCounter * (*pCost)[e1] * (*pCost)[e2]);
157 crossingNumber += (*pCost)[e1] * (*pCost)[e2];
161 return crossingNumber;
The namespace for all OGDF objects.
Includes declaration of graph class.
Planarized representations (of a connected component) of a graph.
Base class for crossing minimization algorithms.
adjEntry lastAdj() const
Returns the last entry in the adjacency list.
bool isDummy(node v) const
Returns true iff v has no corresponding node in the original graph.
Copies of graphs supporting edge splitting.
Declares base class for modules with timeout functionality.
ReturnType operator()(PlanRep &pr, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Computes a planarized representation of the input graph.
edge theEdge() const
Returns the edge associated with this adjacency entry.
internal::GraphObjectContainer< NodeElement > nodes
The container containing all node objects.
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
int numberOfNodes() const
Returns the number of nodes in the graph.
Decralation of GraphElement and GraphList classes.
Declaration of graph copy classes.
static int computeCrossingNumber(GraphCopy &graphCopy, const EdgeArray< int > *pCost, const EdgeArray< uint32_t > *pEdgeSubGraphs)
Computes the (weighted) crossing number of the planarization graphCopy.
ReturnType call(PlanRep &pr, int cc, int &crossingNumber, const EdgeArray< int > *pCostOrig=nullptr, const EdgeArray< bool > *pForbiddenOrig=nullptr, const EdgeArray< uint32_t > *pEdgeSubGraphs=nullptr)
Computes a planarized representation of the input graph.
CrossingMinimizationModule()
Initializes a crossing minimization module (default constructor).
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
CrossingMinimizationModule(const CrossingMinimizationModule &cmm)
Initializes an crossing minimization module (copy constructor).
Class for the representation of edges.
virtual ~CrossingMinimizationModule()
Destructor.
class for timeout funtionality.
Declares base class for all module types.
ReturnType
The return type of a module.
Class for the representation of nodes.
Declaration of memory manager for allocating small pieces of memory.
const Graph & original() const
Returns a reference to the original graph.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.