SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TVVVec< TVal, TSizeTy > Class Template Reference

#include <ds.h>

Collaboration diagram for TVVVec< TVal, TSizeTy >:

Public Member Functions

 TVVVec ()
 
 TVVVec (const TVVVec &Vec)
 
 TVVVec (const TSizeTy &_XDim, const TSizeTy &_YDim, const TSizeTy &_ZDim)
 
 TVVVec (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
TVVVec< TVal, TSizeTy > & operator= (const TVVVec< TVal, TSizeTy > &Vec)
 
bool operator== (const TVVVec &Vec) const
 
bool Empty () const
 
void Clr ()
 
void Gen (const TSizeTy &_XDim, const TSizeTy &_YDim, const TSizeTy &_ZDim)
 
TVal & At (const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z)
 
const TVal & At (const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z) const
 
TVal & operator() (const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z)
 
const TVal & operator() (const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z) const
 
TSizeTy GetXDim () const
 
TSizeTy GetYDim () const
 
TSizeTy GetZDim () const
 

Private Attributes

TInt64 XDim
 
TInt64 YDim
 
TInt64 ZDim
 
TVec< TVal, TSizeTy > ValV
 

Detailed Description

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

Definition at line 2410 of file ds.h.

Constructor & Destructor Documentation

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

Definition at line 2415 of file ds.h.

2415 : XDim(), YDim(), ZDim(), ValV(){}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
template<class TVal, class TSizeTy = int>
TVVVec< TVal, TSizeTy >::TVVVec ( const TVVVec< TVal, TSizeTy > &  Vec)
inline

Definition at line 2416 of file ds.h.

2416  :
2417  XDim(Vec.XDim), YDim(Vec.YDim), ZDim(Vec.ZDim), ValV(Vec.ValV){}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
template<class TVal, class TSizeTy = int>
TVVVec< TVal, TSizeTy >::TVVVec ( const TSizeTy &  _XDim,
const TSizeTy &  _YDim,
const TSizeTy &  _ZDim 
)
inline

Definition at line 2418 of file ds.h.

References TVVVec< TVal, TSizeTy >::Gen().

2418  :
2419  XDim(), YDim(), ZDim(), ValV(){Gen(_XDim, _YDim, _ZDim);}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
void Gen(const TSizeTy &_XDim, const TSizeTy &_YDim, const TSizeTy &_ZDim)
Definition: ds.h:2435

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
TVVVec< TVal, TSizeTy >::TVVVec ( TSIn SIn)
inlineexplicit

Definition at line 2420 of file ds.h.

2420  :
2421  XDim(SIn), YDim(SIn), ZDim(SIn), ValV(SIn){}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413

Member Function Documentation

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

Definition at line 2438 of file ds.h.

References Assert.

Referenced by TVVVec< TVal, TSizeTy >::operator()().

2438  {
2439  Assert((0<=X)&&(X<TSizeTy(XDim))&&(0<=Y)&&(Y<TSizeTy(YDim))&&(0<=Z)&&(Z<TSizeTy(ZDim)));
2440  return ValV[X*YDim*ZDim+Y*ZDim+Z];}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413

Here is the caller graph for this function:

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

Definition at line 2441 of file ds.h.

References Assert.

2441  {
2442  Assert((0<=X)&&(X<TSizeTy(XDim))&&(0<=Y)&&(Y<TSizeTy(YDim))&&(0<=Z)&&(Z<TSizeTy(ZDim)));
2443  return ValV[X*YDim*ZDim+Y*ZDim+Z];}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
template<class TVal, class TSizeTy = int>
void TVVVec< TVal, TSizeTy >::Clr ( )
inline

Definition at line 2434 of file ds.h.

References TVec< TVal, TSizeTy >::Clr().

2434 {XDim=0; YDim=0; ZDim=0; ValV.Clr();}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413

Here is the call graph for this function:

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

Definition at line 2433 of file ds.h.

References TVec< TVal, TSizeTy >::Len().

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

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
void TVVVec< TVal, TSizeTy >::Gen ( const TSizeTy &  _XDim,
const TSizeTy &  _YDim,
const TSizeTy &  _ZDim 
)
inline

Definition at line 2435 of file ds.h.

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

Referenced by TVVVec< TVal, TSizeTy >::TVVVec().

2435  {
2436  Assert((_XDim>=0)&&(_YDim>=0)&&(_ZDim>=0));
2437  XDim=_XDim; YDim=_YDim; ZDim=_ZDim; ValV.Gen(XDim*YDim*ZDim);}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
#define Assert(Cond)
Definition: bd.h:251
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TVal, class TSizeTy = int>
TSizeTy TVVVec< TVal, TSizeTy >::GetXDim ( ) const
inline

Definition at line 2448 of file ds.h.

References TVVVec< TVal, TSizeTy >::XDim.

2448 {return XDim;}
TInt64 XDim
Definition: ds.h:2412
template<class TVal, class TSizeTy = int>
TSizeTy TVVVec< TVal, TSizeTy >::GetYDim ( ) const
inline

Definition at line 2449 of file ds.h.

References TVVVec< TVal, TSizeTy >::YDim.

2449 {return YDim;}
TInt64 YDim
Definition: ds.h:2412
template<class TVal, class TSizeTy = int>
TSizeTy TVVVec< TVal, TSizeTy >::GetZDim ( ) const
inline

Definition at line 2450 of file ds.h.

References TVVVec< TVal, TSizeTy >::ZDim.

2450 {return ZDim;}
TInt64 ZDim
Definition: ds.h:2412
template<class TVal, class TSizeTy = int>
TVal& TVVVec< TVal, TSizeTy >::operator() ( const TSizeTy &  X,
const TSizeTy &  Y,
const TSizeTy &  Z 
)
inline

Definition at line 2444 of file ds.h.

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

2444  {
2445  return At(X, Y, Z);}
TVal & At(const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z)
Definition: ds.h:2438

Here is the call graph for this function:

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

Definition at line 2446 of file ds.h.

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

2446  {
2447  return At(X, Y, Z);}
TVal & At(const TSizeTy &X, const TSizeTy &Y, const TSizeTy &Z)
Definition: ds.h:2438

Here is the call graph for this function:

template<class TVal, class TSizeTy = int>
TVVVec<TVal, TSizeTy>& TVVVec< TVal, TSizeTy >::operator= ( const TVVVec< TVal, TSizeTy > &  Vec)
inline

Definition at line 2425 of file ds.h.

References TVVVec< TVal, TSizeTy >::ValV, TVVVec< TVal, TSizeTy >::XDim, TVVVec< TVal, TSizeTy >::YDim, and TVVVec< TVal, TSizeTy >::ZDim.

2425  {
2426  XDim=Vec.XDim; YDim=Vec.YDim; ZDim=Vec.ZDim; ValV=Vec.ValV;
2427  return *this;
2428  }
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
template<class TVal, class TSizeTy = int>
bool TVVVec< TVal, TSizeTy >::operator== ( const TVVVec< TVal, TSizeTy > &  Vec) const
inline

Definition at line 2429 of file ds.h.

References TVVVec< TVal, TSizeTy >::ValV, TVVVec< TVal, TSizeTy >::XDim, TVVVec< TVal, TSizeTy >::YDim, and TVVVec< TVal, TSizeTy >::ZDim.

2429  {
2430  return (XDim==Vec.XDim)&&(YDim==Vec.YDim)&&(ZDim==Vec.ZDim)&&
2431  (ValV==Vec.ValV);}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413
template<class TVal, class TSizeTy = int>
void TVVVec< TVal, TSizeTy >::Save ( TSOut SOut) const
inline

Definition at line 2422 of file ds.h.

References TVec< TVal, TSizeTy >::Save(), and TNum< int64 >::Save().

2422  {
2423  XDim.Save(SOut); YDim.Save(SOut); ZDim.Save(SOut); ValV.Save(SOut);}
TInt64 YDim
Definition: ds.h:2412
TInt64 ZDim
Definition: ds.h:2412
TInt64 XDim
Definition: ds.h:2412
void Save(TSOut &SOut) const
Definition: dt.h:907
TVec< TVal, TSizeTy > ValV
Definition: ds.h:2413

Here is the call graph for this function:

Member Data Documentation

template<class TVal, class TSizeTy = int>
TVec<TVal, TSizeTy> TVVVec< TVal, TSizeTy >::ValV
private
template<class TVal, class TSizeTy = int>
TInt64 TVVVec< TVal, TSizeTy >::XDim
private
template<class TVal, class TSizeTy = int>
TInt64 TVVVec< TVal, TSizeTy >::YDim
private
template<class TVal, class TSizeTy = int>
TInt64 TVVVec< TVal, TSizeTy >::ZDim
private

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