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
TSparseTableI< TVal, GroupSize > Class Template Reference

#include <shash.h>

Collaboration diagram for TSparseTableI< TVal, GroupSize >:

List of all members.

Public Member Functions

 TSparseTableI ()
 TSparseTableI (const TGroupVI &BegIter, const TGroupVI &CurIter, const TGroupVI &EndIter, const int &Offset=0)
 TSparseTableI (const TSparseTableI &STI)
TSparseTableIoperator= (const TSparseTableI &STI)
bool operator== (const TSparseTableI &STI) const
bool operator< (const TSparseTableI &STI) const
TSparseTableIoperator++ (int)
TSparseTableIoperator-- (int)
int GetValN () const
bool IsEnd () const
TVal & operator* () const
TVal & operator() () const
TVal * operator-> () const

Private Types

typedef TSparseGroup< TVal,
GroupSize > 
TValGroup
typedef TVec< TValGroup >::TIter TGroupVI

Private Attributes

int CurOff
TGroupVI BegI
TGroupVI GroupI
TGroupVI EndI

Detailed Description

template<class TVal, uint16 GroupSize>
class TSparseTableI< TVal, GroupSize >

Definition at line 267 of file shash.h.


Member Typedef Documentation

template<class TVal , uint16 GroupSize>
typedef TVec<TValGroup>::TIter TSparseTableI< TVal, GroupSize >::TGroupVI [private]

Definition at line 270 of file shash.h.

template<class TVal , uint16 GroupSize>
typedef TSparseGroup<TVal, GroupSize> TSparseTableI< TVal, GroupSize >::TValGroup [private]

Definition at line 269 of file shash.h.


Constructor & Destructor Documentation

template<class TVal , uint16 GroupSize>
TSparseTableI< TVal, GroupSize >::TSparseTableI ( ) [inline]

Definition at line 274 of file shash.h.

: CurOff(0), GroupI(NULL), EndI(NULL) { }
template<class TVal , uint16 GroupSize>
TSparseTableI< TVal, GroupSize >::TSparseTableI ( const TGroupVI BegIter,
const TGroupVI CurIter,
const TGroupVI EndIter,
const int &  Offset = 0 
) [inline]

Definition at line 275 of file shash.h.

                           : CurOff(Offset), BegI(BegIter), GroupI(CurIter), EndI(EndIter) { }
template<class TVal , uint16 GroupSize>
TSparseTableI< TVal, GroupSize >::TSparseTableI ( const TSparseTableI< TVal, GroupSize > &  STI) [inline]

Definition at line 277 of file shash.h.

                                          :
    CurOff(STI.CurOff), BegI(STI.BegI), GroupI(STI.GroupI), EndI(STI.EndI) { }

Member Function Documentation

template<class TVal , uint16 GroupSize>
int TSparseTableI< TVal, GroupSize >::GetValN ( ) const [inline]
template<class TVal , uint16 GroupSize>
bool TSparseTableI< TVal, GroupSize >::IsEnd ( ) const [inline]
template<class TVal , uint16 GroupSize>
TVal& TSparseTableI< TVal, GroupSize >::operator() ( ) const [inline]

Definition at line 303 of file shash.h.

References TSparseTableI< TVal, GroupSize >::CurOff, and TSparseTableI< TVal, GroupSize >::GroupI.

{ return GroupI->Offset(CurOff); }
template<class TVal , uint16 GroupSize>
TVal& TSparseTableI< TVal, GroupSize >::operator* ( ) const [inline]

Definition at line 302 of file shash.h.

References TSparseTableI< TVal, GroupSize >::CurOff, and TSparseTableI< TVal, GroupSize >::GroupI.

Referenced by TSparseTableI< TVal, GroupSize >::operator->().

{ return GroupI->Offset(CurOff); }

Here is the caller graph for this function:

template<class TVal , uint16 GroupSize>
TSparseTableI& TSparseTableI< TVal, GroupSize >::operator++ ( int  ) [inline]

Definition at line 286 of file shash.h.

References TSparseTableI< TVal, GroupSize >::CurOff, TSparseTableI< TVal, GroupSize >::EndI, and TSparseTableI< TVal, GroupSize >::GroupI.

                                  {
    if (CurOff+1 == GroupI->Len()) { CurOff = 0;
      if (GroupI < EndI) { GroupI++;
        while (GroupI < EndI && GroupI->Empty()) { GroupI++; } }
    } else { CurOff++; }
    return *this;
  }
template<class TVal , uint16 GroupSize>
TSparseTableI& TSparseTableI< TVal, GroupSize >::operator-- ( int  ) [inline]

Definition at line 293 of file shash.h.

References TSparseTableI< TVal, GroupSize >::BegI, TSparseTableI< TVal, GroupSize >::CurOff, and TSparseTableI< TVal, GroupSize >::GroupI.

                                  {
    if (CurOff == 0) {
      while (GroupI >= BegI && GroupI->Empty()) { GroupI--; }
      if (GroupI >= BegI) CurOff = GroupI->Len()-1;
    } else { CurOff--; }
    return *this;
  }
template<class TVal , uint16 GroupSize>
TVal* TSparseTableI< TVal, GroupSize >::operator-> ( ) const [inline]

Definition at line 304 of file shash.h.

References TSparseTableI< TVal, GroupSize >::operator*().

{ return &(operator*()); }

Here is the call graph for this function:

template<class TVal , uint16 GroupSize>
bool TSparseTableI< TVal, GroupSize >::operator< ( const TSparseTableI< TVal, GroupSize > &  STI) const [inline]

Definition at line 284 of file shash.h.

References TSparseTableI< TVal, GroupSize >::CurOff, and TSparseTableI< TVal, GroupSize >::GroupI.

                                                   {
    return GroupI < STI.GroupI || (GroupI == STI.GroupI && CurOff < STI.CurOff); }
template<class TVal , uint16 GroupSize>
TSparseTableI& TSparseTableI< TVal, GroupSize >::operator= ( const TSparseTableI< TVal, GroupSize > &  STI) [inline]
template<class TVal , uint16 GroupSize>
bool TSparseTableI< TVal, GroupSize >::operator== ( const TSparseTableI< TVal, GroupSize > &  STI) const [inline]

Definition at line 282 of file shash.h.

References TSparseTableI< TVal, GroupSize >::CurOff, and TSparseTableI< TVal, GroupSize >::GroupI.

                                                    {
    return GroupI == STI.GroupI && CurOff == STI.CurOff; }

Member Data Documentation

template<class TVal , uint16 GroupSize>
TGroupVI TSparseTableI< TVal, GroupSize >::BegI [private]
template<class TVal , uint16 GroupSize>
TGroupVI TSparseTableI< TVal, GroupSize >::EndI [private]

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