Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

HashIterator2D.h
Go to the documentation of this file.
1 
34 #pragma once
35 
36 #include <ogdf/basic/tuples.h>
37 
38 namespace ogdf {
39 
40 
45 template<class I1_, class I2_, class E_, class Hash1_ = DefHashFunc<I1_>, class Hash2_ = DefHashFunc<I2_>>
47  : private HashConstIterator<Tuple2<I1_, I2_>, E_, HashFuncTuple<I1_, I2_, Hash1_, Hash2_>> {
48 public:
51 
54  : HashConstIterator<Tuple2<I1_, I2_>, E_, HashFuncTuple<I1_, I2_, Hash1_, Hash2_>>(it) { }
55 
59  : HashConstIterator<Tuple2<I1_, I2_>, E_, HashFuncTuple<I1_, I2_, Hash1_, Hash2_>>(it) { }
60 
65  it);
66  return *this;
67  }
68 
70  bool valid() const {
72  }
73 
75  const I1_& key1() const {
77  .x1();
78  }
79 
81  const I2_& key2() const {
83  .x2();
84  }
85 
87  const E_& info() const {
89  }
90 
94  return *this;
95  }
96 };
97 
98 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::HashConstIterator2D
Const-iterator for 2D-hash arrays.
Definition: HashIterator2D.h:46
ogdf::Tuple2
Tuples of two elements (2-tuples).
Definition: tuples.h:46
ogdf::HashConstIterator2D::valid
bool valid() const
Returns true iff the iterator points to an element.
Definition: HashIterator2D.h:70
ogdf::HashConstIterator2D::operator++
HashConstIterator2D< I1_, I2_, E_, Hash1_, Hash2_ > & operator++()
Sets the iterator to the next element in the 2D-hash array.
Definition: HashIterator2D.h:92
ogdf::HashFuncTuple
Definition: tuples.h:92
ogdf::HashConstIterator2D::HashConstIterator2D
HashConstIterator2D(const HashConstIterator< Tuple2< I1_, I2_ >, E_, HashFuncTuple< I1_, I2_, Hash1_, Hash2_ >> &it)
Copy constructor (from HashConstIterator).
Definition: HashIterator2D.h:57
ogdf::Tuple2::x2
const E2 & x2() const
Returns a reference the second element.
Definition: tuples.h:61
ogdf::HashConstIterator2D::operator=
HashConstIterator2D< I1_, I2_, E_, Hash1_, Hash2_ > & operator=(const HashConstIterator2D< I1_, I2_, E_, Hash1_, Hash2_ > &it)
Assignemnt operator.
Definition: HashIterator2D.h:62
ogdf::HashConstIterator2D::HashConstIterator2D
HashConstIterator2D()
Creates an (invalid) iterator.
Definition: HashIterator2D.h:50
ogdf::HashConstIterator2D::key1
const I1_ & key1() const
Returns the first key of the hash element pointed to.
Definition: HashIterator2D.h:75
ogdf::HashConstIterator2D::info
const E_ & info() const
Returns the information of the element pointed to.
Definition: HashIterator2D.h:87
ogdf::HashConstIterator< Tuple2< I1_, I2_ >, E_, HashFuncTuple< I1_, I2_, DefHashFunc< I1_ >, DefHashFunc< I2_ > > >::key
const Tuple2< I1_, I2_ > & key() const
Returns the key of the hash element pointed to.
Definition: Hashing.h:459
ogdf::HashConstIterator
Iterators for hash tables.
Definition: Hashing.h:202
ogdf::HashConstIterator2D::HashConstIterator2D
HashConstIterator2D(const HashConstIterator2D< I1_, I2_, E_, Hash1_, Hash2_ > &it)
Copy constructor.
Definition: HashIterator2D.h:53
ogdf::HashConstIterator2D::key2
const I2_ & key2() const
Returns the second key of the hash element pointed to.
Definition: HashIterator2D.h:81
ogdf::Tuple2::x1
const E1 & x1() const
Returns a reference the first element.
Definition: tuples.h:58
tuples.h
Declaration and implementation of class Tuple2, Tuple3 and Tuple4.