Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EdgeAttributes.h
Go to the documentation of this file.
1
32#pragma once
33
34#include <ogdf/basic/Graph.h>
35#include <ogdf/basic/basic.h>
36
37#include <iosfwd>
38
39namespace ogdf {
40namespace energybased {
41namespace fmmm {
42
47 friend OGDF_EXPORT std::ostream& operator<<(std::ostream&, const EdgeAttributes&);
48
50 friend OGDF_EXPORT std::istream& operator>>(std::istream&, EdgeAttributes&);
51
52public:
55
56 void set_EdgeAttributes(double len, edge e_orig, edge e_sub) {
57 length = len;
58 e_original = e_orig;
59 e_subgraph = e_sub;
60 }
61
62 void set_length(double len) { length = len; }
63
64 double get_length() const { return length; }
65
68
69 void set_original_edge(edge e) { e_original = e; }
70
71 void set_subgraph_edge(edge e) { e_subgraph = e; }
72
73 edge get_original_edge() const { return e_original; }
74
75 edge get_subgraph_edge() const { return e_subgraph; }
76
80
81 void set_copy_edge(edge e) { e_subgraph = e; }
82
83 edge get_copy_edge() const { return e_subgraph; }
84
88
89 void set_higher_level_edge(edge e) { e_subgraph = e; }
90
91 edge get_higher_level_edge() const { return e_subgraph; }
92
93 bool is_moon_edge() const { return moon_edge; }
94
95 void make_moon_edge() { moon_edge = true; }
96
97 bool is_extra_edge() const { return extra_edge; }
98
99 void make_extra_edge() { extra_edge = true; }
100
101 void mark_as_normal_edge() { extra_edge = false; }
102
104 e_subgraph = nullptr;
105 moon_edge = false;
106 }
107
109
110private:
111 double length;
114
117
121};
122
123}
124}
125}
Includes declaration of graph class.
Basic declarations, included by all source files.
Class for the representation of edges.
Definition Graph_d.h:364
helping data structure that stores the graphical attributes of an edge that are needed for the force-...
friend std::istream & operator>>(std::istream &, EdgeAttributes &)
inputstream for EdgeAttributes
void set_EdgeAttributes(double len, edge e_orig, edge e_sub)
bool extra_edge
indicates if this edge is an extra edge that is added to enforce few edge crossings
bool moon_edge
indicates if this edge is associasted with a moon node
friend std::ostream & operator<<(std::ostream &, const EdgeAttributes &)
outputstream for EdgeAttributes
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.