COMBINATORIAL_BLAS  1.6
IndexHolder< T > Class Template Reference

A small helper class used while sorting a pair of value and its index in an array/vector. More...

#include <indexHolder.h>

Public Member Functions

Constructors and Destructor
 IndexHolder ()
 
 IndexHolder (T v, unsigned long i)
 
 IndexHolder (const IndexHolder< T > &rhs)
 
 ~IndexHolder ()
 

Static Public Member Functions

static bool lessThan (const IndexHolder< T > &a, const IndexHolder< T > &b)
 

Public Attributes

unsigned long index
 
value
 

Overload Operators

IndexHolder< T > & operator= (const IndexHolder< T > &other)
 
bool operator< (IndexHolder< T > const &other) const
 
bool operator> (IndexHolder< T > const &other) const
 
bool operator<= (IndexHolder< T > const &other) const
 
bool operator>= (IndexHolder< T > const &other) const
 
bool operator== (IndexHolder< T > const &other) const
 
bool operator!= (IndexHolder< T > const &other) const
 
std::ostream & operator<< (std::ostream &os, const IndexHolder &dt)
 

Detailed Description

template<typename T>
class IndexHolder< T >

A small helper class used while sorting a pair of value and its index in an array/vector.

Definition at line 20 of file indexHolder.h.

Constructor & Destructor Documentation

◆ IndexHolder() [1/3]

template<typename T>
IndexHolder< T >::IndexHolder ( )
inline

Definition at line 27 of file indexHolder.h.

◆ IndexHolder() [2/3]

template<typename T>
IndexHolder< T >::IndexHolder ( v,
unsigned long  i 
)
inline

Definition at line 31 of file indexHolder.h.

◆ IndexHolder() [3/3]

template<typename T>
IndexHolder< T >::IndexHolder ( const IndexHolder< T > &  rhs)
inline

Definition at line 32 of file indexHolder.h.

◆ ~IndexHolder()

template<typename T>
IndexHolder< T >::~IndexHolder ( )
inline

Definition at line 37 of file indexHolder.h.

Member Function Documentation

◆ lessThan()

template<typename T>
static bool IndexHolder< T >::lessThan ( const IndexHolder< T > &  a,
const IndexHolder< T > &  b 
)
inlinestatic
Returns
a < b

Definition at line 46 of file indexHolder.h.

◆ operator!=()

template<typename T>
bool IndexHolder< T >::operator!= ( IndexHolder< T > const &  other) const
inline

Definition at line 99 of file indexHolder.h.

◆ operator<()

template<typename T>
bool IndexHolder< T >::operator< ( IndexHolder< T > const &  other) const
inline

Definition at line 67 of file indexHolder.h.

◆ operator<=()

template<typename T>
bool IndexHolder< T >::operator<= ( IndexHolder< T > const &  other) const
inline

Definition at line 81 of file indexHolder.h.

◆ operator=()

template<typename T>
IndexHolder<T>& IndexHolder< T >::operator= ( const IndexHolder< T > &  other)
inline

Definition at line 52 of file indexHolder.h.

◆ operator==()

template<typename T>
bool IndexHolder< T >::operator== ( IndexHolder< T > const &  other) const
inline

Definition at line 95 of file indexHolder.h.

◆ operator>()

template<typename T>
bool IndexHolder< T >::operator> ( IndexHolder< T > const &  other) const
inline

Definition at line 74 of file indexHolder.h.

◆ operator>=()

template<typename T>
bool IndexHolder< T >::operator>= ( IndexHolder< T > const &  other) const
inline

Definition at line 88 of file indexHolder.h.

Friends And Related Function Documentation

◆ operator<<

template<typename T>
std::ostream& operator<< ( std::ostream &  os,
const IndexHolder< T > &  dt 
)
friend

Definition at line 61 of file indexHolder.h.

Member Data Documentation

◆ index

template<typename T>
unsigned long IndexHolder< T >::index

Definition at line 22 of file indexHolder.h.

◆ value

template<typename T>
T IndexHolder< T >::value

Definition at line 23 of file indexHolder.h.


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