SNAP Library 2.0, Developer Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
THash< TKey, TDat, THashFunc >::THashKeyDatCmp Class Reference

List of all members.

Public Member Functions

 THashKeyDatCmp (THash< TKey, TDat, THashFunc > &_Hash, const bool &_CmpKey, const bool &_Asc)
bool operator() (const int &KeyId1, const int &KeyId2) const

Public Attributes

const THash< TKey, TDat,
THashFunc > & 
Hash
bool CmpKey
bool Asc

Detailed Description

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
class THash< TKey, TDat, THashFunc >::THashKeyDatCmp

Definition at line 102 of file hash.h.


Constructor & Destructor Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THash< TKey, TDat, THashFunc >::THashKeyDatCmp::THashKeyDatCmp ( THash< TKey, TDat, THashFunc > &  _Hash,
const bool &  _CmpKey,
const bool &  _Asc 
) [inline]

Definition at line 106 of file hash.h.

                                                                                               :
      Hash(_Hash), CmpKey(_CmpKey), Asc(_Asc) { }

Member Function Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::THashKeyDatCmp::operator() ( const int &  KeyId1,
const int &  KeyId2 
) const [inline]

Definition at line 108 of file hash.h.

References THash< TKey, TDat, THashFunc >::THashKeyDatCmp::Asc, THash< TKey, TDat, THashFunc >::THashKeyDatCmp::CmpKey, and THash< TKey, TDat, THashFunc >::THashKeyDatCmp::Hash.

                                                                  {
      if (CmpKey) {
        if (Asc) { return Hash.GetKey(KeyId1) < Hash.GetKey(KeyId2); }
        else { return Hash.GetKey(KeyId2) < Hash.GetKey(KeyId1); } }
      else {
        if (Asc) { return Hash[KeyId1] < Hash[KeyId2]; }
        else { return Hash[KeyId2] < Hash[KeyId1]; } } }

Member Data Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::THashKeyDatCmp::Asc

Definition at line 105 of file hash.h.

Referenced by THash< TKey, TDat, THashFunc >::THashKeyDatCmp::operator()().

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::THashKeyDatCmp::CmpKey

Definition at line 105 of file hash.h.

Referenced by THash< TKey, TDat, THashFunc >::THashKeyDatCmp::operator()().

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const THash<TKey, TDat, THashFunc>& THash< TKey, TDat, THashFunc >::THashKeyDatCmp::Hash

Definition at line 104 of file hash.h.

Referenced by THash< TKey, TDat, THashFunc >::THashKeyDatCmp::operator()().


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