|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
44 class GraphCopySimple;
66 template<
typename TWeight>
74 std::string& error)
override {
76 error =
"The graph must be undirected";
80 error =
"The stretch must be >= 1.0";
103 for (
edge e : edges) {
108 if (
m_eps.
greater(currentSpannerDistance, maxDistance)) {
111 (*m_inSpanner)[e] =
true;
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
virtual bool preconditionsOk(const GraphAttributes &GA, double stretch, std::string &error) override
Compare floating point numbers with epsilons and integral numbers with normal compare operators.
Includes declaration of graph class.
edge copy(edge e) const override
Returns the edge in the graph copy corresponding to e.
GraphCopySimple * m_spanner
virtual void init(const GraphAttributes &GA, double stretch, GraphCopySimple &spanner, EdgeArray< bool > &inSpanner)
Initializes members and create an empty spanner.
void assertTimeLeft()
Assert, that time is left.
Copies of graphs with mapping between nodes and edges.
virtual SpannerModule< TWeight >::ReturnType execute() override
Executes the core algorithm.
const GraphAttributes & m_GA
bool directed() const
Returns if the graph is directed.
const Graph & constGraph() const
Returns a reference to the associated graph.
Basic module for spanner algorithms.
std::enable_if< std::is_integral< T >::value, bool >::type less(const T &x, const T &y) const
Compare if x is LESS than y for integral types.
EdgeWeightComparator()=delete
virtual void init(const GraphAttributes &GA, double stretch, GraphCopySimple &spanner, EdgeArray< bool > &inSpanner) override
Initializes members and create an empty spanner.
int numberOfEdges() const
Returns the number of edges in the graph.
The parameterized class Array implements dynamic arrays of type E.
EdgeArray< TWeight > m_spannerWeights
EdgeWeightComparator & operator=(const EdgeWeightComparator &)=delete
Multiplicative spanner by greedily adding edges.
Interface for spanner algorithms.
std::enable_if< std::is_integral< T >::value, bool >::type greater(const T &x, const T &y) const
Compare if x is GREATER than y for integral types.
EdgeWeightComparator(const GraphAttributes &GA)
double distanceInSpanner(node s, node t, double maxLookupDist)
internal::GraphObjectContainer< EdgeElement > edges
The container containing all edge objects.
bool less(edge a, edge b) const
Basic declarations, included by all source files.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
const GraphAttributes * m_GA
Declaration and implementation of Array class and Array algorithms.
Class for the representation of edges.
void quicksort()
Sorts array using Quicksort.
ReturnType
The return type of a module.
Class for the representation of nodes.
edge newEdge(edge eOrig)
Creates a new edge in the graph copy with original edge eOrig.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
static TWeight getWeight(const GraphAttributes &GA, edge e)