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
TCmpTripleByVal2< TVal1, TVal2, TVal3 > Class Template Reference

Compares the triple by the second value. More...

#include <ds.h>

List of all members.

Public Member Functions

 TCmpTripleByVal2 (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 TCmpTripleByVal2< TVal1, TVal2, TVal3 >

Compares the triple by the second value.

Definition at line 186 of file ds.h.


Constructor & Destructor Documentation

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

Definition at line 190 of file ds.h.

: IsAsc(AscSort) { }

Member Function Documentation

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

Definition at line 191 of file ds.h.

References TCmpTripleByVal2< TVal1, TVal2, TVal3 >::IsAsc, and TTriple< TVal1, TVal2, TVal3 >::Val2.

                                                                                                          {
    if (IsAsc) { return T1.Val2 < T2.Val2; } else { return T2.Val2 < T1.Val2; }
  }

Member Data Documentation

template<class TVal1 , class TVal2 , class TVal3 >
bool TCmpTripleByVal2< TVal1, TVal2, TVal3 >::IsAsc [private]

Definition at line 188 of file ds.h.

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


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