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/basic.h>
37 #include <ogdf/basic/geometry.h>
38 
39 #include <iosfwd>
40 
41 namespace ogdf {
42 namespace energybased {
43 namespace fmmm {
44 
49  friend OGDF_EXPORT std::ostream& operator<<(std::ostream&, const NodeAttributes&);
50 
52  friend OGDF_EXPORT std::istream& operator>>(std::istream&, NodeAttributes&);
53 
54 public:
57 
58  void set_NodeAttributes(double w, double h, DPoint pos, node v_low, node v_high) {
59  width = w;
60  height = h;
61  position = pos;
62  v_lower_level = v_low;
63  v_higher_level = v_high;
64  }
65 
66  void set_position(DPoint pos) { position = pos; }
67 
68  void set_width(double w) { width = w; }
69 
70  void set_height(double h) { height = h; }
71 
72  void set_x(double x) { position.m_x = x; }
73 
74  void set_y(double y) { position.m_y = y; }
75 
76  DPoint get_position() const { return position; }
77 
78  double get_x() const { return position.m_x; }
79 
80  double get_y() const { return position.m_y; }
81 
82  double get_width() const { return width; }
83 
84  double get_height() const { return height; }
85 
88 
89  void set_original_node(node v) { v_lower_level = v; }
90 
91  void set_copy_node(node v) { v_higher_level = v; }
92 
93  node get_original_node() const { return v_lower_level; }
94 
95  node get_copy_node() const { return v_higher_level; }
96 
100 
101  void set_subgraph_node(node v) { v_higher_level = v; }
102 
103  node get_subgraph_node() const { return v_higher_level; }
104 
108 
109  void set_lower_level_node(node v) { v_lower_level = v; }
110 
111  void set_higher_level_node(node v) { v_higher_level = v; }
112 
113  node get_lower_level_node() const { return v_lower_level; }
114 
115  node get_higher_level_node() const { return v_higher_level; }
116 
117  void set_mass(int m) { mass = m; }
118 
119  void set_type(int t) { type = t; }
120 
121  void set_dedicated_sun_node(node v) { dedicated_sun_node = v; }
122 
123  void set_dedicated_sun_distance(double d) { dedicated_sun_distance = d; }
124 
125  void set_dedicated_pm_node(node v) { dedicated_pm_node = v; }
126 
127  void place() { placed = true; }
128 
129  void set_angle_1(double a) { angle_1 = a; }
130 
131  void set_angle_2(double a) { angle_2 = a; }
132 
134 
135  int get_mass() const { return mass; }
136 
137  int get_type() const { return type; }
138 
139  node get_dedicated_sun_node() const { return dedicated_sun_node; }
140 
141  double get_dedicated_sun_distance() const { return dedicated_sun_distance; }
142 
143  node get_dedicated_pm_node() const { return dedicated_pm_node; }
144 
145  bool is_placed() const { return placed; }
146 
147  double get_angle_1() const { return angle_1; }
148 
149  double get_angle_2() const { return angle_2; }
150 
151  List<double>* get_lambda_List_ptr() { return lambda_List_ptr; }
152 
153  List<node>* get_neighbour_sun_node_List_ptr() { return neighbour_s_node_List_ptr; }
154 
155  List<node>* get_dedicated_moon_node_List_ptr() { return moon_List_ptr; }
156 
158  void init_mult_values();
159 
160 private:
162  double width;
163  double height;
164 
167 
170 
177 
178  int mass;
179  int type;
180  node dedicated_sun_node;
183  node dedicated_pm_node;
186  List<node> neighbour_s_node;
189  List<double>* lambda_List_ptr;
194  bool placed;
195  double angle_1;
197  double angle_2;
198 
200 };
201 
202 }
203 }
204 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::energybased::fmmm::NodeAttributes::get_angle_2
double get_angle_2() const
Definition: NodeAttributes.h:149
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:58
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_moon_node_List_ptr
List< node > * get_dedicated_moon_node_List_ptr()
Definition: NodeAttributes.h:155
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:185
ogdf::energybased::fmmm::NodeAttributes::set_angle_1
void set_angle_1(double a)
Definition: NodeAttributes.h:129
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_sun_distance
void set_dedicated_sun_distance(double d)
Definition: NodeAttributes.h:123
ogdf::energybased::fmmm::NodeAttributes::get_angle_1
double get_angle_1() const
Definition: NodeAttributes.h:147
ogdf::energybased::fmmm::NodeAttributes::set_width
void set_width(double w)
Definition: NodeAttributes.h:68
ogdf::energybased::fmmm::NodeAttributes::get_width
double get_width() const
Definition: NodeAttributes.h:82
ogdf::energybased::fmmm::NodeAttributes::angle_2
double angle_2
solar systems have to be placed
Definition: NodeAttributes.h:197
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_sun_node
void set_dedicated_sun_node(node v)
Definition: NodeAttributes.h:121
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:47
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:169
ogdf::energybased::fmmm::NodeAttributes::set_lower_level_node
void set_lower_level_node(node v)
Definition: NodeAttributes.h:109
ogdf::energybased::fmmm::NodeAttributes::set_position
void set_position(DPoint pos)
Definition: NodeAttributes.h:66
ogdf::energybased::fmmm::NodeAttributes::get_lambda_List_ptr
List< double > * get_lambda_List_ptr()
Definition: NodeAttributes.h:151
ogdf::energybased::fmmm::NodeAttributes::v_lower_level
node v_lower_level
the corresponding node in the lower level graph
Definition: NodeAttributes.h:168
ogdf::energybased::fmmm::NodeAttributes::set_height
void set_height(double h)
Definition: NodeAttributes.h:70
ogdf::energybased::fmmm::NodeAttributes::get_subgraph_node
node get_subgraph_node() const
Definition: NodeAttributes.h:103
ogdf::energybased::fmmm::NodeAttributes::is_placed
bool is_placed() const
Definition: NodeAttributes.h:145
ogdf::energybased::fmmm::NodeAttributes::moon_List_ptr
List< node > * moon_List_ptr
a pointer to the moon_List
Definition: NodeAttributes.h:193
ogdf::energybased::fmmm::NodeAttributes::get_y
double get_y() const
Definition: NodeAttributes.h:80
ogdf::energybased::fmmm::NodeAttributes::mass
int mass
the mass (= number of previously collapsed nodes) of this node
Definition: NodeAttributes.h:178
ogdf::energybased::fmmm::NodeAttributes::set_angle_2
void set_angle_2(double a)
Definition: NodeAttributes.h:131
ogdf::energybased::fmmm::NodeAttributes::place
void place()
Definition: NodeAttributes.h:127
backward::Color::type
type
Definition: backward.hpp:1716
ogdf::energybased::fmmm::NodeAttributes::width
double width
Definition: NodeAttributes.h:162
ogdf::energybased::fmmm::NodeAttributes::get_height
double get_height() const
Definition: NodeAttributes.h:84
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:182
ogdf::energybased::fmmm::NodeAttributes::height
double height
Definition: NodeAttributes.h:163
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::NodeAttributes::get_original_node
node get_original_node() const
Definition: NodeAttributes.h:93
ogdf::energybased::fmmm::NodeAttributes::get_mass
int get_mass() const
Definition: NodeAttributes.h:135
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:192
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:179
ogdf::energybased::fmmm::NodeAttributes::set_higher_level_node
void set_higher_level_node(node v)
Definition: NodeAttributes.h:111
ogdf::energybased::fmmm::NodeAttributes::position
DPoint position
Definition: NodeAttributes.h:161
ogdf::energybased::fmmm::NodeAttributes::set_subgraph_node
void set_subgraph_node(node v)
Definition: NodeAttributes.h:101
ogdf::energybased::fmmm::NodeAttributes::get_higher_level_node
node get_higher_level_node() const
Definition: NodeAttributes.h:115
ogdf::energybased::fmmm::NodeAttributes::set_x
void set_x(double x)
Definition: NodeAttributes.h:72
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::NodeAttributes::get_lower_level_node
node get_lower_level_node() const
Definition: NodeAttributes.h:113
ogdf::energybased::fmmm::NodeAttributes::set_original_node
void set_original_node(node v)
Definition: NodeAttributes.h:89
ogdf::energybased::fmmm::NodeAttributes::get_position
DPoint get_position() const
Definition: NodeAttributes.h:76
ogdf::energybased::fmmm::NodeAttributes::get_x
double get_x() const
Definition: NodeAttributes.h:78
List.h
Declaration of doubly linked lists and iterators.
ogdf::energybased::fmmm::NodeAttributes::set_mass
void set_mass(int m)
Definition: NodeAttributes.h:117
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_sun_distance
double get_dedicated_sun_distance() const
Definition: NodeAttributes.h:141
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:194
ogdf::energybased::fmmm::NodeAttributes::get_type
int get_type() const
Definition: NodeAttributes.h:137
ogdf::energybased::fmmm::NodeAttributes::get_neighbour_sun_node_List_ptr
List< node > * get_neighbour_sun_node_List_ptr()
Definition: NodeAttributes.h:153
ogdf::energybased::fmmm::NodeAttributes::set_copy_node
void set_copy_node(node v)
Definition: NodeAttributes.h:91
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::energybased::fmmm::NodeAttributes::set_dedicated_pm_node
void set_dedicated_pm_node(node v)
Definition: NodeAttributes.h:125
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_pm_node
node get_dedicated_pm_node() const
Definition: NodeAttributes.h:143
ogdf::energybased::fmmm::NodeAttributes::set_y
void set_y(double y)
Definition: NodeAttributes.h:74
ogdf::energybased::fmmm::NodeAttributes::get_copy_node
node get_copy_node() const
Definition: NodeAttributes.h:95
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:191
ogdf::energybased::fmmm::NodeAttributes::get_dedicated_sun_node
node get_dedicated_sun_node() const
Definition: NodeAttributes.h:139
ogdf::energybased::fmmm::NodeAttributes::set_type
void set_type(int t)
Definition: NodeAttributes.h:119