Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::HashElement< K, I > Class Template Reference

Representation of elements in a hash table. More...

#include <ogdf/basic/Hashing.h>

+ Inheritance diagram for ogdf::HashElement< K, I >:

Public Member Functions

 HashElement (size_t hashValue, const K &key, const I &info)
 Creates a hash element with given hash value, key, and information.
 
I & info ()
 Returns a refeence to the information value.
 
const I & info () const
 Returns the information value.
 
const Kkey () const
 Returns the key value.
 
HashElement< K, I > * next () const
 Returns the successor element in the list.
 
- Public Member Functions inherited from ogdf::HashElementBase
 HashElementBase (size_t hashValue)
 Creates a hash element with hash value hashValue.
 
size_t hashValue () const
 Returns the hash value of this element.
 
HashElementBasenext () const
 Returns the successor to this element in the list.
 

Private Attributes

m_info
 The information value.
 
K m_key
 The key value.
 

Detailed Description

template<class K, class I>
class ogdf::HashElement< K, I >

Representation of elements in a hash table.

This class adds key and information members to HashElementBase. The two template parameters are K for the type of keys and I for the type of information.

Definition at line 176 of file Hashing.h.

Constructor & Destructor Documentation

◆ HashElement()

template<class K , class I >
ogdf::HashElement< K, I >::HashElement ( size_t  hashValue,
const K key,
const I &  info 
)
inline

Creates a hash element with given hash value, key, and information.

Definition at line 182 of file Hashing.h.

Member Function Documentation

◆ info() [1/2]

template<class K , class I >
I & ogdf::HashElement< K, I >::info ( )
inline

Returns a refeence to the information value.

Definition at line 195 of file Hashing.h.

◆ info() [2/2]

template<class K , class I >
const I & ogdf::HashElement< K, I >::info ( ) const
inline

Returns the information value.

Definition at line 192 of file Hashing.h.

◆ key()

template<class K , class I >
const K & ogdf::HashElement< K, I >::key ( ) const
inline

Returns the key value.

Definition at line 189 of file Hashing.h.

◆ next()

template<class K , class I >
HashElement< K, I > * ogdf::HashElement< K, I >::next ( ) const
inline

Returns the successor element in the list.

Definition at line 186 of file Hashing.h.

Member Data Documentation

◆ m_info

template<class K , class I >
I ogdf::HashElement< K, I >::m_info
private

The information value.

Definition at line 178 of file Hashing.h.

◆ m_key

template<class K , class I >
K ogdf::HashElement< K, I >::m_key
private

The key value.

Definition at line 177 of file Hashing.h.


The documentation for this class was generated from the following file: