SNAP Library 2.4, Developer Reference
2015-05-11 19:40:56
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 1924 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 1931 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 1944 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 1995 of file ds.h.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::BegI(), TVec< TVal, TSizeTy >::Len(), and max.
|
inline |
Definition at line 1885 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 1858 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::MxVals.
|
inline |
Definition at line 1869 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 1866 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 1852 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::IdToOffV, and TVec< TVal, TSizeTy >::Len().
|
inline |
Definition at line 1863 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 1853 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 1845 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::TVecPool().
|
inlinestatic |
Definition at line 1846 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::Load().
Referenced by TGLib_OLD::TVecPool< TVal >::Load().
|
inlinestatic |
Definition at line 1843 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 1975 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 1890 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 1872 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 1855 of file ds.h.
References TGLib_OLD::TVecPool< TVal >::Resize().
|
inline |
Definition at line 1897 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 1962 of file ds.h.
References TSOut::Save().
|
inline |
Definition at line 2045 of file ds.h.
References TRnd::GetUniDevInt().
|
private |
|
private |
Definition at line 1833 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 1831 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 1832 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 1835 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 1832 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().