Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

EdgeChain.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/basic.h>
36 #include <functional>
37 
38 namespace ogdf {
39 namespace fast_multipole_embedder{
40 
42 class NodeAdjInfo {
43 public:
44  uint32_t degree;
45  uint32_t firstEntry;
46  uint32_t lastEntry;
47  uint32_t unused;
48 };
49 
51 class EdgeAdjInfo {
52 public:
53  uint32_t a;
54  uint32_t b;
55  uint32_t a_next;
56  uint32_t b_next;
57 
59  inline uint32_t twinNode(uint32_t index) const {
60  OGDF_ASSERT(a == index || b == index);
61  return a == index ? b : a;
62  }
63 
65  inline uint32_t nextEdgeAdjIndex(uint32_t index) const {
66  OGDF_ASSERT(a == index || b == index);
67  return a == index ? a_next : b_next;
68  }
69 };
70 
72 void pushBackEdge(uint32_t a, uint32_t b,
73  std::function<EdgeAdjInfo&(uint32_t)> edgeInform,
74  std::function<NodeAdjInfo&(uint32_t)> nodeInform,
75  int e_index);
76 
77 }
78 }
Information about incident edges (16 bytes).
Definition: EdgeChain.h:42
uint32_t twinNode(uint32_t index) const
Returns the other node (not index).
Definition: EdgeChain.h:59
uint32_t firstEntry
The first pair in the edges chain.
Definition: EdgeChain.h:45
uint32_t a_next
Next pair in the chain of the first node.
Definition: EdgeChain.h:55
void pushBackEdge(uint32_t a, uint32_t b, std::function< EdgeAdjInfo &(uint32_t)> edgeInform, std::function< NodeAdjInfo &(uint32_t)> nodeInform, int e_index)
Helper method used by ArrayGraph and WSPD.
Information about an edge (16 bytes).
Definition: EdgeChain.h:51
uint32_t degree
Total count of pairs where is either the first or second node.
Definition: EdgeChain.h:44
uint32_t a
First node of the pair.
Definition: EdgeChain.h:53
uint32_t nextEdgeAdjIndex(uint32_t index) const
Returns the index of the next pair of index.
Definition: EdgeChain.h:65
Basic declarations, included by all source files.
uint32_t b_next
Next pair in the chain of the second node.
Definition: EdgeChain.h:56
The namespace for all OGDF objects.
uint32_t b
Second node of the pair.
Definition: EdgeChain.h:54
uint32_t lastEntry
The last pair in the edges chain.
Definition: EdgeChain.h:46
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:41