STK++ 0.9.13
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > Class Template Reference

Allocator for dense Array classes. More...

#include <STK_CAllocator.h>

Inheritance diagram for STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >:
Inheritance graph

Public Types

enum  {
  structure_ = hidden::Traits<CAllocator>::structure_ , orient_ = hidden::Traits<CAllocator>::orient_ , sizeRows_ = hidden::Traits<CAllocator>::sizeRows_ , sizeCols_ = hidden::Traits<CAllocator>::sizeCols_ ,
  sizeProd_ = hidden::Traits<CAllocator>::sizeProd_ , storage_ = hidden::Traits<CAllocator>::storage_
}
 
typedef hidden::Traits< CAllocator >::Row Row
 
typedef hidden::Traits< CAllocator >::Col Col
 
typedef hidden::Traits< CAllocator >::Type Type
 
typedef hidden::Traits< CAllocator >::TypeConst TypeConst
 
typedef MemAllocator< Type, SizeRows_ *SizeCols_Allocator
 
typedef StructuredCAllocator< CAllocator, SizeRows_, SizeCols_Base
 
typedef IContainer2D< SizeRows_, SizeCols_LowBase
 
typedef TRange< sizeRows_RowRange
 Type of the Range for the rows.
 
typedef TRange< sizeCols_ColRange
 Type of the Range for the columns.
 
- Public Types inherited from STK::StructuredCAllocator< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >, SizeRows_, SizeCols_ >
enum  
 
typedef hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >::Row Row
 
typedef hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >::Col Col
 
typedef hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >::Type Type
 
typedef hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >::TypeConst TypeConst
 
typedef OrientedCAllocator< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >, orient_ > Base
 
typedef IContainer2D< sizeRows_, sizeCols_ > LowBase
 
typedef hidden::Traits< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > >::Allocator Allocator
 
typedef TRange< sizeRows_ > RowRange
 Type of the Range for the rows.
 
typedef TRange< sizeCols_ > ColRange
 Type of the Range for the columns.
 
typedef TRange< sizeProd_ > AllocatorRange
 Type of the Range for the allocator.
 

Public Member Functions

 CAllocator ()
 default constructor
 
 CAllocator (int, int)
 
 CAllocator (int, int, Type const &v)
 
 CAllocator (CAllocator const &A, bool ref=true)
 
template<int OtherRows_, int OtherCols_>
 CAllocator (CAllocator< Type, OtherRows_, OtherCols_, Orient_ > const &A, RowRange const &I, ColRange const &J)
 
 CAllocator (Type *const &q, int, int)
 wrapper constructor for 0 based C-Array
 
 ~CAllocator ()
 destructor
 
void clear ()
 clear allocated memories
 
CAllocatorresize2Impl (int, int)
 resize this
 
void realloc (int, int)
 
- Public Member Functions inherited from STK::StructuredCAllocator< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >, SizeRows_, SizeCols_ >
void exchange (StructuredCAllocator &T)
 exchange T with this.
 
TypeConst elt1Impl (int i) const
 
Typeelt1Impl (int i)
 
void shift2Impl (int beginRows, int beginCols)
 shift the first indexes of the allocator
 
void shift1Impl (int begin)
 shift the first indexes of the allocator (for square and diagonal matrices).
 
CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > & resize1Impl (int size)
 resize the allocator (for square and diagonal matrices).
 

Additional Inherited Members

- Protected Member Functions inherited from STK::StructuredCAllocator< CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >, SizeRows_, SizeCols_ >
 StructuredCAllocator (RowRange const &I, ColRange const &J)
 Default constructor.
 
 StructuredCAllocator (StructuredCAllocator const &A, bool ref)
 copy constructor
 
 StructuredCAllocator (StructuredCAllocator< OtherDerived, OtherRows_, OtherCols_ > const &A, RowRange const &I, ColRange const &J)
 Reference constructor.
 
 StructuredCAllocator (Type *const &q, int nbRow, int nbCol)
 wrapper constructor for 0 based C-Array
 

Detailed Description

template<typename Type_, int SizeRows_, int SizeCols_, bool Orient_>
class STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >

Allocator for dense Array classes.

Allocator for the dense CArray classes.

The data are stored in two dimensions. It can be the columns or the rows allocator of any dense container.

The size of the Allocator is known in both dimension

Definition at line 904 of file STK_CAllocator.h.

Member Typedef Documentation

◆ Allocator

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef MemAllocator<Type, SizeRows_* SizeCols_> STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::Allocator

Definition at line 921 of file STK_CAllocator.h.

◆ Base

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef StructuredCAllocator<CAllocator, SizeRows_, SizeCols_> STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::Base

Definition at line 922 of file STK_CAllocator.h.

◆ Col

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef hidden::Traits<CAllocator>::Col STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::Col

Definition at line 908 of file STK_CAllocator.h.

◆ ColRange

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef TRange<sizeCols_> STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::ColRange

Type of the Range for the columns.

Definition at line 928 of file STK_CAllocator.h.

◆ LowBase

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef IContainer2D<SizeRows_, SizeCols_> STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::LowBase

Definition at line 923 of file STK_CAllocator.h.

◆ Row

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef hidden::Traits<CAllocator>::Row STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::Row

Definition at line 907 of file STK_CAllocator.h.

◆ RowRange

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef TRange<sizeRows_> STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::RowRange

Type of the Range for the rows.

Definition at line 926 of file STK_CAllocator.h.

◆ Type

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef hidden::Traits<CAllocator>::Type STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::Type

Definition at line 909 of file STK_CAllocator.h.

◆ TypeConst

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef hidden::Traits<CAllocator>::TypeConst STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::TypeConst

Definition at line 910 of file STK_CAllocator.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
anonymous enum
Enumerator
structure_ 
orient_ 
sizeRows_ 
sizeCols_ 
sizeProd_ 
storage_ 

Definition at line 912 of file STK_CAllocator.h.

913 {
914 structure_ = hidden::Traits<CAllocator>::structure_,
915 orient_ = hidden::Traits<CAllocator>::orient_,
916 sizeRows_ = hidden::Traits<CAllocator>::sizeRows_,
917 sizeCols_ = hidden::Traits<CAllocator>::sizeCols_,
918 sizeProd_ = hidden::Traits<CAllocator>::sizeProd_,
919 storage_ = hidden::Traits<CAllocator>::storage_
920 };

Constructor & Destructor Documentation

◆ CAllocator() [1/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( )
inline

default constructor

Definition at line 932 of file STK_CAllocator.h.

932: Base(SizeRows_, SizeCols_) {}
StructuredCAllocator< CAllocator, SizeRows_, SizeCols_ > Base

◆ CAllocator() [2/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( int  ,
int   
)
inline

Definition at line 933 of file STK_CAllocator.h.

933: Base(SizeRows_, SizeCols_) {}

◆ CAllocator() [3/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( int  ,
int  ,
Type const v 
)
inline

Definition at line 934 of file STK_CAllocator.h.

934: Base(SizeRows_, SizeCols_) {Base::Base::setValue(v);}

◆ CAllocator() [4/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( CAllocator< Type_, SizeRows_, SizeCols_, Orient_ > const A,
bool  ref = true 
)
inline

Definition at line 935 of file STK_CAllocator.h.

935 : Base(A, ref)
936 { if (!ref) { allocator_.assign(A.allocator_);} }

◆ CAllocator() [5/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
template<int OtherRows_, int OtherCols_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( CAllocator< Type, OtherRows_, OtherCols_, Orient_ > const A,
RowRange const I,
ColRange const J 
)
inline

Definition at line 939 of file STK_CAllocator.h.

941 : Base(A, I, J)
942 {}

◆ CAllocator() [6/6]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::CAllocator ( Type *const q,
int  ,
int   
)
inline

wrapper constructor for 0 based C-Array

Definition at line 944 of file STK_CAllocator.h.

944: Base(q, SizeRows_, SizeCols_) {}

◆ ~CAllocator()

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::~CAllocator ( )
inline

destructor

Definition at line 946 of file STK_CAllocator.h.

946{}

Member Function Documentation

◆ clear()

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
void STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::clear ( )
inline

clear allocated memories

Definition at line 948 of file STK_CAllocator.h.

948{}

◆ realloc()

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
void STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::realloc ( int  ,
int   
)
inline

Definition at line 952 of file STK_CAllocator.h.

952{}

◆ resize2Impl()

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
CAllocator & STK::CAllocator< Type_, SizeRows_, SizeCols_, Orient_ >::resize2Impl ( int  ,
int   
)
inline

resize this

Definition at line 951 of file STK_CAllocator.h.

951{ return *this;}

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