|
SNAP Library 2.1, User Reference
2013-09-25 10:47:25
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.
{
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] |
TGStatVal TGStat::TCmpByVal::ValCmp [private] |