Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
37namespace ogdf {
38namespace energybased {
39namespace fmmm {
40
44 friend std::ostream& operator<<(std::ostream& output, const ParticleInfo& A) {
45 output << " node_index " << A.vertex->index() << " x_y_coord " << A.x_y_coord
46 << (A.marked ? " marked " : " unmarked ") << " sublist_ptr ";
47 if (A.subList_ptr == nullptr) {
48 output << "nullptr";
49 } else {
50 output << A.subList_ptr;
51 }
52 return output;
53 }
54
55#if 0
57 friend std::istream &operator>> (std::istream & input, ParticleInfo & A)
58 {
59 input >> A;
60 return input;
61 }
62#endif
63
64public:
67 : vertex(nullptr)
68 , x_y_coord(0)
69 , cross_ref_item(nullptr)
70 , subList_ptr(nullptr)
71 , copy_item(nullptr)
72 , marked(false)
73 , tmp_item(nullptr) { }
74
75 void set_vertex(node v) { vertex = v; }
76
77 void set_x_y_coord(double c) { x_y_coord = c; }
78
79 void set_cross_ref_item(ListIterator<ParticleInfo> it) { cross_ref_item = it; }
80
81 void set_subList_ptr(List<ParticleInfo>* ptr) { subList_ptr = ptr; }
82
83 void set_copy_item(ListIterator<ParticleInfo> it) { copy_item = it; }
84
85 void mark() { marked = true; }
86
87 void unmark() { marked = false; }
88
90
91 node get_vertex() const { return vertex; }
92
93 double get_x_y_coord() const { return x_y_coord; }
94
95 ListIterator<ParticleInfo> get_cross_ref_item() const { return cross_ref_item; }
96
97 List<ParticleInfo>* get_subList_ptr() const { return subList_ptr; }
98
99 ListIterator<ParticleInfo> get_copy_item() const { return copy_item; }
100
101 bool is_marked() const { return marked; }
102
104
105private:
107 double x_y_coord;
108
114
119 bool marked;
120
125};
126
128
129}
130}
131}
Includes declaration of graph class.
Declaration of doubly linked lists and iterators.
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Encapsulates a pointer to a list element.
Definition List.h:103
Class for the representation of nodes.
Definition Graph_d.h:177
Helping data structure for building up the reduced quad tree by NMM.
ListIterator< ParticleInfo > get_tmp_cross_ref_item() const
void set_cross_ref_item(ListIterator< ParticleInfo > it)
node vertex
the vertex of G that is associated with this attributes
friend std::ostream & operator<<(std::ostream &output, const ParticleInfo &A)
Output stream for ParticleInfo.
ListIterator< ParticleInfo > copy_item
the item of this entry in the copy List
void set_subList_ptr(List< ParticleInfo > *ptr)
List< ParticleInfo > * get_subList_ptr() const
ListIterator< ParticleInfo > get_copy_item() const
ListIterator< ParticleInfo > tmp_item
A temporary item that is used to construct the cross references for the copy_Lists and the subLists.
List< ParticleInfo > * subList_ptr
Points to the subList of L_x(L_y) where the actual entry of ParticleInfo has to be stored.
ListIterator< ParticleInfo > cross_ref_item
the Listiterator of the ParticleInfo-Element that containes the vertex in the List storing the other ...
void set_tmp_cross_ref_item(ListIterator< ParticleInfo > it)
bool marked
indicates if this ParticleInfo object is marked or not
void set_copy_item(ListIterator< ParticleInfo > it)
ListIterator< ParticleInfo > get_cross_ref_item() const
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
#define OGDF_DECLARE_COMPARER(NAME, TYPE, NUMBER, GET_X_ATTR)
Declares a class NAME that extends from ogdf::GenericComparer.
Definition comparer.h:434
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.