Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
39 namespace ogdf {
40 namespace energybased {
41 namespace 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 
52 public:
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 
110 private:
111  double length;
114 
116  bool moon_edge;
117 
121 };
122 
123 }
124 }
125 }
ogdf::energybased::fmmm::EdgeAttributes::moon_edge
bool moon_edge
indicates if this edge is associasted with a moon node
Definition: EdgeAttributes.h:116
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::energybased::fmmm::EdgeAttributes::init_mult_values
void init_mult_values()
Definition: EdgeAttributes.h:103
ogdf::energybased::fmmm::EdgeAttributes::set_EdgeAttributes
void set_EdgeAttributes(double len, edge e_orig, edge e_sub)
Definition: EdgeAttributes.h:56
ogdf::energybased::fmmm::EdgeAttributes::set_higher_level_edge
void set_higher_level_edge(edge e)
Definition: EdgeAttributes.h:89
ogdf::energybased::fmmm::EdgeAttributes::get_copy_edge
edge get_copy_edge() const
Definition: EdgeAttributes.h:83
ogdf::energybased::fmmm::EdgeAttributes::make_moon_edge
void make_moon_edge()
Definition: EdgeAttributes.h:95
ogdf::energybased::fmmm::EdgeAttributes::set_original_edge
void set_original_edge(edge e)
Definition: EdgeAttributes.h:69
ogdf::energybased::fmmm::EdgeAttributes::length
double length
Definition: EdgeAttributes.h:111
ogdf::energybased::fmmm::EdgeAttributes::mark_as_normal_edge
void mark_as_normal_edge()
Definition: EdgeAttributes.h:101
ogdf::energybased::fmmm::EdgeAttributes::get_length
double get_length() const
Definition: EdgeAttributes.h:64
ogdf::energybased::fmmm::EdgeAttributes::set_copy_edge
void set_copy_edge(edge e)
Definition: EdgeAttributes.h:81
ogdf::energybased::fmmm::EdgeAttributes::set_length
void set_length(double len)
Definition: EdgeAttributes.h:62
ogdf::energybased::fmmm::EdgeAttributes::get_higher_level_edge
edge get_higher_level_edge() const
Definition: EdgeAttributes.h:91
ogdf::energybased::fmmm::EdgeAttributes::get_subgraph_edge
edge get_subgraph_edge() const
Definition: EdgeAttributes.h:75
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:983
ogdf::energybased::fmmm::EdgeAttributes::get_original_edge
edge get_original_edge() const
Definition: EdgeAttributes.h:73
ogdf::energybased::fmmm::EdgeAttributes
helping data structure that stores the graphical attributes of an edge that are needed for the force-...
Definition: EdgeAttributes.h:45
ogdf::energybased::fmmm::EdgeAttributes::set_subgraph_edge
void set_subgraph_edge(edge e)
Definition: EdgeAttributes.h:71
ogdf::energybased::fmmm::EdgeAttributes::make_extra_edge
void make_extra_edge()
Definition: EdgeAttributes.h:99
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::energybased::fmmm::EdgeAttributes::is_moon_edge
bool is_moon_edge() const
Definition: EdgeAttributes.h:93
ogdf::energybased::fmmm::EdgeAttributes::extra_edge
bool extra_edge
indicates if this edge is an extra edge that is added to enforce few edge crossings
Definition: EdgeAttributes.h:120
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::operator>>
std::istream & operator>>(std::istream &is, TokenIgnorer token)
ogdf::energybased::fmmm::EdgeAttributes::e_original
edge e_original
Definition: EdgeAttributes.h:112
ogdf::energybased::fmmm::EdgeAttributes::e_subgraph
edge e_subgraph
Definition: EdgeAttributes.h:113
ogdf::energybased::fmmm::EdgeAttributes::is_extra_edge
bool is_extra_edge() const
Definition: EdgeAttributes.h:97