Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes

RELATED_SEGMENTED_ARRAY< T, block_size > Class Template Reference

#include <cmplr_segmented_array.h>

Inheritance diagram for RELATED_SEGMENTED_ARRAY< T, block_size >:
Inheritance graph
[legend]
Collaboration diagram for RELATED_SEGMENTED_ARRAY< T, block_size >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T base_type
typedef T value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typereference
typedef const value_typeconst_reference
typedef UINT size_type
typedef INT difference_type
typedef
SEGMENTED_ARRAY_ITERATOR< self
*, T, pointer, reference
iterator
typedef
SEGMENTED_ARRAY_ITERATOR
< const self *, T,
const_pointer, const_reference
const_iterator

Public Member Functions

 RELATED_SEGMENTED_ARRAY (MEM_POOL *m=Malloc_Mem_Pool)
 ~RELATED_SEGMENTED_ARRAY ()
UINT Block_size () const
UINT Size () const
TEntry (UINT idx)
const TEntry (UINT idx) const
Toperator[] (UINT idx)
const Toperator[] (UINT idx) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
TNew_entry (UINT &idx)
UINT Insert (const T &x)
virtual void Delete_last ()
virtual void Delete_last (UINT n)
UINT Insert (const T *x, UINT n_elemt)
UINT Transfer (T *x, UINT n_elemt)
void Reserve (UINT n_elemt)
UINT Get_block_size (UINT idx) const
UINT Block_index (UINT idx) const
UINT Block_index_end () const
TBlock_begin (UINT block_idx)
const TBlock_begin (UINT block_idx) const
TBlock_end (UINT block_idx)
const TBlock_end (UINT block_idx) const
void Clear (void)

Private Types

typedef
RELATED_SEGMENTED_ARRAY< T,
block_size > 
self

Private Member Functions

virtual void Construct_new_entry (void)
virtual void Construct_new_entry (UINT n)
UINT Round_up (UINT s)
void Update_Map (T *marker, UINT new_size, BOOL own_memory)
void Pop_Map ()
void Allocate ()
TNew_entry ()
void Copy (const T *x, UINT n)
UINT next_block_idx (UINT block_idx) const

Private Attributes

std::vector< std::pair< T
*, BOOL >, mempool_allocator
< std::pair< T *, BOOL > > > 
map
MEM_POOLpool
UINT max_size
INT block_base
UINT next_block_size
Tblock

Detailed Description

template<class T, UINT block_size = 128>
class RELATED_SEGMENTED_ARRAY< T, block_size >

Definition at line 264 of file cmplr_segmented_array.h.


Member Typedef Documentation

template<class T, UINT block_size = 128>
typedef T RELATED_SEGMENTED_ARRAY< T, block_size >::base_type

Definition at line 282 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef SEGMENTED_ARRAY_ITERATOR<const self*, T, const_pointer, const_reference> RELATED_SEGMENTED_ARRAY< T, block_size >::const_iterator

Definition at line 296 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef const value_type* RELATED_SEGMENTED_ARRAY< T, block_size >::const_pointer

Definition at line 286 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef const value_type& RELATED_SEGMENTED_ARRAY< T, block_size >::const_reference

Definition at line 288 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef INT RELATED_SEGMENTED_ARRAY< T, block_size >::difference_type

Definition at line 290 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef SEGMENTED_ARRAY_ITERATOR<self*, T, pointer, reference> RELATED_SEGMENTED_ARRAY< T, block_size >::iterator

Definition at line 293 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef value_type* RELATED_SEGMENTED_ARRAY< T, block_size >::pointer

Definition at line 285 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef value_type& RELATED_SEGMENTED_ARRAY< T, block_size >::reference

Definition at line 287 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef RELATED_SEGMENTED_ARRAY<T, block_size> RELATED_SEGMENTED_ARRAY< T, block_size >::self [private]

Definition at line 279 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef UINT RELATED_SEGMENTED_ARRAY< T, block_size >::size_type

Definition at line 289 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
typedef T RELATED_SEGMENTED_ARRAY< T, block_size >::value_type

Definition at line 284 of file cmplr_segmented_array.h.


Constructor & Destructor Documentation

template<class T, UINT block_size = 128>
RELATED_SEGMENTED_ARRAY< T, block_size >::RELATED_SEGMENTED_ARRAY ( MEM_POOL m = Malloc_Mem_Pool  )  [inline]
template<class T, UINT block_size = 128>
RELATED_SEGMENTED_ARRAY< T, block_size >::~RELATED_SEGMENTED_ARRAY (  )  [inline]

Member Function Documentation

template<class T , UINT block_size>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Allocate (  )  [private]
template<class T, UINT block_size = 128>
iterator RELATED_SEGMENTED_ARRAY< T, block_size >::begin (  )  [inline]

Definition at line 395 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::Block_end(), and RELATED_SEGMENTED_ARRAY< T, block_size >::map.

Referenced by Calc_Local_Area().

Here is the call graph for this function:

template<class T, UINT block_size = 128>
const_iterator RELATED_SEGMENTED_ARRAY< T, block_size >::begin (  )  const [inline]

Definition at line 404 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::Block_end(), and RELATED_SEGMENTED_ARRAY< T, block_size >::map.

Here is the call graph for this function:

template<class T, UINT block_size = 128>
T* RELATED_SEGMENTED_ARRAY< T, block_size >::Block_begin ( UINT  block_idx  )  [inline]
template<class T, UINT block_size = 128>
const T* RELATED_SEGMENTED_ARRAY< T, block_size >::Block_begin ( UINT  block_idx  )  const [inline]
template<class T, UINT block_size = 128>
T* RELATED_SEGMENTED_ARRAY< T, block_size >::Block_end ( UINT  block_idx  )  [inline]
template<class T, UINT block_size = 128>
const T* RELATED_SEGMENTED_ARRAY< T, block_size >::Block_end ( UINT  block_idx  )  const [inline]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Block_index ( UINT  idx  )  const [inline]

Definition at line 445 of file cmplr_segmented_array.h.

template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Block_index_end (  )  const [inline]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Block_size (  )  const [inline]

Definition at line 377 of file cmplr_segmented_array.h.

template<class T , UINT block_size>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Clear ( void   ) 
template<class T, UINT block_size = 128>
virtual void RELATED_SEGMENTED_ARRAY< T, block_size >::Construct_new_entry ( UINT  n  )  [inline, private, virtual]

Implements growing_table.

Definition at line 312 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::Construct_new_entry().

Here is the call graph for this function:

template<class T, UINT block_size = 128>
virtual void RELATED_SEGMENTED_ARRAY< T, block_size >::Construct_new_entry ( void   )  [inline, private, virtual]
template<class T, UINT block_size = 128>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Copy ( const T x,
UINT  n 
) [inline, private]
template<class T, UINT block_size = 128>
virtual void RELATED_SEGMENTED_ARRAY< T, block_size >::Delete_last ( void   )  [inline, virtual]
template<class T , UINT block_size>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Delete_last ( UINT  n  )  [virtual]
template<class T, UINT block_size = 128>
iterator RELATED_SEGMENTED_ARRAY< T, block_size >::end (  )  [inline]
template<class T, UINT block_size = 128>
const_iterator RELATED_SEGMENTED_ARRAY< T, block_size >::end (  )  const [inline]
template<class T, UINT block_size = 128>
T& RELATED_SEGMENTED_ARRAY< T, block_size >::Entry ( UINT  idx  )  [inline]
template<class T, UINT block_size = 128>
const T& RELATED_SEGMENTED_ARRAY< T, block_size >::Entry ( UINT  idx  )  const [inline]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Get_block_size ( UINT  idx  )  const [inline]

Definition at line 440 of file cmplr_segmented_array.h.

References min, RELATED_SEGMENTED_ARRAY< T, block_size >::next_block_idx(), and growing_table::size.

Referenced by Copy_array_range(), Find_entry_if(), For_all_blocks(), and For_all_entries().

Here is the call graph for this function:

template<class T , UINT block_size>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Insert ( const T x  )  [inline]

Definition at line 556 of file cmplr_segmented_array.h.

References idx, RELATED_SEGMENTED_ARRAY< T, block_size >::New_entry(), growing_table::size, and T.

Referenced by Copy_array_range(), Copy_ST(), and Copy_ST_No_Base().

Here is the call graph for this function:

template<class T , UINT block_size>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Insert ( const T x,
UINT  n_elemt 
)
template<class T, UINT block_size = 128>
T& RELATED_SEGMENTED_ARRAY< T, block_size >::New_entry (  )  [inline, private]
template<class T, UINT block_size = 128>
T& RELATED_SEGMENTED_ARRAY< T, block_size >::New_entry ( UINT idx  )  [inline]

Definition at line 413 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::New_entry(), and growing_table::size.

Referenced by RELATED_SEGMENTED_ARRAY< T, block_size >::New_entry().

Here is the call graph for this function:

template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::next_block_idx ( UINT  block_idx  )  const [inline, private]
template<class T, UINT block_size = 128>
const T& RELATED_SEGMENTED_ARRAY< T, block_size >::operator[] ( UINT  idx  )  const [inline]

Definition at line 393 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::Entry().

Here is the call graph for this function:

template<class T, UINT block_size = 128>
T& RELATED_SEGMENTED_ARRAY< T, block_size >::operator[] ( UINT  idx  )  [inline]

Definition at line 392 of file cmplr_segmented_array.h.

References RELATED_SEGMENTED_ARRAY< T, block_size >::Entry().

Here is the call graph for this function:

template<class T , UINT block_size>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Pop_Map (  )  [private]
template<class T, UINT block_size = 128>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Reserve ( UINT  n_elemt  )  [inline]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Round_up ( UINT  s  )  [inline, private]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Size ( void   )  const [inline]
template<class T , UINT block_size>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::Transfer ( T x,
UINT  n_elemt 
)
template<class T , UINT block_size>
void RELATED_SEGMENTED_ARRAY< T, block_size >::Update_Map ( T marker,
UINT  new_size,
BOOL  own_memory 
) [inline, private]

Member Data Documentation

template<class T, UINT block_size = 128>
T* RELATED_SEGMENTED_ARRAY< T, block_size >::block [private]
template<class T, UINT block_size = 128>
INT RELATED_SEGMENTED_ARRAY< T, block_size >::block_base [private]
template<class T, UINT block_size = 128>
std::vector<std::pair<T *, BOOL>, mempool_allocator<std::pair<T *,BOOL> > > RELATED_SEGMENTED_ARRAY< T, block_size >::map [private]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::max_size [private]
template<class T, UINT block_size = 128>
UINT RELATED_SEGMENTED_ARRAY< T, block_size >::next_block_size [private]
template<class T, UINT block_size = 128>
MEM_POOL* RELATED_SEGMENTED_ARRAY< T, block_size >::pool [private]

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