SNAP Library 2.1, Developer Reference  2013-09-25 10:47:25
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>

Collaboration diagram for TVVVec< TVal >:

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 3279 of file ds.h.


Constructor & Destructor Documentation

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

Definition at line 3284 of file ds.h.

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

Definition at line 3285 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 3287 of file ds.h.

References TVVVec< TVal >::Gen().

                                                              :
    XDim(), YDim(), ZDim(), ValV(){Gen(_XDim, _YDim, _ZDim);}

Here is the call graph for this function:

template<class TVal>
TVVVec< TVal >::TVVVec ( TSIn SIn) [inline, explicit]

Definition at line 3289 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 3307 of file ds.h.

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

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

                                                    {
    Assert((0<=X)&&(X<int(XDim))&&(0<=Y)&&(Y<int(YDim))&&(0<=Z)&&(Z<int(ZDim)));
    return ValV[X*YDim*ZDim+Y*ZDim+Z];}

Here is the caller graph for this function:

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

Definition at line 3310 of file ds.h.

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

                                                                 {
    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 3303 of file ds.h.

References TVec< TVal, TSizeTy >::Clr(), TVVVec< TVal >::ValV, TVVVec< TVal >::XDim, TVVVec< TVal >::YDim, and TVVVec< TVal >::ZDim.

{XDim=0; YDim=0; ZDim=0; ValV.Clr();}

Here is the call graph for this function:

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

Definition at line 3302 of file ds.h.

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

{return ValV.Len()==0;}

Here is the call graph for this function:

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

Definition at line 3304 of file ds.h.

References Assert, TVec< TVal, TSizeTy >::Gen(), TVVVec< TVal >::ValV, TVVVec< TVal >::XDim, TVVVec< TVal >::YDim, and TVVVec< TVal >::ZDim.

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

                                                                {
    Assert((_XDim>=0)&&(_YDim>=0)&&(_ZDim>=0));
    XDim=_XDim; YDim=_YDim; ZDim=_ZDim; ValV.Gen(XDim*YDim*ZDim);}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 3317 of file ds.h.

References TVVVec< TVal >::XDim.

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

Definition at line 3318 of file ds.h.

References TVVVec< TVal >::YDim.

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

Definition at line 3319 of file ds.h.

References TVVVec< TVal >::ZDim.

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

Definition at line 3313 of file ds.h.

References TVVVec< TVal >::At().

                                                            {
    return At(X, Y, Z);}

Here is the call graph for this function:

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

Definition at line 3315 of file ds.h.

References TVVVec< TVal >::At().

                                                                         {
    return At(X, Y, Z);}

Here is the call graph for this function:

template<class TVal>
TVVVec<TVal>& TVVVec< TVal >::operator= ( const TVVVec< TVal > &  Vec) [inline]

Definition at line 3294 of file ds.h.

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

                                                  {
    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 3298 of file ds.h.

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

                                           {
    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 3291 of file ds.h.

References TVec< TVal, TSizeTy >::Save(), TInt::Save(), TVVVec< TVal >::ValV, TVVVec< TVal >::XDim, TVVVec< TVal >::YDim, and TVVVec< TVal >::ZDim.

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

Here is the call graph for this function:


Member Data Documentation


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