SNAP Library 4.1, Developer Reference  2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TCmpTripleByVal3< TVal1, TVal2, TVal3 > Class Template Reference

Compares the triple by the third value. More...

#include <ds.h>

Public Member Functions

 TCmpTripleByVal3 (const bool &AscSort=true)
 
bool operator() (const TTriple< TVal1, TVal2, TVal3 > &T1, const TTriple< TVal1, TVal2, TVal3 > &T2) const
 

Private Attributes

bool IsAsc
 

Detailed Description

template<class TVal1, class TVal2, class TVal3>
class TCmpTripleByVal3< TVal1, TVal2, TVal3 >

Compares the triple by the third value.

Definition at line 206 of file ds.h.

Constructor & Destructor Documentation

template<class TVal1 , class TVal2 , class TVal3 >
TCmpTripleByVal3< TVal1, TVal2, TVal3 >::TCmpTripleByVal3 ( const bool &  AscSort = true)
inline

Definition at line 210 of file ds.h.

210 : IsAsc(AscSort) { }
bool IsAsc
Definition: ds.h:208

Member Function Documentation

template<class TVal1 , class TVal2 , class TVal3 >
bool TCmpTripleByVal3< TVal1, TVal2, TVal3 >::operator() ( const TTriple< TVal1, TVal2, TVal3 > &  T1,
const TTriple< TVal1, TVal2, TVal3 > &  T2 
) const
inline

Definition at line 211 of file ds.h.

References TCmpTripleByVal3< TVal1, TVal2, TVal3 >::IsAsc, and TTriple< TVal1, TVal2, TVal3 >::Val3.

211  {
212  if (IsAsc) { return T1.Val3 < T2.Val3; } else { return T2.Val3 < T1.Val3; }
213  }
bool IsAsc
Definition: ds.h:208
TVal3 Val3
Definition: ds.h:134

Member Data Documentation

template<class TVal1 , class TVal2 , class TVal3 >
bool TCmpTripleByVal3< TVal1, TVal2, TVal3 >::IsAsc
private

Definition at line 208 of file ds.h.

Referenced by TCmpTripleByVal3< TVal1, TVal2, TVal3 >::operator()().


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