|
SNAP Library 2.2, User Reference
2014-03-11 19:15:55
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <ds.h>
Public Member Functions | |
| TTuple () | |
| TTuple (const TVal &InitVal) | |
| TTuple (const TTuple &Tup) | |
| TTuple (TSIn &SIn) | |
| void | Save (TSOut &SOut) const |
| void | Load (TSIn &SIn) |
| int | Len () const |
| TVal & | operator[] (const int &ValN) |
| const TVal & | operator[] (const int &ValN) const |
| TTuple & | operator= (const TTuple &Tup) |
| bool | operator== (const TTuple &Tup) const |
| bool | operator< (const TTuple &Tup) const |
| void | Sort (const bool &Asc=true) |
| int | FindMx () const |
| int | FindMn () const |
| int | GetPrimHashCd () const |
| int | GetSecHashCd () const |
| TStr | GetStr () const |
Private Attributes | |
| TVal | ValV [NVals] |
| int TTuple< TVal, NVals >::GetPrimHashCd | ( | ) | const [inline] |
Definition at line 288 of file ds.h.
{ int hc = 0;
for (int i = 0; i < NVals; i++) { hc = TPairHashImpl::GetHashCd(hc, ValV[i].GetPrimHashCd()); }
return hc; }
| int TTuple< TVal, NVals >::GetSecHashCd | ( | ) | const [inline] |
Definition at line 291 of file ds.h.
{ int hc = 0;
for (int i = 1; i < NVals; i++) { hc = TPairHashImpl::GetHashCd(hc, ValV[i].GetSecHashCd()); }
if (NVals > 0) { hc = TPairHashImpl::GetHashCd(hc, ValV[0].GetSecHashCd()); }
return hc; }
| TVal& TTuple< TVal, NVals >::operator[] | ( | const int & | ValN | ) | [inline] |
| const TVal& TTuple< TVal, NVals >::operator[] | ( | const int & | ValN | ) | const [inline] |
Definition at line 302 of file ds.h.
{
TVec<TVal, int> V(NVals);
for (int i=0; i<NVals; i++) { V.Add(ValV[i]); }
V.Sort(Asc);
for (int i=0; i<NVals; i++) { ValV[i] = V[i]; }
}