Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

NodeAttributes.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/geometry.h>
35 #include <ogdf/basic/Graph.h>
36 #include <ogdf/basic/List.h>
37 
38 namespace ogdf {
39 namespace energybased {
40 namespace fmmm {
41 
45 {
47  friend OGDF_EXPORT std::ostream &operator<< (std::ostream &, const NodeAttributes &);
48 
50  friend OGDF_EXPORT std::istream &operator>> (std::istream &, NodeAttributes &);
51 
52 public:
55 
56  void set_NodeAttributes(double w, double h, DPoint pos,node v_low,node
57  v_high)
58  {
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  void set_width(double w) {width = w;}
68  void set_height(double h) {height = h;}
69  void set_x(double x) {position.m_x = x;}
70  void set_y(double y) {position.m_y = y;}
71 
72  DPoint get_position() const { return position; }
73  double get_x() const {return position.m_x;}
74  double get_y() const {return position.m_y;}
75  double get_width() const {return width;}
76  double get_height() const {return height;}
77 
78 
80 
81  void set_original_node (node v) {v_lower_level = v;}
82  void set_copy_node (node v) {v_higher_level = v;}
83  node get_original_node() const {return v_lower_level;}
84  node get_copy_node() const {return v_higher_level;}
85 
88 
89  void set_subgraph_node (node v) {v_higher_level = v;}
90  node get_subgraph_node() const {return v_higher_level;}
91 
94 
95  void set_lower_level_node (node v) {v_lower_level = v;}
96  void set_higher_level_node (node v) {v_higher_level = v;}
97  node get_lower_level_node() const {return v_lower_level;}
98  node get_higher_level_node() const {return v_higher_level;}
99  void set_mass(int m) {mass = m;}
100  void set_type(int t) {type = t;}
101  void set_dedicated_sun_node(node v){dedicated_sun_node = v;}
102  void set_dedicated_sun_distance(double d) {dedicated_sun_distance = d;}
103  void set_dedicated_pm_node(node v) {dedicated_pm_node = v;}
104  void place(){placed = true;}
105  void set_angle_1(double a) {angle_1 = a;}
106  void set_angle_2(double a) {angle_2 = a;}
107 
109 
110  int get_mass() const {return mass;}
111  int get_type() const {return type;}
112  node get_dedicated_sun_node() const {return dedicated_sun_node;}
113  double get_dedicated_sun_distance() const {return dedicated_sun_distance;}
114  node get_dedicated_pm_node() const {return dedicated_pm_node;}
115  bool is_placed() const {return placed;}
116  double get_angle_1() const {return angle_1;}
117  double get_angle_2() const {return angle_2;}
118 
119 
120  List<double>* get_lambda_List_ptr() {return lambda_List_ptr;}
121  List<node>* get_neighbour_sun_node_List_ptr() {return neighbour_s_node_List_ptr;}
122  List<node>* get_dedicated_moon_node_List_ptr() {return moon_List_ptr;}
123 
124 
126  void init_mult_values();
127 
128 private:
129 
131  double width;
132  double height;
133 
135 
138 
144 
145  int mass;
146  int type;
147  node dedicated_sun_node;
150  node dedicated_pm_node;
153  List<node> neighbour_s_node;
156  List<double>* lambda_List_ptr;
161  bool placed;
162  double angle_1;
164  double angle_2;
165 
167 };
168 
169 }
170 }
171 }
node v_higher_level
the corresponding node in the higher level graph for divide et impera v_lower_level is the original g...
helping data structure that stores the graphical attributes of a node that are needed for the force-d...
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
List< double > lambda
the factors lambda for scaling the length of this edge relative to the pass between v&#39;s sun and the s...
int type
1 = sun node (s_node); 2 = planet node (p_node) without a dedicate moon 3 = planet node with dedicate...
int mass
the mass (= number of previously collapsed nodes) of this node
node v_lower_level
the corresponding node in the lower level graph
List< node > moon_List
the list of all dedicated moon nodes (!= nil if type == 3)
Class for the representation of nodes.
Definition: Graph_d.h:169
double angle_2
solar systems have to be placed
List< node > * moon_List_ptr
a pointer to the moon_List
Includes declaration of graph class.
std::istream & operator>>(std::istream &is, TokenIgnorer token)
List< node > * neighbour_s_node_List_ptr
a pointer to to the neighbour_s_node list
double dedicated_sun_distance
the distance to the dedicated sun node of the galaxy of this node
The namespace for all OGDF objects.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment, DPolygon, DRect, DIntersectableRect.
void set_NodeAttributes(double w, double h, DPoint pos, node v_low, node v_high)
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:942
Declaration of doubly linked lists and iterators.
bool placed
indicates weather an initial position has been assigned to this node or not