dlvhex  2.5.0
SortElement< T > Struct Template Reference

Implements a pair of an index and an element. More...

#include <include/dlvhex2/Set.h>

Collaboration diagram for SortElement< T >:

Public Member Functions

 SortElement ()
 Constructor.
 SortElement (int i, T el)
 Constructor.
bool operator< (const SortElement< T > &el2) const
 Compares the index of el2 to the one in this object.
bool operator> (const SortElement< T > &el2) const
 Compares the index of el2 to the one in this object.
bool operator== (const SortElement< T > &el2) const
 Compares the index of el2 to the one in this object.
bool operator!= (const SortElement< T > &el2) const
 Compares the index of el2 to the one in this object.

Data Fields

long index
 Index.
elem
 Element.

Detailed Description

template<typename T>
struct SortElement< T >

Implements a pair of an index and an element.

Definition at line 514 of file Set.h.


Constructor & Destructor Documentation

template<typename T>
SortElement< T >::SortElement ( ) [inline]

Constructor.

Definition at line 522 of file Set.h.

template<typename T>
SortElement< T >::SortElement ( int  i,
el 
) [inline]

Constructor.

Parameters:
iSee SortElement::index.
elSee SortElement::elem.

Definition at line 528 of file Set.h.


Member Function Documentation

template<typename T>
bool SortElement< T >::operator!= ( const SortElement< T > &  el2) const [inline]

Compares the index of el2 to the one in this object.

Parameters:
el2Second SortElement.
Returns:
True if the index of this SortElement is not equal than the one in el2 and false otherwise.

Definition at line 559 of file Set.h.

References SortElement< T >::index.

template<typename T>
bool SortElement< T >::operator< ( const SortElement< T > &  el2) const [inline]

Compares the index of el2 to the one in this object.

Parameters:
el2Second SortElement.
Returns:
True if the index of this SortElement is smaller than the one in el2 and false otherwise.

Definition at line 534 of file Set.h.

References SortElement< T >::index.

template<typename T>
bool SortElement< T >::operator== ( const SortElement< T > &  el2) const [inline]

Compares the index of el2 to the one in this object.

Parameters:
el2Second SortElement.
Returns:
True if the index of this SortElement is equal than the one in el2 and false otherwise.

Definition at line 551 of file Set.h.

References SortElement< T >::index.

template<typename T>
bool SortElement< T >::operator> ( const SortElement< T > &  el2) const [inline]

Compares the index of el2 to the one in this object.

Parameters:
el2Second SortElement.
Returns:
True if the index of this SortElement is larger than the one in el2 and false otherwise.

Definition at line 542 of file Set.h.

References SortElement< T >::index.


Field Documentation

template<typename T>
T SortElement< T >::elem

Element.

Definition at line 519 of file Set.h.

template<typename T>
long SortElement< T >::index

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