Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

ParticleInfo.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 
37 namespace ogdf {
38 namespace energybased {
39 namespace fmmm {
40 
43 {
45  friend std::ostream &operator<< (std::ostream & output, const ParticleInfo & A)
46  {
47  output
48  << " node_index " << A.vertex->index()
49  << " x_y_coord " << A.x_y_coord
50  << (A.marked ? " marked " : " unmarked ")
51  << " sublist_ptr ";
52  if (A.subList_ptr == nullptr)
53  output<<"nullptr";
54  else
55  output<<A.subList_ptr;
56  return output;
57  }
58 
59 #if 0
60  friend std::istream &operator>> (std::istream & input, ParticleInfo & A)
62  {
63  input >> A;
64  return input;
65  }
66 #endif
67 
68 public:
69 
72  vertex(nullptr),
73  x_y_coord(0),
74  cross_ref_item(nullptr),
75  subList_ptr(nullptr),
76  copy_item(nullptr),
77  marked(false),
78  tmp_item(nullptr)
79  { }
80 
81  void set_vertex(node v) { vertex = v; }
82  void set_x_y_coord(double c) { x_y_coord = c; }
83  void set_cross_ref_item (ListIterator<ParticleInfo> it) { cross_ref_item = it; }
84  void set_subList_ptr(List<ParticleInfo>* ptr) { subList_ptr = ptr; }
85  void set_copy_item (ListIterator<ParticleInfo> it) { copy_item = it; }
86  void mark() { marked = true; }
87  void unmark() { marked = false; }
89 
90  node get_vertex() const { return vertex; }
91  double get_x_y_coord() const { return x_y_coord; }
92  ListIterator<ParticleInfo> get_cross_ref_item() const { return cross_ref_item; }
93  List<ParticleInfo>* get_subList_ptr() const { return subList_ptr; }
94  ListIterator<ParticleInfo> get_copy_item() const{return copy_item;}
95  bool is_marked() const { return marked; }
97 
98 private:
100  double x_y_coord;
101 
107 
112  bool marked;
113 
118 };
119 
120 OGDF_DECLARE_COMPARER(ParticleInfoComparer, ParticleInfo, double, x.get_x_y_coord());
121 
122 }
123 }
124 }
bool marked
indicates if this ParticleInfo object is marked or not
Definition: ParticleInfo.h:112
void set_cross_ref_item(ListIterator< ParticleInfo > it)
Definition: ParticleInfo.h:83
void set_copy_item(ListIterator< ParticleInfo > it)
Definition: ParticleInfo.h:85
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
ListIterator< ParticleInfo > get_cross_ref_item() const
Definition: ParticleInfo.h:92
node vertex
the vertex of G that is associated with this attributes
Definition: ParticleInfo.h:99
Helping data structure for building up the reduced quad tree by NMM.
Definition: ParticleInfo.h:42
ListIterator< ParticleInfo > tmp_item
A temporary item that is used to construct the cross references for the copy_Lists and the subLists...
Definition: ParticleInfo.h:117
ListIterator< ParticleInfo > get_copy_item() const
Definition: ParticleInfo.h:94
ListIterator< ParticleInfo > cross_ref_item
the Listiterator of the ParticleInfo-Element that containes the vertex in the List storing the other ...
Definition: ParticleInfo.h:106
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
Class for the representation of nodes.
Definition: Graph_d.h:169
Encapsulates a pointer to a list element.
Definition: List.h:42
Includes declaration of graph class.
List< ParticleInfo > * get_subList_ptr() const
Definition: ParticleInfo.h:93
int index() const
Returns the (unique) node index.
Definition: Graph_d.h:203
ListIterator< ParticleInfo > get_tmp_cross_ref_item() const
Definition: ParticleInfo.h:96
ListIterator< ParticleInfo > copy_item
the item of this entry in the copy List
Definition: ParticleInfo.h:111
std::istream & operator>>(std::istream &is, TokenIgnorer token)
The namespace for all OGDF objects.
void set_subList_ptr(List< ParticleInfo > *ptr)
Definition: ParticleInfo.h:84
List< ParticleInfo > * subList_ptr
Points to the subList of L_x(L_y) where the actual entry of ParticleInfo has to be stored...
Definition: ParticleInfo.h:110
OGDF_DECLARE_COMPARER(ParticleInfoComparer, ParticleInfo, double, x.get_x_y_coord())
void set_tmp_cross_ref_item(ListIterator< ParticleInfo > it)
Definition: ParticleInfo.h:88
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.