Scid  4.6.5
Public Member Functions | List of all members
VectorBig< T, CHUNKSHIFT > Class Template Reference

class VectorBig - store data into chunks to avoid (or minimize) reallocations : is the base-2 logarithm of the number of T entries per chunk. More...

#include <misc.h>

Public Member Functions

 VectorBig ()
 
 VectorBig (const VectorBig &)
 
VectorBigoperator= (const VectorBig &)
 
 ~VectorBig ()
 
const T & operator[] (size_t idx) const
 
T & operator[] (size_t idx)
 
size_t size () const
 
void reserve (size_t count)
 
void resize (size_t count)
 
void resize (size_t count, const T &defaulVal)
 
void push_back (const T &e)
 

Detailed Description

template<class T, size_t CHUNKSHIFT>
class VectorBig< T, CHUNKSHIFT >

class VectorBig - store data into chunks to avoid (or minimize) reallocations : is the base-2 logarithm of the number of T entries per chunk.

Total size of a chunk: (2^CHUNKSHIFT)*sizeof(T) resize() : Used to avoid reallocations. Very efficient because it allocates space only for chunk pointers i.e with ==16777214 and ==16 will use 256 pointers

Definition at line 72 of file misc.h.

Constructor & Destructor Documentation

template<class T, size_t CHUNKSHIFT>
VectorBig< T, CHUNKSHIFT >::VectorBig ( )
inline

Definition at line 77 of file misc.h.

template<class T, size_t CHUNKSHIFT>
VectorBig< T, CHUNKSHIFT >::VectorBig ( const VectorBig< T, CHUNKSHIFT > &  )
template<class T, size_t CHUNKSHIFT>
VectorBig< T, CHUNKSHIFT >::~VectorBig ( )
inline

Definition at line 80 of file misc.h.

Member Function Documentation

template<class T, size_t CHUNKSHIFT>
VectorBig& VectorBig< T, CHUNKSHIFT >::operator= ( const VectorBig< T, CHUNKSHIFT > &  )
template<class T, size_t CHUNKSHIFT>
const T& VectorBig< T, CHUNKSHIFT >::operator[] ( size_t  idx) const
inline

Definition at line 82 of file misc.h.

template<class T, size_t CHUNKSHIFT>
T& VectorBig< T, CHUNKSHIFT >::operator[] ( size_t  idx)
inline

Definition at line 86 of file misc.h.

template<class T, size_t CHUNKSHIFT>
void VectorBig< T, CHUNKSHIFT >::push_back ( const T &  e)
inline

Definition at line 117 of file misc.h.

template<class T, size_t CHUNKSHIFT>
void VectorBig< T, CHUNKSHIFT >::reserve ( size_t  count)
inline

Definition at line 95 of file misc.h.

template<class T, size_t CHUNKSHIFT>
void VectorBig< T, CHUNKSHIFT >::resize ( size_t  count)
inline

Definition at line 99 of file misc.h.

template<class T, size_t CHUNKSHIFT>
void VectorBig< T, CHUNKSHIFT >::resize ( size_t  count,
const T &  defaulVal 
)
inline

Definition at line 111 of file misc.h.

template<class T, size_t CHUNKSHIFT>
size_t VectorBig< T, CHUNKSHIFT >::size ( ) const
inline

Definition at line 91 of file misc.h.


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