SNAP Library 2.0, User Reference
2013-05-13 16:33:57
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 286 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 289 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 300 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]; } }