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
|
#include <gstat.h>
Public Member Functions | |
TCmpByVal (TGStatVal SortBy, bool Asc) | |
bool | operator() (const TGStat &GS1, const TGStat &GS2) const |
bool | operator() (const PGStat &GS1, const PGStat &GS2) const |
Private Attributes | |
TGStatVal | ValCmp |
bool | SortAsc |
TGStat::TCmpByVal::TCmpByVal | ( | TGStatVal | SortBy, |
bool | Asc | ||
) | [inline] |
Definition at line 7 of file gstat.cpp.
References TStr::CStr(), TStr::Fmt(), TGStat::GetVal(), TGStat::GetValStr(), gsvTime, TGStat::HasVal(), IAssertR, SortAsc, TGStat::Time, and ValCmp.
{ IAssertR(GS1.HasVal(ValCmp) && GS2.HasVal(ValCmp), TStr::Fmt("CmpVal: %d (%s)", int(ValCmp), TGStat::GetValStr(ValCmp).CStr()).CStr()); bool Res; if (ValCmp == gsvTime) { Res = GS1.Time < GS2.Time; } else { Res = GS1.GetVal(ValCmp) < GS2.GetVal(ValCmp); } if (SortAsc) { return Res; } else { return ! Res; } }
Definition at line 17 of file gstat.cpp.
{ return operator()(*GS1, *GS2); }
bool TGStat::TCmpByVal::SortAsc [private] |
Definition at line 44 of file gstat.h.
Referenced by operator()().
TGStatVal TGStat::TCmpByVal::ValCmp [private] |
Definition at line 43 of file gstat.h.
Referenced by operator()().