Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
FixedEmbeddingInserterUML.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Array.h>
35#include <ogdf/basic/Graph.h>
36#include <ogdf/basic/basic.h>
38
39#include <cstdint>
40
41namespace ogdf {
42class PlanRepLight;
43enum class RemoveReinsertType;
44
47public:
50
53
56
58 virtual UMLEdgeInsertionModule* clone() const override;
59
62
69 void removeReinsert(RemoveReinsertType rrOption) { m_rrOption = rrOption; }
70
72 RemoveReinsertType removeReinsert() const { return m_rrOption; }
73
75
79 void percentMostCrossed(double percent) { m_percentMostCrossed = percent; }
80
82 double percentMostCrossed() const { return m_percentMostCrossed; }
83
85
90 void keepEmbedding(bool keep) { m_keepEmbedding = keep; }
91
93 bool keepEmbeding() const { return m_keepEmbedding; }
94
96
97private:
99 virtual ReturnType doCall(PlanRepLight& pr, const Array<edge>& origEdges,
100 const EdgeArray<int>* pCostOrig, const EdgeArray<uint32_t>* pEdgeSubgraph) override;
101
105};
106
107}
Declaration and implementation of Array class and Array algorithms.
Includes declaration of graph class.
Declaration of interface for edge insertion algorithms.
Basic declarations, included by all source files.
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
Edge insertion module that inserts each edge optimally into a fixed embedding.
double percentMostCrossed() const
Returns the current setting of option percentMostCrossed.
virtual UMLEdgeInsertionModule * clone() const override
Returns a new instance of the fixed embedding inserter with the same option settings.
void keepEmbedding(bool keep)
Sets the option keepEmbedding to keep.
RemoveReinsertType removeReinsert() const
Returns the current setting of the remove-reinsert postprocessing method.
void removeReinsert(RemoveReinsertType rrOption)
Sets the remove-reinsert postprocessing method.
FixedEmbeddingInserterUML & operator=(const FixedEmbeddingInserterUML &inserter)
Assignment operator. Copies option settings only.
virtual ReturnType doCall(PlanRepLight &pr, const Array< edge > &origEdges, const EdgeArray< int > *pCostOrig, const EdgeArray< uint32_t > *pEdgeSubgraph) override
Implements the algorithm call.
double m_percentMostCrossed
The portion of most crossed edges considered.
bool keepEmbeding() const
Returns the current setting of option keepEmbedding.
void percentMostCrossed(double percent)
Sets the option percentMostCrossed to percent.
FixedEmbeddingInserterUML()
Creates an instance of variable embedding edge inserter with default settings.
RemoveReinsertType m_rrOption
The remove-reinsert method.
FixedEmbeddingInserterUML(const FixedEmbeddingInserterUML &inserter)
Creates an instance of fixed embedding edge inserter with the same settings as inserter.
ReturnType
The return type of a module.
Definition Module.h:52
Light-weight version of a planarized representation, associated with a PlanRep.
Interface for UML edge insertion algorithms.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition Graph_d.h:717
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
RemoveReinsertType
The postprocessing method for edge insertion algorithms.
The namespace for all OGDF objects.