Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

NodeAttributes.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/List.h>
36 #include <ogdf/basic/geometry.h>
37 
38 namespace ogdf {
39 namespace energybased {
40 namespace fmmm {
41 
46  friend OGDF_EXPORT std::ostream& operator<<(std::ostream&, const NodeAttributes&);
47 
49  friend OGDF_EXPORT std::istream& operator>>(std::istream&, NodeAttributes&);
50 
51 public:
54 
55  void set_NodeAttributes(double w, double h, DPoint pos, node v_low, node v_high) {
56  width = w;
57  height = h;
58  position = pos;
59  v_lower_level = v_low;
60  v_higher_level = v_high;
61  }
62 
63  void set_position(DPoint pos) { position = pos; }
64 
65  void set_width(double w) { width = w; }
66 
67  void set_height(double h) { height = h; }
68 
69  void set_x(double x) { position.m_x = x; }
70 
71  void set_y(double y) { position.m_y = y; }
72 
73  DPoint get_position() const { return position; }
74 
75  double get_x() const { return position.m_x; }
76 
77  double get_y() const { return position.m_y; }
78 
79  double get_width() const { return width; }
80 
81  double get_height() const { return height; }
82 
85 
86  void set_original_node(node v) { v_lower_level = v; }
87 
88  void set_copy_node(node v) { v_higher_level = v; }
89 
90  node get_original_node() const { return v_lower_level; }
91 
92  node get_copy_node() const { return v_higher_level; }
93 
97 
98  void set_subgraph_node(node v) { v_higher_level = v; }
99 
100  node get_subgraph_node() const { return v_higher_level; }
101 
105 
106  void set_lower_level_node(node v) { v_lower_level = v; }
107 
108  void set_higher_level_node(node v) { v_higher_level = v; }
109 
110  node get_lower_level_node() const { return v_lower_level; }
111 
112  node get_higher_level_node() const { return v_higher_level; }
113 
114  void set_mass(int m) { mass = m; }
115 
116  void set_type(int t) { type = t; }
117 
118  void set_dedicated_sun_node(node v) { dedicated_sun_node = v; }
119 
120  void set_dedicated_sun_distance(double d) { dedicated_sun_distance = d; }
121 
122  void set_dedicated_pm_node(node v) { dedicated_pm_node = v; }
123 
124  void place() { placed = true; }
125 
126  void set_angle_1(double a) { angle_1 = a; }
127 
128  void set_angle_2(double a) { angle_2 = a; }
129 
131 
132  int get_mass() const { return mass; }
133 
134  int get_type() const { return type; }
135 
136  node get_dedicated_sun_node() const { return dedicated_sun_node; }
137 
138  double get_dedicated_sun_distance() const { return dedicated_sun_distance; }
139 
140  node get_dedicated_pm_node() const { return dedicated_pm_node; }
141 
142  bool is_placed() const { return placed; }
143 
144  double get_angle_1() const { return angle_1; }
145 
146  double get_angle_2() const { return angle_2; }
147 
148  List<double>* get_lambda_List_ptr() { return lambda_List_ptr; }
149 
150  List<node>* get_neighbour_sun_node_List_ptr() { return neighbour_s_node_List_ptr; }
151 
152  List<node>* get_dedicated_moon_node_List_ptr() { return moon_List_ptr; }
153 
155  void init_mult_values();
156 
157 private:
159  double width;
160  double height;
161 
164 
167 
174 
175  int mass;
176  int type;
177  node dedicated_sun_node;
180  node dedicated_pm_node;
183  List<node> neighbour_s_node;
186  List<double>* lambda_List_ptr;
191  bool placed;
192  double angle_1;
194  double angle_2;
195 
197 };
198 
199 }
200 }
201 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::energybased::fmmm::NodeAttributes::get_angle_2
double get_angle_2() const
Definition: NodeAttributes.h:146
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::energybased::fmmm::NodeAttributes::set_NodeAttributes
void set_NodeAttributes(double w, double h, DPoint pos, node v_low, node v_high)
Definition: NodeAttributes.h:55
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_moon_node_List_ptr
List< node > * get_dedicated_moon_node_List_ptr()
Definition: NodeAttributes.h:152
ogdf::energybased::fmmm::NodeAttributes::lambda
List< double > lambda
the factors lambda for scaling the length of this edge relative to the pass between v's sun and the s...
Definition: NodeAttributes.h:182
ogdf::energybased::fmmm::NodeAttributes::set_angle_1
void set_angle_1(double a)
Definition: NodeAttributes.h:126
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_sun_distance
void set_dedicated_sun_distance(double d)
Definition: NodeAttributes.h:120
ogdf::energybased::fmmm::NodeAttributes::get_angle_1
double get_angle_1() const
Definition: NodeAttributes.h:144
ogdf::energybased::fmmm::NodeAttributes::set_width
void set_width(double w)
Definition: NodeAttributes.h:65
ogdf::energybased::fmmm::NodeAttributes::get_width
double get_width() const
Definition: NodeAttributes.h:79
ogdf::energybased::fmmm::NodeAttributes::angle_2
double angle_2
solar systems have to be placed
Definition: NodeAttributes.h:194
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_sun_node
void set_dedicated_sun_node(node v)
Definition: NodeAttributes.h:118
ogdf::energybased::fmmm::NodeAttributes
helping data structure that stores the graphical attributes of a node that are needed for the force-d...
Definition: NodeAttributes.h:44
ogdf::energybased::fmmm::NodeAttributes::v_higher_level
node v_higher_level
the corresponding node in the higher level graph for divide et impera v_lower_level is the original g...
Definition: NodeAttributes.h:166
ogdf::energybased::fmmm::NodeAttributes::set_lower_level_node
void set_lower_level_node(node v)
Definition: NodeAttributes.h:106
ogdf::energybased::fmmm::NodeAttributes::set_position
void set_position(DPoint pos)
Definition: NodeAttributes.h:63
ogdf::energybased::fmmm::NodeAttributes::get_lambda_List_ptr
List< double > * get_lambda_List_ptr()
Definition: NodeAttributes.h:148
ogdf::energybased::fmmm::NodeAttributes::v_lower_level
node v_lower_level
the corresponding node in the lower level graph
Definition: NodeAttributes.h:165
ogdf::energybased::fmmm::NodeAttributes::set_height
void set_height(double h)
Definition: NodeAttributes.h:67
ogdf::energybased::fmmm::NodeAttributes::get_subgraph_node
node get_subgraph_node() const
Definition: NodeAttributes.h:100
ogdf::energybased::fmmm::NodeAttributes::is_placed
bool is_placed() const
Definition: NodeAttributes.h:142
ogdf::energybased::fmmm::NodeAttributes::moon_List_ptr
List< node > * moon_List_ptr
a pointer to the moon_List
Definition: NodeAttributes.h:190
ogdf::energybased::fmmm::NodeAttributes::get_y
double get_y() const
Definition: NodeAttributes.h:77
ogdf::energybased::fmmm::NodeAttributes::mass
int mass
the mass (= number of previously collapsed nodes) of this node
Definition: NodeAttributes.h:175
ogdf::energybased::fmmm::NodeAttributes::set_angle_2
void set_angle_2(double a)
Definition: NodeAttributes.h:128
ogdf::energybased::fmmm::NodeAttributes::place
void place()
Definition: NodeAttributes.h:124
backward::Color::type
type
Definition: backward.hpp:1716
ogdf::energybased::fmmm::NodeAttributes::width
double width
Definition: NodeAttributes.h:159
ogdf::energybased::fmmm::NodeAttributes::get_height
double get_height() const
Definition: NodeAttributes.h:81
ogdf::energybased::fmmm::NodeAttributes::dedicated_sun_distance
double dedicated_sun_distance
the distance to the dedicated sun node of the galaxy of this node
Definition: NodeAttributes.h:179
ogdf::energybased::fmmm::NodeAttributes::height
double height
Definition: NodeAttributes.h:160
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:978
ogdf::energybased::fmmm::NodeAttributes::get_original_node
node get_original_node() const
Definition: NodeAttributes.h:90
ogdf::energybased::fmmm::NodeAttributes::get_mass
int get_mass() const
Definition: NodeAttributes.h:132
ogdf::List< double >
ogdf::energybased::fmmm::NodeAttributes::moon_List
List< node > moon_List
the list of all dedicated moon nodes (!= nil if type == 3)
Definition: NodeAttributes.h:189
ogdf::energybased::fmmm::NodeAttributes::type
int type
1 = sun node (s_node); 2 = planet node (p_node) without a dedicate moon 3 = planet node with dedicate...
Definition: NodeAttributes.h:176
ogdf::energybased::fmmm::NodeAttributes::set_higher_level_node
void set_higher_level_node(node v)
Definition: NodeAttributes.h:108
ogdf::energybased::fmmm::NodeAttributes::position
DPoint position
Definition: NodeAttributes.h:158
ogdf::energybased::fmmm::NodeAttributes::set_subgraph_node
void set_subgraph_node(node v)
Definition: NodeAttributes.h:98
ogdf::energybased::fmmm::NodeAttributes::get_higher_level_node
node get_higher_level_node() const
Definition: NodeAttributes.h:112
ogdf::energybased::fmmm::NodeAttributes::set_x
void set_x(double x)
Definition: NodeAttributes.h:69
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::energybased::fmmm::NodeAttributes::get_lower_level_node
node get_lower_level_node() const
Definition: NodeAttributes.h:110
ogdf::energybased::fmmm::NodeAttributes::set_original_node
void set_original_node(node v)
Definition: NodeAttributes.h:86
ogdf::energybased::fmmm::NodeAttributes::get_position
DPoint get_position() const
Definition: NodeAttributes.h:73
ogdf::energybased::fmmm::NodeAttributes::get_x
double get_x() const
Definition: NodeAttributes.h:75
List.h
Declaration of doubly linked lists and iterators.
ogdf::energybased::fmmm::NodeAttributes::set_mass
void set_mass(int m)
Definition: NodeAttributes.h:114
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_sun_distance
double get_dedicated_sun_distance() const
Definition: NodeAttributes.h:138
ogdf::operator>>
std::istream & operator>>(std::istream &is, TokenIgnorer token)
ogdf::energybased::fmmm::NodeAttributes::placed
bool placed
indicates weather an initial position has been assigned to this node or not
Definition: NodeAttributes.h:191
ogdf::energybased::fmmm::NodeAttributes::get_type
int get_type() const
Definition: NodeAttributes.h:134
ogdf::energybased::fmmm::NodeAttributes::get_neighbour_sun_node_List_ptr
List< node > * get_neighbour_sun_node_List_ptr()
Definition: NodeAttributes.h:150
ogdf::energybased::fmmm::NodeAttributes::set_copy_node
void set_copy_node(node v)
Definition: NodeAttributes.h:88
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_pm_node
void set_dedicated_pm_node(node v)
Definition: NodeAttributes.h:122
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_pm_node
node get_dedicated_pm_node() const
Definition: NodeAttributes.h:140
ogdf::energybased::fmmm::NodeAttributes::set_y
void set_y(double y)
Definition: NodeAttributes.h:71
ogdf::energybased::fmmm::NodeAttributes::get_copy_node
node get_copy_node() const
Definition: NodeAttributes.h:92
ogdf::energybased::fmmm::NodeAttributes::neighbour_s_node_List_ptr
List< node > * neighbour_s_node_List_ptr
a pointer to to the neighbour_s_node list
Definition: NodeAttributes.h:188
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_sun_node
node get_dedicated_sun_node() const
Definition: NodeAttributes.h:136
ogdf::energybased::fmmm::NodeAttributes::set_type
void set_type(int t)
Definition: NodeAttributes.h:116