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 <ds.h>
Public Member Functions | |
TVVec () | |
TVVec (const TVVec &Vec) | |
TVVec (const int &_XDim, const int &_YDim) | |
TVVec (const TVec< TVal > &_ValV, const int &_XDim, const int &_YDim) | |
TVVec (TSIn &SIn) | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
TVVec< TVal > & | operator= (const TVVec< TVal > &Vec) |
bool | operator== (const TVVec &Vec) const |
bool | Empty () const |
void | Clr () |
void | Gen (const int &_XDim, const int &_YDim) |
int | GetXDim () const |
int | GetYDim () const |
int | GetRows () const |
int | GetCols () const |
TVec< TVal > & | Get1DVec () |
const TVal & | At (const int &X, const int &Y) const |
TVal & | At (const int &X, const int &Y) |
TVal & | operator() (const int &X, const int &Y) |
const TVal & | operator() (const int &X, const int &Y) const |
void | PutXY (const int &X, const int &Y, const TVal &Val) |
void | PutAll (const TVal &Val) |
void | PutX (const int &X, const TVal &Val) |
void | PutY (const int &Y, const TVal &Val) |
TVal | GetXY (const int &X, const int &Y) const |
void | GetRow (const int &RowN, TVec< TVal > &Vec) const |
void | GetCol (const int &ColN, TVec< TVal > &Vec) const |
void | SwapX (const int &X1, const int &X2) |
void | SwapY (const int &Y1, const int &Y2) |
void | Swap (TVVec< TVal > &Vec) |
void | ShuffleX (TRnd &Rnd) |
void | ShuffleY (TRnd &Rnd) |
void | GetMxValXY (int &X, int &Y) const |
void | CopyFrom (const TVVec< TVal > &VVec) |
void | AddXDim () |
void | AddYDim () |
void | DelX (const int &X) |
void | DelY (const int &Y) |
Private Attributes | |
TInt | XDim |
TInt | YDim |
TVec< TVal > | ValV |
Definition at line 3213 of file ds.h.
{ TVVec<TVal> NewVVec(XDim+1, YDim); NewVVec.CopyFrom(*this); *this=NewVVec; }
Definition at line 3220 of file ds.h.
{ TVVec<TVal> NewVVec(XDim, YDim+1); NewVVec.CopyFrom(*this); *this=NewVVec; }
Definition at line 3202 of file ds.h.
{ int CopyXDim=TInt::GetMn(GetXDim(), VVec.GetXDim()); int CopyYDim=TInt::GetMn(GetYDim(), VVec.GetYDim()); for (int X=0; X<CopyXDim; X++){ for (int Y=0; Y<CopyYDim; Y++){ At(X, Y)=VVec.At(X, Y); } } }
void TVVec< TVal >::GetMxValXY | ( | int & | X, |
int & | Y | ||
) | const |
TVal& TVVec< TVal >::operator() | ( | const int & | X, |
const int & | Y | ||
) | [inline] |
const TVal& TVVec< TVal >::operator() | ( | const int & | X, |
const int & | Y | ||
) | const [inline] |
Definition at line 3185 of file ds.h.
{ for (int X=0; X<XDim-1; X++){SwapX(X, X+Rnd.GetUniDevInt(XDim-X));} }
Definition at line 3190 of file ds.h.
{ for (int Y=0; Y<YDim-1; Y++){SwapY(Y, Y+Rnd.GetUniDevInt(YDim-Y));} }