Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

EdgeAttributes.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 
37 namespace ogdf {
38 namespace energybased {
39 namespace fmmm {
40 
44 {
46  friend OGDF_EXPORT ostream &operator<< (ostream &, const EdgeAttributes &);
47 
49  friend OGDF_EXPORT istream &operator>> (istream &, EdgeAttributes &);
50 
51 public:
52  EdgeAttributes();
54 
55  void set_EdgeAttributes(double l, edge e_orig, edge e_sub)
56  {
57  length = l;
58  e_original = e_orig;
59  e_subgraph = e_sub;
60  }
61 
62  void set_length(double l) { length = l; }
63  double get_length() const { return length; }
64 
66 
67  void set_original_edge (edge e) { e_original = e; }
68  void set_subgraph_edge (edge e) { e_subgraph = e; }
69  edge get_original_edge() const { return e_original; }
70  edge get_subgraph_edge() const { return e_subgraph; }
71 
74 
75  void set_copy_edge (edge e) {e_subgraph = e;}
76  edge get_copy_edge() const {return e_subgraph;}
77 
80 
81  void set_higher_level_edge (edge e) { e_subgraph = e; }
82  edge get_higher_level_edge() const { return e_subgraph; }
83  bool is_moon_edge() const { return moon_edge; }
84  void make_moon_edge() { moon_edge = true; }
85  bool is_extra_edge() const { return extra_edge; }
86  void make_extra_edge() { extra_edge = true; }
87  void mark_as_normal_edge() { extra_edge = false; }
88  void init_mult_values() { e_subgraph = nullptr; moon_edge = false; }
89 
91 
92 private:
93  double length;
96 
98  bool moon_edge;
99 
103 };
104 
105 }
106 }
107 }
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
ostream & operator<<(ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:764
bool moon_edge
indicates if this edge is associasted with a moon node
Class for the representation of edges.
Definition: Graph_d.h:291
Includes declaration of graph class.
helping data structure that stores the graphical attributes of an edge that are needed for the force-...
The namespace for all OGDF objects.
Declaration of classes DPoint, DPolyline, DLine, DRect, DIntersectableRect, DScaler.
bool extra_edge
indicates if this edge is an extra edge that is added to enforce few edge crossings ...
void set_EdgeAttributes(double l, edge e_orig, edge e_sub)