Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

Node.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Graph.h>
36 
37 namespace ogdf {
38 namespace energybased {
39 namespace fmmm {
40 
43 class Node
44 {
45  friend int value(const Node& A) { return A.value; }
46 
47  friend std::ostream &operator<< (std::ostream & output,const Node & A)
48  {
49  output <<"node index ";
50  if(A.vertex == nullptr)
51  output<<"nil";
52  else
53  output<<A.vertex->index();
54  output<<" value "<< A.value;
55  return output;
56  }
57 
58  friend std::istream &operator>> (std::istream & input,Node & A) {
59  input >> A.value;
60  return input;
61  }
62 
63 public:
65  Node() { vertex = nullptr; value = 0; }
66 
67  void set_Node(node v,int a) { vertex = v; value = a; }
68  int get_value() const { return value; }
69  node get_node() const { return vertex; }
70 
71 private:
73  int value ;
74 };
75 
76 }
77 }
78 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
Graph.h
Includes declaration of graph class.
ogdf::energybased::fmmm::Node::set_Node
void set_Node(node v, int a)
Definition: Node.h:67
ogdf::whaType::A
@ A
ogdf::energybased::fmmm::Node
Data structure for representing nodes and an int value (needed for class ogdf/list) to perform bucket...
Definition: Node.h:43
ogdf::energybased::fmmm::Node::get_node
node get_node() const
Definition: Node.h:69
ogdf::energybased::fmmm::Node::value
int value
Definition: Node.h:73
ogdf::energybased::fmmm::Node::Node
Node()
Constructor.
Definition: Node.h:65
ogdf::energybased::fmmm::Node::operator>>
friend std::istream & operator>>(std::istream &input, Node &A)
Definition: Node.h:58
ogdf::energybased::fmmm::Node::get_value
int get_value() const
Definition: Node.h:68
ogdf::energybased::fmmm::Node::value
friend int value(const Node &A)
Definition: Node.h:45
ogdf::energybased::fmmm::Node::operator<<
friend std::ostream & operator<<(std::ostream &output, const Node &A)
Definition: Node.h:47
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:169
ogdf::energybased::fmmm::Node::vertex
node vertex
Definition: Node.h:72