Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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 ostream &operator<< (ostream &, const NodeAttributes &);
48 
50  friend OGDF_EXPORT istream &operator>> (istream &, NodeAttributes &);
51 
52 public:
53 
54  NodeAttributes();
56 
57  void set_NodeAttributes(double w, double h, DPoint pos,node v_low,node
58  v_high)
59  {
60  width = w;
61  height = h;
62  position = pos;
63  v_lower_level = v_low;
64  v_higher_level = v_high;
65  }
66 
67  void set_position(DPoint pos) {position = pos;}
68  void set_width(double w) {width = w;}
69  void set_height(double h) {height = h;}
70  void set_x(double x) {position.m_x = x;}
71  void set_y(double y) {position.m_y = y;}
72 
73  DPoint get_position() const { return position; }
74  double get_x() const {return position.m_x;}
75  double get_y() const {return position.m_y;}
76  double get_width() const {return width;}
77  double get_height() const {return height;}
78 
79 
81 
82  void set_original_node (node v) {v_lower_level = v;}
83  void set_copy_node (node v) {v_higher_level = v;}
84  node get_original_node() const {return v_lower_level;}
85  node get_copy_node() const {return v_higher_level;}
86 
89 
90  void set_subgraph_node (node v) {v_higher_level = v;}
91  node get_subgraph_node() const {return v_higher_level;}
92 
95 
96  void set_lower_level_node (node v) {v_lower_level = v;}
97  void set_higher_level_node (node v) {v_higher_level = v;}
98  node get_lower_level_node() const {return v_lower_level;}
99  node get_higher_level_node() const {return v_higher_level;}
100  void set_mass(int m) {mass = m;}
101  void set_type(int t) {type = t;}
102  void set_dedicated_sun_node(node v){dedicated_sun_node = v;}
103  void set_dedicated_sun_distance(double d) {dedicated_sun_distance = d;}
104  void set_dedicated_pm_node(node v) {dedicated_pm_node = v;}
105  void place(){placed = true;}
106  void set_angle_1(double a) {angle_1 = a;}
107  void set_angle_2(double a) {angle_2 = a;}
108 
110 
111  int get_mass() const {return mass;}
112  int get_type() const {return type;}
113  node get_dedicated_sun_node() const {return dedicated_sun_node;}
114  double get_dedicated_sun_distance() const {return dedicated_sun_distance;}
115  node get_dedicated_pm_node() const {return dedicated_pm_node;}
116  bool is_placed() const {return placed;}
117  double get_angle_1() const {return angle_1;}
118  double get_angle_2() const {return angle_2;}
119 
120 
121  List<double>* get_lambda_List_ptr() {return lambda_List_ptr;}
122  List<node>* get_neighbour_sun_node_List_ptr() {return neighbour_s_node_List_ptr;}
123  List<node>* get_dedicated_moon_node_List_ptr() {return moon_List_ptr;}
124 
125 
127  void init_mult_values();
128 
129 private:
130 
132  double width;
133  double height;
134 
136 
139 
145 
146  int mass;
147  int type;
148  node dedicated_sun_node;
151  node dedicated_pm_node;
154  List<node> neighbour_s_node;
157  List<double>* lambda_List_ptr;
162  bool placed;
163  double angle_1;
165  double angle_2;
166 
168 };
169 
170 }
171 }
172 }
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...
static std::istream & operator>>(std::istream &inStream, HyperGraph::NodeArray< T > &array)
Definition: HyperGraph.h:814
#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...
Real points.
Definition: geometry.h:219
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:764
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:167
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.
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 DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
void set_NodeAttributes(double w, double h, DPoint pos, node v_low, node v_high)
Declaration of doubly linked lists and iterators.
bool placed
indicates weather an initial position has been assigned to this node or not