Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ogdf::Prioritized< X, Priority > Class Template Reference

Augments any data elements of type X with keys of type Priority. This class is also its own Comparer. More...

#include <ogdf/basic/comparer.h>

Public Member Functions

 Prioritized ()
 Constructor of empty element. Be careful!
 
 Prioritized (const Prioritized &P)=default
 Copy-constructor.
 
 Prioritized (X xt, Priority pt)
 Constructor using a key/value pair.
 
item () const
 Returns the data of the element.
 
bool operator!= (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
bool operator< (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
bool operator<= (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
Prioritizedoperator= (const Prioritized< X, Priority > &P)=default
 Copy assignment operator.
 
bool operator== (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
bool operator> (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
bool operator>= (const Prioritized< X, Priority > &P) const
 Comparison oprator based on the compare-operator for the key type (Priority)
 
Priority priority () const
 Returns the key of the element.
 
void setItem (X item)
 Sets value x.
 
void setPriority (Priority pp)
 Sets priority.
 

Private Attributes

Priority p
 
x
 

Detailed Description

template<class X, class Priority = double>
class ogdf::Prioritized< X, Priority >

Augments any data elements of type X with keys of type Priority. This class is also its own Comparer.

Also defines comparator function using the keys. This class is intended as a helpful convenience class for using with BinaryHeapSimple, Top10Heap,..

Definition at line 291 of file comparer.h.

Constructor & Destructor Documentation

◆ Prioritized() [1/3]

template<class X , class Priority = double>
ogdf::Prioritized< X, Priority >::Prioritized ( )
inline

Constructor of empty element. Be careful!

Definition at line 297 of file comparer.h.

◆ Prioritized() [2/3]

template<class X , class Priority = double>
ogdf::Prioritized< X, Priority >::Prioritized ( xt,
Priority  pt 
)
inline

Constructor using a key/value pair.

Definition at line 300 of file comparer.h.

◆ Prioritized() [3/3]

template<class X , class Priority = double>
ogdf::Prioritized< X, Priority >::Prioritized ( const Prioritized< X, Priority > &  P)
default

Copy-constructor.

Member Function Documentation

◆ item()

template<class X , class Priority = double>
X ogdf::Prioritized< X, Priority >::item ( ) const
inline

Returns the data of the element.

Definition at line 309 of file comparer.h.

◆ operator!=()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator!= ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 336 of file comparer.h.

◆ operator<()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator< ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 321 of file comparer.h.

◆ operator<=()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator<= ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 324 of file comparer.h.

◆ operator=()

template<class X , class Priority = double>
Prioritized & ogdf::Prioritized< X, Priority >::operator= ( const Prioritized< X, Priority > &  P)
default

Copy assignment operator.

◆ operator==()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator== ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 333 of file comparer.h.

◆ operator>()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator> ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 327 of file comparer.h.

◆ operator>=()

template<class X , class Priority = double>
bool ogdf::Prioritized< X, Priority >::operator>= ( const Prioritized< X, Priority > &  P) const
inline

Comparison oprator based on the compare-operator for the key type (Priority)

Definition at line 330 of file comparer.h.

◆ priority()

template<class X , class Priority = double>
Priority ogdf::Prioritized< X, Priority >::priority ( ) const
inline

Returns the key of the element.

Definition at line 306 of file comparer.h.

◆ setItem()

template<class X , class Priority = double>
void ogdf::Prioritized< X, Priority >::setItem ( item)
inline

Sets value x.

Definition at line 315 of file comparer.h.

◆ setPriority()

template<class X , class Priority = double>
void ogdf::Prioritized< X, Priority >::setPriority ( Priority  pp)
inline

Sets priority.

Definition at line 312 of file comparer.h.

Member Data Documentation

◆ p

template<class X , class Priority = double>
Priority ogdf::Prioritized< X, Priority >::p
private

Definition at line 293 of file comparer.h.

◆ x

template<class X , class Priority = double>
X ogdf::Prioritized< X, Priority >::x
private

Definition at line 292 of file comparer.h.


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