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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TVVec< TVal, TSizeTy > Class Template Reference

#include <ds.h>

Collaboration diagram for TVVec< TVal, TSizeTy >:

Public Member Functions

 TVVec ()
 
 TVVec (const TVVec &Vec)
 
 TVVec (const TSizeTy &_XDim, const TSizeTy &_YDim)
 
 TVVec (const TVec< TVal, TSizeTy > &_ValV, const TSizeTy &_XDim, const TSizeTy &_YDim)
 
 TVVec (TSIn &SIn)
 
void Load (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
TVVec< TVal, TSizeTy > & operator= (const TVVec< TVal, TSizeTy > &Vec)
 
bool operator== (const TVVec &Vec) const
 
bool Empty () const
 
void Clr ()
 
void Gen (const TSizeTy &_XDim, const TSizeTy &_YDim)
 
TSizeTy GetXDim () const
 
TSizeTy GetYDim () const
 
TSizeTy GetRows () const
 
TSizeTy GetCols () const
 
TVec< TVal, TSizeTy > & Get1DVec ()
 
const TVal & At (const TSizeTy &X, const TSizeTy &Y) const
 
TVal & At (const TSizeTy &X, const TSizeTy &Y)
 
TVal & operator() (const TSizeTy &X, const TSizeTy &Y)
 
const TVal & operator() (const TSizeTy &X, const TSizeTy &Y) const
 
void PutXY (const TSizeTy &X, const TSizeTy &Y, const TVal &Val)
 
void PutAll (const TVal &Val)
 
void PutX (const TSizeTy &X, const TVal &Val)
 
void PutY (const TSizeTy &Y, const TVal &Val)
 
TVal GetXY (const TSizeTy &X, const TSizeTy &Y) const
 
void GetRow (const TSizeTy &RowN, TVec< TVal, TSizeTy > &Vec) const
 
void GetCol (const TSizeTy &ColN, TVec< TVal, TSizeTy > &Vec) const
 
void SwapX (const TSizeTy &X1, const TSizeTy &X2)
 
void SwapY (const TSizeTy &Y1, const TSizeTy &Y2)
 
void Swap (TVVec< TVal, TSizeTy > &Vec)
 
void ShuffleX (TRnd &Rnd)
 
void ShuffleY (TRnd &Rnd)
 
void GetMxValXY (TSizeTy &X, TSizeTy &Y) const
 
void CopyFrom (const TVVec< TVal, TSizeTy > &VVec)
 
void AddXDim ()
 
void AddYDim ()
 
void DelX (const TSizeTy &X)
 
void DelY (const TSizeTy &Y)
 

Private Attributes

TInt64 XDim
 
TInt64 YDim
 
TVec< TVal, TSizeTy > ValV
 

Detailed Description

template<class TVal, class TSizeTy = int>
class TVVec< TVal, TSizeTy >

Definition at line 2222 of file ds.h.

Constructor & Destructor Documentation

template<class TVal, class TSizeTy = int>
TVVec< TVal, TSizeTy >::TVVec ( )
inline

Definition at line 2227 of file ds.h.

2227 : XDim(), YDim(), ValV(){}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
TVVec< TVal, TSizeTy >::TVVec ( const TVVec< TVal, TSizeTy > &  Vec)
inline

Definition at line 2228 of file ds.h.

2228  :
2229  XDim(Vec.XDim), YDim(Vec.YDim), ValV(Vec.ValV){}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
TVVec< TVal, TSizeTy >::TVVec ( const TSizeTy &  _XDim,
const TSizeTy &  _YDim 
)
inline

Definition at line 2230 of file ds.h.

2230  :
2231  XDim(), YDim(), ValV(){Gen(_XDim, _YDim);}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
void Gen(const TSizeTy &_XDim, const TSizeTy &_YDim)
Definition: ds.h:2246
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
TVVec< TVal, TSizeTy >::TVVec ( const TVec< TVal, TSizeTy > &  _ValV,
const TSizeTy &  _XDim,
const TSizeTy &  _YDim 
)
inlineexplicit

Definition at line 2232 of file ds.h.

2232  :
2233  XDim(_XDim), YDim(_YDim), ValV(_ValV){ IAssert(ValV.Len()==XDim*YDim); }
#define IAssert(Cond)
Definition: bd.h:262
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
TVVec< TVal, TSizeTy >::TVVec ( TSIn SIn)
inlineexplicit

Definition at line 2234 of file ds.h.

2234 {Load(SIn);}
void Load(TSIn &SIn)
Definition: ds.h:2235

Member Function Documentation

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::AddXDim ( )

Definition at line 2343 of file ds.h.

References TVVec< TVal, TSizeTy >::CopyFrom().

2343  {
2344  TVVec<TVal, TSizeTy> NewVVec(XDim+1, YDim);
2345  NewVVec.CopyFrom(*this);
2346  *this=NewVVec;
2347 }
Definition: ds.h:2222
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the call graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::AddYDim ( )

Definition at line 2350 of file ds.h.

References TVVec< TVal, TSizeTy >::CopyFrom().

2350  {
2351  TVVec<TVal, TSizeTy> NewVVec(XDim, YDim+1);
2352  NewVVec.CopyFrom(*this);
2353  *this=NewVVec;
2354 }
Definition: ds.h:2222
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
const TVal& TVVec< TVal, TSizeTy >::At ( const TSizeTy &  X,
const TSizeTy &  Y 
) const
inline

Definition at line 2255 of file ds.h.

Referenced by TMAGNodeSimple::AttrGen(), TMAGNodeBern::AttrGen(), TMAGNodeBeta::AttrGen(), CalcNonNegativeFactorization(), TMAGFitBern::ComputeJointAdjLL(), TMAGFitBern::ComputeJointLL(), TMAGFitBern::ComputeJointOneLL(), TVVec< TVal, TSizeTy >::CopyFrom(), TMom::DefVV(), TVVec< TVal, TSizeTy >::DelX(), TVVec< TVal, TSizeTy >::DelY(), TMAGFitBern::DoEMAlg(), TMAGFitBern::DoEStepApxOneIter(), TMAGFitBern::DoEStepOneIter(), TLinAlg::Gemm(), TMAGParam< TNodeAttr >::GenAttrMAG(), TMAGParam< TNodeAttr >::GenMAG(), TStr::GetDChStr(), TMAGFitBern::GetInCoeff(), TMAGFitBern::GetOutCoeff(), TMAGFitBern::GetProbMu(), TMAGFitBern::GetProbPhi(), TSnap::GetSngVals(), TSnap::GetSngVec(), TLinReg::GetXV(), TSvd::GetXV(), TLogRegFit::Hessian(), TLinAlg::InverseSVD(), TMom::IsUsableVV(), TMom::NewVV(), TLinReg::NR_covsrt(), TLinReg::NR_gaussj(), TLinReg::NR_lfit(), TSvd::NR_svbksb(), TSvd::NR_svdcmp(), TSvd::NR_svdfit(), TSvd::NR_svdvar(), TVVec< TFlt >::operator()(), TLAMisc::PrintTFltVV(), TVVec< TFlt >::PutX(), TVVec< TFlt >::PutXY(), TVVec< TFlt >::PutY(), TMAGFitBern::RandomInit(), TSvd::Svd(), TGraphKey::TakeSig(), TLinAlg::Transpose(), TMAGFitBern::UpdateApxPhiMI(), TMAGFitBern::UpdateMu(), TMAGFitBern::UpdatePhi(), and TMAGFitBern::UpdatePhiMI().

2255  {
2256  Assert((0<=X)&&(X<TSizeTy(XDim))&&(0<=Y)&&(Y<TSizeTy(YDim)));
2257  return ValV[X*YDim+Y];}
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TVal& TVVec< TVal, TSizeTy >::At ( const TSizeTy &  X,
const TSizeTy &  Y 
)
inline

Definition at line 2258 of file ds.h.

2258  {
2259  Assert((0<=X)&&(X<TSizeTy(XDim))&&(0<=Y)&&(Y<TSizeTy(YDim)));
2260  return ValV[X*YDim+Y];}
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::Clr ( )
inline

Definition at line 2245 of file ds.h.

Referenced by TMAGFitBern::Clr(), TMAGFitBern::ComputeJointLL(), TMAGFitBern::DoEStep(), TLAMisc::LoadMatlabTFltVV(), and TMAGFitBern::UpdateAffMtxV().

2245 {XDim=0; YDim=0; ValV.Clr();}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the caller graph for this function:

template<class TVal, class TSizeTy >
void TVVec< TVal, TSizeTy >::CopyFrom ( const TVVec< TVal, TSizeTy > &  VVec)

Definition at line 2332 of file ds.h.

References TVVec< TVal, TSizeTy >::At(), TVVec< TVal, TSizeTy >::GetXDim(), and TVVec< TVal, TSizeTy >::GetYDim().

Referenced by TVVec< TVal, TSizeTy >::AddXDim(), and TVVec< TVal, TSizeTy >::AddYDim().

2332  {
2333  TSizeTy CopyXDim = (GetXDim() < VVec.GetXDim()) ? GetXDim() : VVec.GetXDim();
2334  TSizeTy CopyYDim = (GetYDim() < VVec.GetYDim()) ? GetYDim() : VVec.GetYDim();
2335  for (TSizeTy X=0; X<CopyXDim; X++){
2336  for (TSizeTy Y=0; Y<CopyYDim; Y++){
2337  At(X, Y)=VVec.At(X, Y);
2338  }
2339  }
2340 }
TSizeTy GetYDim() const
Definition: ds.h:2250
TSizeTy GetXDim() const
Definition: ds.h:2249
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::DelX ( const TSizeTy &  X)

Definition at line 2357 of file ds.h.

References TVVec< TVal, TSizeTy >::At().

Referenced by TSvd::Svd(), and TSvd::Svd1Based().

2357  {
2358  TVVec<TVal, TSizeTy> NewVVec(XDim-1, YDim);
2359  for (TSizeTy Y=0; Y<YDim; Y++){
2360  for (TSizeTy LX=0; LX<X; LX++){
2361  NewVVec.At(LX, Y)=At(LX, Y);}
2362  for (TSizeTy RX=X+1; RX<XDim; RX++){
2363  NewVVec.At(RX-1, Y)=At(RX, Y);}
2364  }
2365  *this=NewVVec;
2366 }
Definition: ds.h:2222
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::DelY ( const TSizeTy &  Y)

Definition at line 2369 of file ds.h.

References TVVec< TVal, TSizeTy >::At().

Referenced by TSvd::Svd(), and TSvd::Svd1Based().

2369  {
2370  TVVec<TVal, TSizeTy> NewVVec(XDim, YDim-1);
2371  for (TSizeTy X=0; X<XDim; X++){
2372  for (TSizeTy LY=0; LY<Y; LY++){
2373  NewVVec.At(X, LY)=At(X, LY);}
2374  for (TSizeTy RY=Y+1; RY<YDim; RY++){
2375  NewVVec.At(X, RY-1)=At(X, RY);}
2376  }
2377  *this=NewVVec;
2378 }
Definition: ds.h:2222
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
bool TVVec< TVal, TSizeTy >::Empty ( ) const
inline

Definition at line 2244 of file ds.h.

Referenced by TStr::GetDChStr().

2244 {return ValV.Len()==0;}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::Gen ( const TSizeTy &  _XDim,
const TSizeTy &  _YDim 
)
inline
template<class TVal, class TSizeTy = int>
TVec<TVal, TSizeTy>& TVVec< TVal, TSizeTy >::Get1DVec ( )
inline

Definition at line 2253 of file ds.h.

2253 {return ValV;}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
template<class TVal, class TSizeTy >
void TVVec< TVal, TSizeTy >::GetCol ( const TSizeTy &  ColN,
TVec< TVal, TSizeTy > &  Vec 
) const

Definition at line 2389 of file ds.h.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

Referenced by TSnap::GetEigVec(), TSnap::GetInvParticipRat(), and TSnap::GetSngVec().

2389  {
2390  Vec.Gen(GetRows(), 0);
2391  for (TSizeTy row = 0; row < GetRows(); row++) {
2392  Vec.Add(At(row, ColN));
2393  }
2394 }
TSizeTy GetRows() const
Definition: ds.h:2251
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::GetMxValXY ( TSizeTy &  X,
TSizeTy &  Y 
) const

Definition at line 2325 of file ds.h.

2325  {
2326  TSizeTy MxValN=ValV.GetMxValN();
2327  Y=MxValN%YDim;
2328  X=MxValN/YDim;
2329 }
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy >
void TVVec< TVal, TSizeTy >::GetRow ( const TSizeTy &  RowN,
TVec< TVal, TSizeTy > &  Vec 
) const

Definition at line 2381 of file ds.h.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

Referenced by TMAGFitBern::UpdateApxPhiMI().

2381  {
2382  Vec.Gen(GetCols(), 0);
2383  for (TSizeTy col = 0; col < GetCols(); col++) {
2384  Vec.Add(At(RowN, col));
2385  }
2386 }
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602
TSizeTy GetCols() const
Definition: ds.h:2252
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TSizeTy TVVec< TVal, TSizeTy >::GetXDim ( ) const
inline
template<class TVal, class TSizeTy = int>
TVal TVVec< TVal, TSizeTy >::GetXY ( const TSizeTy &  X,
const TSizeTy &  Y 
) const
inline

Definition at line 2272 of file ds.h.

2272  {
2273  Assert((0<=X)&&(X<TSizeTy(XDim))&&(0<=Y)&&(Y<TSizeTy(YDim)));
2274  return ValV[X*YDim+Y];}
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::Load ( TSIn SIn)
inline

Definition at line 2235 of file ds.h.

Referenced by TVVec< TFlt >::TVVec().

2235 {XDim.Load(SIn); YDim.Load(SIn); ValV.Load(SIn);}
void Load(TSIn &SIn)
Definition: dt.h:903
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TVal& TVVec< TVal, TSizeTy >::operator() ( const TSizeTy &  X,
const TSizeTy &  Y 
)
inline

Definition at line 2261 of file ds.h.

2261  {
2262  return At(X, Y);}
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255
template<class TVal, class TSizeTy = int>
const TVal& TVVec< TVal, TSizeTy >::operator() ( const TSizeTy &  X,
const TSizeTy &  Y 
) const
inline

Definition at line 2263 of file ds.h.

2263  {
2264  return At(X, Y);}
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255
template<class TVal, class TSizeTy = int>
TVVec<TVal, TSizeTy>& TVVec< TVal, TSizeTy >::operator= ( const TVVec< TVal, TSizeTy > &  Vec)
inline

Definition at line 2239 of file ds.h.

2239  {
2240  if (this!=&Vec){XDim=Vec.XDim; YDim=Vec.YDim; ValV=Vec.ValV;} return *this;}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
bool TVVec< TVal, TSizeTy >::operator== ( const TVVec< TVal, TSizeTy > &  Vec) const
inline

Definition at line 2241 of file ds.h.

2241  {
2242  return (XDim==Vec.XDim)&&(YDim==Vec.YDim)&&(ValV==Vec.ValV);}
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::PutAll ( const TVal &  Val)
inline
template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::PutX ( const TSizeTy &  X,
const TVal &  Val 
)
inline

Definition at line 2268 of file ds.h.

2268  {
2269  for (TSizeTy Y=0; Y<TSizeTy(YDim); Y++){At(X, Y)=Val;}}
TInt64 YDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255
template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::PutXY ( const TSizeTy &  X,
const TSizeTy &  Y,
const TVal &  Val 
)
inline

Definition at line 2266 of file ds.h.

Referenced by node2vec().

2266 {At(X, Y)=Val;}
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::PutY ( const TSizeTy &  Y,
const TVal &  Val 
)
inline

Definition at line 2270 of file ds.h.

Referenced by TMAGFitBern::SetPhiVV().

2270  {
2271  for (TSizeTy X=0; X<TSizeTy(XDim); X++){At(X, Y)=Val;}}
TInt64 XDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
void TVVec< TVal, TSizeTy >::Save ( TSOut SOut) const
inline

Definition at line 2236 of file ds.h.

2236  {
2237  XDim.Save(SOut); YDim.Save(SOut); ValV.Save(SOut);}
void Save(TSOut &SOut) const
Definition: dt.h:904
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224
template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::ShuffleX ( TRnd Rnd)

Definition at line 2315 of file ds.h.

References TRnd::GetUniDevInt().

2315  {
2316  for (TSizeTy X=0; X<XDim-1; X++){SwapX(X, X+Rnd.GetUniDevInt(XDim-X));}
2317 }
void SwapX(const TSizeTy &X1, const TSizeTy &X2)
Definition: ds.h:2294
TInt64 XDim
Definition: ds.h:2224
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39

Here is the call graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::ShuffleY ( TRnd Rnd)

Definition at line 2320 of file ds.h.

References TRnd::GetUniDevInt().

2320  {
2321  for (TSizeTy Y=0; Y<YDim-1; Y++){SwapY(Y, Y+Rnd.GetUniDevInt(YDim-Y));}
2322 }
void SwapY(const TSizeTy &Y1, const TSizeTy &Y2)
Definition: ds.h:2300
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39
TInt64 YDim
Definition: ds.h:2224

Here is the call graph for this function:

template<class TVal, class TSizeTy >
void TVVec< TVal, TSizeTy >::Swap ( TVVec< TVal, TSizeTy > &  Vec)

Definition at line 2306 of file ds.h.

References Swap(), TVVec< TVal, TSizeTy >::ValV, TVVec< TVal, TSizeTy >::XDim, and TVVec< TVal, TSizeTy >::YDim.

2306  { //J:
2307  if (this!=&Vec){
2308  ::Swap(XDim, Vec.XDim);
2309  ::Swap(YDim, Vec.YDim);
2310  ValV.Swap(Vec.ValV);
2311  }
2312 }
void Swap(TVVec< TVal, TSizeTy > &Vec)
Definition: ds.h:2306
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2225
TInt64 XDim
Definition: ds.h:2224
TInt64 YDim
Definition: ds.h:2224

Here is the call graph for this function:

template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::SwapX ( const TSizeTy &  X1,
const TSizeTy &  X2 
)

Definition at line 2294 of file ds.h.

2294  {
2295  for (TSizeTy Y=0; Y<TSizeTy(YDim); Y++){
2296  TVal Val=At(X1, Y); At(X1, Y)=At(X2, Y); At(X2, Y)=Val;}
2297 }
TInt64 YDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255
template<class TVal , class TSizeTy >
void TVVec< TVal, TSizeTy >::SwapY ( const TSizeTy &  Y1,
const TSizeTy &  Y2 
)

Definition at line 2300 of file ds.h.

2300  {
2301  for (TSizeTy X=0; X<TSizeTy(XDim); X++){
2302  TVal Val=At(X, Y1); At(X, Y1)=At(X, Y2); At(X, Y2)=Val;}
2303 }
TInt64 XDim
Definition: ds.h:2224
const TVal & At(const TSizeTy &X, const TSizeTy &Y) const
Definition: ds.h:2255

Member Data Documentation


The documentation for this class was generated from the following file: