SNAP Library 4.0, Developer Reference
2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <ds.h>
Public Types | |
typedef TPt< TVecPool< TVal > > | PVecPool |
typedef TVec< TVal > | TValV |
Public Member Functions | |
TVecPool (const ::TSize &ExpectVals=0, const ::TSize &_GrowBy=1000000, const bool &_FastCopy=false, const TVal &_EmptyVal=TVal()) | |
TVecPool (const TVecPool &Pool) | |
TVecPool (TSIn &SIn) | |
~TVecPool () | |
void | Save (TSOut &SOut) const |
TVecPool & | operator= (const TVecPool &Pool) |
::TSize | GetVals () const |
::TSize | GetVecs () const |
bool | IsVId (const int &VId) const |
::TSize | Reserved () const |
void | Reserve (const ::TSize &MxVals) |
const TVal & | GetEmptyVal () const |
void | SetEmptyVal (const TVal &_EmptyVal) |
::TSize | GetMemUsed () const |
int | AddV (const TValV &ValV) |
int | AddEmptyV (const int &ValVLen) |
uint | GetVLen (const int &VId) const |
TVal * | GetValVPt (const int &VId) const |
void | GetV (const int &VId, TValV &ValV) const |
void | PutV (const int &VId, const TValV &ValV) |
void | CompactPool (const TVal &DelVal) |
void | ShuffleAll (TRnd &Rnd=TInt::Rnd) |
void | Clr (bool DoDel=true) |
void | PutAll (const TVal &Val) |
Static Public Member Functions | |
static PVecPool | New (const ::TSize &ExpectVals=0, const ::TSize &GrowBy=1000000, const bool &FastCopy=false) |
static PVecPool | Load (TSIn &SIn) |
static PVecPool | Load (const TStr &FNm) |
Private Member Functions | |
void | Resize (const ::TSize &_MxVals) |
Private Attributes | |
TCRef | CRef |
TBool | FastCopy |
::TSize | GrowBy |
::TSize | MxVals |
::TSize | Vals |
TVal | EmptyVal |
TVal * | ValBf |
TVec< ::TSize > | IdToOffV |
Friends | |
class | TPt< TVecPool< TVal > > |
typedef TPt<TVecPool<TVal> > TGLib_OLD::TVecPool< TVal >::PVecPool |
typedef TVec<TVal> TGLib_OLD::TVecPool< TVal >::TValV |
TVecPool< TVal >::TVecPool | ( | const ::TSize & | ExpectVals = 0 , |
const ::TSize & | _GrowBy = 1000000 , |
||
const bool & | _FastCopy = false , |
||
const TVal & | _EmptyVal = TVal() |
||
) |
Definition at line 2037 of file ds.h.
References TVec< TVal, TSizeTy >::Add(), TGLib_OLD::TVecPool< TVal >::IdToOffV, and TGLib_OLD::TVecPool< TVal >::Resize().
Referenced by TGLib_OLD::TVecPool< TVal >::Load(), and TGLib_OLD::TVecPool< TVal >::New().
Definition at line 2044 of file ds.h.
References FailR, TGLib_OLD::TVecPool< TVal >::FastCopy, TStr::Fmt(), IAssert, TGLib_OLD::TVecPool< TVal >::MxVals, and TGLib_OLD::TVecPool< TVal >::ValBf.
Definition at line 2057 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::EmptyVal, TVec< TVal, TSizeTy >::Gen(), TGLib_OLD::TVecPool< TVal >::GrowBy, IAssert, TGLib_OLD::TVecPool< TVal >::IdToOffV, TSIn::Load(), TGLib_OLD::TVecPool< TVal >::MxVals, TSizeMx, TGLib_OLD::TVecPool< TVal >::ValBf, and TGLib_OLD::TVecPool< TVal >::Vals.
|
inline |
int TVecPool< TVal >::AddEmptyV | ( | const int & | ValVLen | ) |
Definition at line 2108 of file ds.h.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::BegI(), TVec< TVal, TSizeTy >::Len(), and MAX.
|
inline |
Definition at line 1998 of file ds.h.
References TVec< TVal, TSizeTy >::Clr(), TGLib_OLD::TVecPool< TVal >::EmptyVal, TGLib_OLD::TVecPool< TVal >::IdToOffV, TGLib_OLD::TVecPool< TVal >::MxVals, TGLib_OLD::TVecPool< TVal >::PutAll(), TGLib_OLD::TVecPool< TVal >::ValBf, and TGLib_OLD::TVecPool< TVal >::Vals.
void TVecPool< TVal >::CompactPool | ( | const TVal & | DelVal | ) |
|
inline |
|
inline |
Definition at line 1971 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::MxVals.
|
inline |
Definition at line 1982 of file ds.h.
References TVec< TVal, TSizeTy >::Clr(), TVec< TVal, TSizeTy >::GenExt(), TGLib_OLD::TVecPool< TVal >::GetValVPt(), and TGLib_OLD::TVecPool< TVal >::GetVLen().
|
inline |
|
inline |
Definition at line 1979 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::EmptyVal, TGLib_OLD::TVecPool< TVal >::GetVLen(), TGLib_OLD::TVecPool< TVal >::IdToOffV, and TGLib_OLD::TVecPool< TVal >::ValBf.
Referenced by TGLib_OLD::TVecPool< TVal >::GetV(), and TGLib_OLD::TVecPool< TVal >::PutV().
|
inline |
Definition at line 1965 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::IdToOffV, and TVec< TVal, TSizeTy >::Len().
|
inline |
Definition at line 1976 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::IdToOffV.
Referenced by TGLib_OLD::TVecPool< TVal >::GetV(), TGLib_OLD::TVecPool< TVal >::GetValVPt(), and TGLib_OLD::TVecPool< TVal >::PutV().
|
inline |
Definition at line 1966 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::IdToOffV, and TVec< TVal, TSizeTy >::Len().
Referenced by TGLib_OLD::TVecPool< TVal >::PutV().
|
inlinestatic |
Definition at line 1958 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::TVecPool().
|
inlinestatic |
Definition at line 1959 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::Load().
Referenced by TGLib_OLD::TVecPool< TVal >::Load().
|
inlinestatic |
Definition at line 1956 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::FastCopy, TGLib_OLD::TVecPool< TVal >::GrowBy, and TGLib_OLD::TVecPool< TVal >::TVecPool().
TVecPool< TVal > & TVecPool< TVal >::operator= | ( | const TVecPool< TVal > & | Pool | ) |
Definition at line 2088 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::EmptyVal, FailR, TGLib_OLD::TVecPool< TVal >::FastCopy, TStr::Fmt(), TGLib_OLD::TVecPool< TVal >::GrowBy, IAssert, TGLib_OLD::TVecPool< TVal >::IdToOffV, TGLib_OLD::TVecPool< TVal >::MxVals, TGLib_OLD::TVecPool< TVal >::ValBf, and TGLib_OLD::TVecPool< TVal >::Vals.
|
inline |
Definition at line 2003 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::MxVals, and TGLib_OLD::TVecPool< TVal >::ValBf.
Referenced by TGLib_OLD::TVecPool< TVal >::Clr().
|
inline |
Definition at line 1985 of file ds.h.
References TVec< TVal, TSizeTy >::BegI(), TGLib_OLD::TVecPool< TVal >::FastCopy, TGLib_OLD::TVecPool< TVal >::GetValVPt(), TGLib_OLD::TVecPool< TVal >::GetVLen(), IAssert, TGLib_OLD::TVecPool< TVal >::IsVId(), and TVec< TVal, TSizeTy >::Len().
|
inline |
Definition at line 1968 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::Resize().
|
inline |
Definition at line 2010 of file ds.h.
References FailR, TStr::Fmt(), and IAssert.
Referenced by TGLib_OLD::TVecPool< TVal >::Reserve(), and TGLib_OLD::TVecPool< TVal >::TVecPool().
Definition at line 2075 of file ds.h.
References TSOut::Save().
|
inline |
Definition at line 2158 of file ds.h.
References TRnd::GetUniDevInt().
|
private |
|
private |
Definition at line 1946 of file ds.h.
Referenced by TGLib_OLD::TVecPool< TVal >::Clr(), TGLib_OLD::TVecPool< TVal >::GetEmptyVal(), TGLib_OLD::TVecPool< TVal >::GetValVPt(), TGLib_OLD::TVecPool< TVal >::operator=(), TGLib_OLD::TVecPool< TVal >::SetEmptyVal(), and TGLib_OLD::TVecPool< TVal >::TVecPool().
|
private |
Definition at line 1944 of file ds.h.
Referenced by TGLib_OLD::TVecPool< TVal >::New(), TGLib_OLD::TVecPool< TVal >::operator=(), TGLib_OLD::TVecPool< TVal >::PutV(), and TGLib_OLD::TVecPool< TVal >::TVecPool().
|
private |
Definition at line 1945 of file ds.h.
Referenced by TGLib_OLD::TVecPool< TVal >::New(), TGLib_OLD::TVecPool< TVal >::operator=(), and TGLib_OLD::TVecPool< TVal >::TVecPool().
|
private |
Definition at line 1948 of file ds.h.
Referenced by TGLib_OLD::TVecPool< TVal >::Clr(), TGLib_OLD::TVecPool< TVal >::GetValVPt(), TGLib_OLD::TVecPool< TVal >::GetVecs(), TGLib_OLD::TVecPool< TVal >::GetVLen(), TGLib_OLD::TVecPool< TVal >::IsVId(), TGLib_OLD::TVecPool< TVal >::operator=(), and TGLib_OLD::TVecPool< TVal >::TVecPool().
|
private |
|
private |
|
private |
Definition at line 1945 of file ds.h.
Referenced by TGLib_OLD::TVecPool< TVal >::Clr(), TGLib_OLD::TVecPool< TVal >::GetVals(), TGLib_OLD::TVecPool< TVal >::operator=(), and TGLib_OLD::TVecPool< TVal >::TVecPool().