Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

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 std::ostream &operator<< (std::ostream &, const EdgeAttributes &);
47 
49  friend OGDF_EXPORT std::istream &operator>> (std::istream &, EdgeAttributes &);
50 
51 public:
54 
55  void set_EdgeAttributes(double len, edge e_orig, edge e_sub)
56  {
57  length = len;
58  e_original = e_orig;
59  e_subgraph = e_sub;
60  }
61 
62  void set_length(double len) { length = len; }
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 }
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void set_EdgeAttributes(double len, edge e_orig, edge e_sub)
bool moon_edge
indicates if this edge is associasted with a moon node
Class for the representation of edges.
Definition: Graph_d.h:292
Includes declaration of graph class.
std::istream & operator>>(std::istream &is, TokenIgnorer token)
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 GenericPoint, GenericPolyline, GenericLine, GenericSegment, DPolygon, DRect, DIntersectableRect.
bool extra_edge
indicates if this edge is an extra edge that is added to enforce few edge crossings ...
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:942