STK++ 0.9.13
|
Base class for CAllocators. More...
#include <STK_CAllocator.h>
Public Types | |
enum | { structure_ = hidden::Traits<Derived>::structure_ , orient_ = hidden::Traits<Derived>::orient_ , sizeRows_ = hidden::Traits<Derived>::sizeRows_ , sizeCols_ = hidden::Traits<Derived>::sizeCols_ , sizeProd_ = hidden::Traits<Derived>::sizeProd_ , storage_ = hidden::Traits<Derived>::storage_ } |
typedef hidden::Traits< Derived >::Row | Row |
typedef hidden::Traits< Derived >::Col | Col |
typedef hidden::Traits< Derived >::Type | Type |
typedef hidden::Traits< Derived >::TypeConst | TypeConst |
typedef ITContainer2D< Derived > | Base |
typedef hidden::Traits< Derived >::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. | |
![]() | |
enum | { structure_ = hidden::Traits<Derived>::structure_ , orient_ = hidden::Traits<Derived>::orient_ , sizeRows_ = hidden::Traits<Derived>::sizeRows_ , sizeCols_ = hidden::Traits<Derived>::sizeCols_ , storage_ = hidden::Traits<Derived>::storage_ } |
typedef hidden::Traits< Derived >::Type | Type |
typedef hidden::Traits< Derived >::TypeConst | TypeConst |
typedef hidden::Traits< Derived >::Row | Row |
typedef hidden::Traits< Derived >::Col | Col |
typedef TRange< sizeRows_ > | RowRange |
Type of the Range for the rows. | |
typedef TRange< sizeCols_ > | ColRange |
Type of the Range for the columns. | |
typedef IContainer2D< sizeRows_, sizeCols_ > | Base2D |
Type of the Base container. | |
typedef IRecursiveTemplate< Derived > | Base |
Type of the Base container. | |
![]() | |
typedef TRange< SizeRows_ > | RowRange |
Type of the Range for the rows. | |
typedef TRange< SizeCols_ > | ColRange |
Type of the Range for the columns. | |
Public Member Functions | |
RowRange const & | rangeRowsInCol (int) const |
ColRange const & | rangeColsInRow (int) const |
Row | row (int i) const |
Access to the ith row of the Allocator. | |
template<int Size_> | |
CAllocator< Type, 1, Size_, orient_ > | row (int i, TRange< Size_ > const &J) const |
Access to the row (i,J) of the Allocator. | |
Col | col (int j) const |
Access to the jth column of the Allocator. | |
template<int Size_> | |
CAllocator< Type, Size_, 1, orient_ > | col (TRange< Size_ > const &I, int j) const |
Access to the column (I,j) of the Allocator. | |
template<int OtherRows_, int OtherCols_> | |
CAllocator< Type, OtherRows_, OtherCols_, orient_ > | sub (TRange< OtherRows_ > const &I, TRange< OtherCols_ > const &J) const |
Access to the sub-part (I,J) of the Allocator. | |
void | swapCols (int pos1, int pos2) |
void | swapRows (int pos1, int pos2) |
![]() | |
Type & | elt (int i, int j) |
TypeConst | elt (int i, int j) const |
Type & | elt (int i) |
TypeConst | elt (int i) const |
Type & | elt () |
TypeConst | elt () const |
Derived & | resize (int sizeRows, int sizeCols) |
resize the container | |
Derived & | resize (int size) |
Resize 1D container. | |
void | shift (int firstRow, int firstCol) |
shift the first indexes of the container | |
void | shift (int beg) |
shift the first indexes of the 1D container | |
![]() | |
IContainer2D () | |
Default constructor. | |
IContainer2D (RowRange const &I, ColRange const &J) | |
Constructor with specified ranges. | |
IContainer2D (IContainer2D const &T) | |
Copy constructor. | |
~IContainer2D () | |
destructor. | |
ColRange const & | cols () const |
int | beginCols () const |
int | endCols () const |
int | sizeCols () const |
RowRange const & | rows () const |
int | beginRows () const |
int | endRows () const |
int | sizeRows () const |
int | lastIdxCols () const |
int | lastIdxRows () const |
bool | empty () const |
![]() | |
Derived & | asDerived () |
static cast : return a reference of this with a cast to the derived class. | |
Derived const & | asDerived () const |
static cast : return a const reference of this with a cast to the derived class. | |
Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
Derived * | clone () const |
create a leaf using the copy constructor of the Derived class. | |
Derived * | clone (bool isRef) const |
create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Protected Member Functions | |
CAllocatorBase () | |
default constructor | |
CAllocatorBase (RowRange const &I, ColRange const &J) | |
constructor | |
CAllocatorBase (CAllocatorBase const &A) | |
copy constructor | |
![]() | |
ITContainer2D () | |
Default constructor. | |
ITContainer2D (RowRange const &I, ColRange const &J) | |
constructor with specified Range. | |
ITContainer2D (ITContainer2D const &T) | |
Copy constructor. | |
~ITContainer2D () | |
destructor. | |
![]() | |
void | shift (int rbeg, int cbeg) |
Set the first index of the rows and columns. | |
void | setRanges (RowRange const &I=RowRange(), ColRange const &J=ColRange()) |
Set the ranges of the container. | |
void | setRows (RowRange const &I=RowRange()) |
Set the range of the number of rows. | |
void | shiftRows (int beg) |
Set the first index of the rows. | |
void | incRangeRows (int inc) |
Increment the range of the number of rows. | |
void | incBeginRows (int inc) |
Increment the first index of the number of rows. | |
void | decBeginRows (int dec) |
Decrement the first index of the number of rows. | |
void | incEndRows (int inc) |
Increment the end of the number of rows. | |
void | decEndRows (int dec) |
Decrement the end of the number of rows. | |
void | setCols (ColRange const &J=ColRange()) |
Set the columns range. | |
void | shiftCols (int beg) |
Shift the columns first index to beg. | |
void | incRangeCols (int inc) |
Increment the columns range. | |
void | incBeginCols (int inc) |
increment the first index of the columns. | |
void | decBeginCols (int dec) |
Decrement the columns first index. | |
void | incEndCols (int inc) |
Increment the last index of the columns. | |
void | decEndCols (int dec) |
Decrement the last index of the columns. | |
void | exchange (IContainer2D &T) |
exchange this container with T | |
void | incLastIdxRows (int inc) |
Increment the end of the number of rows. | |
void | decLastIdxRows (int dec) |
Decrement the end of the number of rows. | |
void | incLastIdxCols (int inc) |
Increment the last index of the columns. | |
void | decLastIdxCols (int dec) |
Decrement the last index of the columns. | |
![]() | |
IRecursiveTemplate () | |
constructor. | |
~IRecursiveTemplate () | |
destructor. | |
Base class for CAllocators.
Definition at line 89 of file STK_CAllocator.h.
typedef hidden::Traits<Derived>::Allocator STK::CAllocatorBase< Derived >::Allocator |
Definition at line 107 of file STK_CAllocator.h.
typedef TRange<sizeProd_> STK::CAllocatorBase< Derived >::AllocatorRange |
Type of the Range for the allocator.
Definition at line 114 of file STK_CAllocator.h.
typedef ITContainer2D<Derived> STK::CAllocatorBase< Derived >::Base |
Definition at line 106 of file STK_CAllocator.h.
typedef hidden::Traits<Derived>::Col STK::CAllocatorBase< Derived >::Col |
Definition at line 93 of file STK_CAllocator.h.
typedef TRange<sizeCols_> STK::CAllocatorBase< Derived >::ColRange |
Type of the Range for the columns.
Definition at line 112 of file STK_CAllocator.h.
typedef hidden::Traits<Derived>::Row STK::CAllocatorBase< Derived >::Row |
Definition at line 92 of file STK_CAllocator.h.
typedef TRange<sizeRows_> STK::CAllocatorBase< Derived >::RowRange |
Type of the Range for the rows.
Definition at line 110 of file STK_CAllocator.h.
typedef hidden::Traits<Derived>::Type STK::CAllocatorBase< Derived >::Type |
Definition at line 94 of file STK_CAllocator.h.
typedef hidden::Traits<Derived>::TypeConst STK::CAllocatorBase< Derived >::TypeConst |
Definition at line 95 of file STK_CAllocator.h.
Enumerator | |
---|---|
structure_ | |
orient_ | |
sizeRows_ | |
sizeCols_ | |
sizeProd_ | |
storage_ |
Definition at line 97 of file STK_CAllocator.h.
|
inlineprotected |
|
inlineprotected |
|
inline |
Access to the jth column of the Allocator.
j | index of the column |
Definition at line 163 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_1ARG.
|
inline |
Access to the column (I,j) of the Allocator.
I,j | range of the rows and index of the column |
Definition at line 176 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
Definition at line 129 of file STK_CAllocator.h.
|
inline |
Definition at line 127 of file STK_CAllocator.h.
|
inline |
Access to the ith row of the Allocator.
i | index of the row |
Definition at line 135 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_1ARG.
|
inline |
Access to the row (i,J) of the Allocator.
i,J | index of the row and range of the columns |
Definition at line 148 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
Access to the sub-part (I,J) of the Allocator.
I,J | range of the rows and columns |
Definition at line 193 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
pos1,pos2 | position of the first and second columns to swap |
Definition at line 206 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
pos1,pos2 | position of the first and second rows to swap |
Definition at line 222 of file STK_CAllocator.h.
References STKOUT_OF_RANGE_2ARG.