SNAP Library 2.0, User Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TVVVec< TVal > Class Template Reference

#include <ds.h>

List of all members.

Public Member Functions

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

Private Attributes

TInt XDim
TInt YDim
TInt ZDim
TVec< TVal > ValV

Detailed Description

template<class TVal>
class TVVVec< TVal >

Definition at line 3273 of file ds.h.


Constructor & Destructor Documentation

template<class TVal>
TVVVec< TVal >::TVVVec ( ) [inline]

Definition at line 3278 of file ds.h.

: XDim(), YDim(), ZDim(), ValV(){}
template<class TVal>
TVVVec< TVal >::TVVVec ( const TVVVec< TVal > &  Vec) [inline]

Definition at line 3279 of file ds.h.

                           :
    XDim(Vec.XDim), YDim(Vec.YDim), ZDim(Vec.ZDim), ValV(Vec.ValV){}
template<class TVal>
TVVVec< TVal >::TVVVec ( const int &  _XDim,
const int &  _YDim,
const int &  _ZDim 
) [inline]

Definition at line 3281 of file ds.h.

                                                              :
    XDim(), YDim(), ZDim(), ValV(){Gen(_XDim, _YDim, _ZDim);}
template<class TVal>
TVVVec< TVal >::TVVVec ( TSIn SIn) [inline, explicit]

Definition at line 3283 of file ds.h.

                            :
    XDim(SIn), YDim(SIn), ZDim(SIn), ValV(SIn){}

Member Function Documentation

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

Definition at line 3301 of file ds.h.

                                                    {
    Assert((0<=X)&&(X<int(XDim))&&(0<=Y)&&(Y<int(YDim))&&(0<=Z)&&(Z<int(ZDim)));
    return ValV[X*YDim*ZDim+Y*ZDim+Z];}
template<class TVal>
const TVal& TVVVec< TVal >::At ( const int &  X,
const int &  Y,
const int &  Z 
) const [inline]

Definition at line 3304 of file ds.h.

                                                                 {
    Assert((0<=X)&&(X<int(XDim))&&(0<=Y)&&(Y<int(YDim))&&(0<=Z)&&(Z<int(ZDim)));
    return ValV[X*YDim*ZDim+Y*ZDim+Z];}
template<class TVal>
void TVVVec< TVal >::Clr ( ) [inline]

Definition at line 3297 of file ds.h.

{XDim=0; YDim=0; ZDim=0; ValV.Clr();}
template<class TVal>
bool TVVVec< TVal >::Empty ( ) const [inline]

Definition at line 3296 of file ds.h.

{return ValV.Len()==0;}
template<class TVal>
void TVVVec< TVal >::Gen ( const int &  _XDim,
const int &  _YDim,
const int &  _ZDim 
) [inline]

Definition at line 3298 of file ds.h.

                                                                {
    Assert((_XDim>=0)&&(_YDim>=0)&&(_ZDim>=0));
    XDim=_XDim; YDim=_YDim; ZDim=_ZDim; ValV.Gen(XDim*YDim*ZDim);}
template<class TVal>
int TVVVec< TVal >::GetXDim ( ) const [inline]

Definition at line 3311 of file ds.h.

{return XDim;}
template<class TVal>
int TVVVec< TVal >::GetYDim ( ) const [inline]

Definition at line 3312 of file ds.h.

{return YDim;}
template<class TVal>
int TVVVec< TVal >::GetZDim ( ) const [inline]

Definition at line 3313 of file ds.h.

{return ZDim;}
template<class TVal>
TVal& TVVVec< TVal >::operator() ( const int &  X,
const int &  Y,
const int &  Z 
) [inline]

Definition at line 3307 of file ds.h.

                                                            {
    return At(X, Y, Z);}
template<class TVal>
const TVal& TVVVec< TVal >::operator() ( const int &  X,
const int &  Y,
const int &  Z 
) const [inline]

Definition at line 3309 of file ds.h.

                                                                         {
    return At(X, Y, Z);}
template<class TVal>
TVVVec<TVal>& TVVVec< TVal >::operator= ( const TVVVec< TVal > &  Vec) [inline]

Definition at line 3288 of file ds.h.

                                                  {
    XDim=Vec.XDim; YDim=Vec.YDim; ZDim=Vec.ZDim; ValV=Vec.ValV;
    return *this;
  }
template<class TVal>
bool TVVVec< TVal >::operator== ( const TVVVec< TVal > &  Vec) const [inline]

Definition at line 3292 of file ds.h.

                                           {
    return (XDim==Vec.XDim)&&(YDim==Vec.YDim)&&(ZDim==Vec.ZDim)&&
     (ValV==Vec.ValV);}
template<class TVal>
void TVVVec< TVal >::Save ( TSOut SOut) const [inline]

Definition at line 3285 of file ds.h.

                               {
    XDim.Save(SOut); YDim.Save(SOut); ZDim.Save(SOut); ValV.Save(SOut);}

Member Data Documentation

template<class TVal>
TVec<TVal> TVVVec< TVal >::ValV [private]

Definition at line 3276 of file ds.h.

template<class TVal>
TInt TVVVec< TVal >::XDim [private]

Definition at line 3275 of file ds.h.

template<class TVal>
TInt TVVVec< TVal >::YDim [private]

Definition at line 3275 of file ds.h.

template<class TVal>
TInt TVVVec< TVal >::ZDim [private]

Definition at line 3275 of file ds.h.


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