SNAP Library , Developer Reference  2013-01-07 14:03:36
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 1908 of file ds.h.


Constructor & Destructor Documentation

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

Definition at line 1913 of file ds.h.

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

Definition at line 1914 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 1916 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 1918 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 1936 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 1939 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 1932 of file ds.h.

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

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

Definition at line 1931 of file ds.h.

References TVVVec< TVal >::ValV.

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

Definition at line 1933 of file ds.h.

References Assert, 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 caller graph for this function:

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

Definition at line 1946 of file ds.h.

References TVVVec< TVal >::XDim.

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

Definition at line 1947 of file ds.h.

References TVVVec< TVal >::YDim.

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

Definition at line 1948 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 1942 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 1944 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 1923 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 1927 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 1920 of file ds.h.

References 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: