STK++ 0.9.13
STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ > Class Template Reference

Base class for the general by_col_ structured case. More...

#include <STK_CAllocator.h>

Inheritance diagram for STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >:
Inheritance graph

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 OrientedCAllocator< Derived, orient_Base
 
typedef IContainer2D< sizeRows_, sizeCols_LowBase
 
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.
 

Public Member Functions

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).
 
Derived & resize1Impl (int size)
 resize the allocator (for square and diagonal matrices).
 

Protected Member Functions

 StructuredCAllocator (RowRange const &I, ColRange const &J)
 Default constructor.
 
 StructuredCAllocator (StructuredCAllocator const &A, bool ref)
 copy constructor
 
template<class OtherDerived , int OtherRows_, int OtherCols_>
 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<class Derived, int SizeRows_, int SizeCols_>
class STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >

Base class for the general by_col_ structured case.

Definition at line 505 of file STK_CAllocator.h.

Member Typedef Documentation

◆ Allocator

template<class Derived , int SizeRows_, int SizeCols_>
typedef hidden::Traits<Derived>::Allocator STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::Allocator

Definition at line 524 of file STK_CAllocator.h.

◆ AllocatorRange

template<class Derived , int SizeRows_, int SizeCols_>
typedef TRange<sizeProd_> STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::AllocatorRange

Type of the Range for the allocator.

Definition at line 531 of file STK_CAllocator.h.

◆ Base

template<class Derived , int SizeRows_, int SizeCols_>
typedef OrientedCAllocator<Derived, orient_> STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::Base

Definition at line 522 of file STK_CAllocator.h.

◆ Col

template<class Derived , int SizeRows_, int SizeCols_>
typedef hidden::Traits<Derived>::Col STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::Col

Definition at line 509 of file STK_CAllocator.h.

◆ ColRange

template<class Derived , int SizeRows_, int SizeCols_>
typedef TRange<sizeCols_> STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::ColRange

Type of the Range for the columns.

Definition at line 529 of file STK_CAllocator.h.

◆ LowBase

template<class Derived , int SizeRows_, int SizeCols_>
typedef IContainer2D<sizeRows_, sizeCols_> STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::LowBase

Definition at line 523 of file STK_CAllocator.h.

◆ Row

template<class Derived , int SizeRows_, int SizeCols_>
typedef hidden::Traits<Derived>::Row STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::Row

Definition at line 508 of file STK_CAllocator.h.

◆ RowRange

template<class Derived , int SizeRows_, int SizeCols_>
typedef TRange<sizeRows_> STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::RowRange

Type of the Range for the rows.

Definition at line 527 of file STK_CAllocator.h.

◆ Type

template<class Derived , int SizeRows_, int SizeCols_>
typedef hidden::Traits<Derived>::Type STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::Type

Definition at line 510 of file STK_CAllocator.h.

◆ TypeConst

template<class Derived , int SizeRows_, int SizeCols_>
typedef hidden::Traits<Derived>::TypeConst STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::TypeConst

Definition at line 511 of file STK_CAllocator.h.

Member Enumeration Documentation

◆ anonymous enum

template<class Derived , int SizeRows_, int SizeCols_>
anonymous enum
Enumerator
structure_ 
orient_ 
sizeRows_ 
sizeCols_ 
sizeProd_ 
storage_ 

Definition at line 513 of file STK_CAllocator.h.

514 {
515 structure_ = hidden::Traits<Derived>::structure_,
516 orient_ = hidden::Traits<Derived>::orient_,
517 sizeRows_ = hidden::Traits<Derived>::sizeRows_,
518 sizeCols_ = hidden::Traits<Derived>::sizeCols_,
519 sizeProd_ = hidden::Traits<Derived>::sizeProd_,
520 storage_ = hidden::Traits<Derived>::storage_
521 };

Constructor & Destructor Documentation

◆ StructuredCAllocator() [1/4]

template<class Derived , int SizeRows_, int SizeCols_>
STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::StructuredCAllocator ( RowRange const I,
ColRange const J 
)
inlineprotected

Default constructor.

Definition at line 535 of file STK_CAllocator.h.

535: Base(I, J) {}
OrientedCAllocator< Derived, orient_ > Base

◆ StructuredCAllocator() [2/4]

template<class Derived , int SizeRows_, int SizeCols_>
STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::StructuredCAllocator ( StructuredCAllocator< Derived, SizeRows_, SizeCols_ > const A,
bool  ref 
)
inlineprotected

copy constructor

Definition at line 537 of file STK_CAllocator.h.

537: Base(A, ref) {}

◆ StructuredCAllocator() [3/4]

template<class Derived , int SizeRows_, int SizeCols_>
template<class OtherDerived , int OtherRows_, int OtherCols_>
STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::StructuredCAllocator ( StructuredCAllocator< OtherDerived, OtherRows_, OtherCols_ > const A,
RowRange const I,
ColRange const J 
)
inlineprotected

Reference constructor.

Definition at line 540 of file STK_CAllocator.h.

542 : Base(A, I, J)
543 {}

◆ StructuredCAllocator() [4/4]

template<class Derived , int SizeRows_, int SizeCols_>
STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::StructuredCAllocator ( Type *const q,
int  nbRow,
int  nbCol 
)
inlineprotected

wrapper constructor for 0 based C-Array

Definition at line 545 of file STK_CAllocator.h.

545: Base(q, nbRow, nbCol) {}

Member Function Documentation

◆ elt1Impl() [1/2]

template<class Derived , int SizeRows_, int SizeCols_>
Type & STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::elt1Impl ( int  i)
inline
Returns
a reference on the ith element of the Allocator.
Parameters
iindex of the element

Definition at line 559 of file STK_CAllocator.h.

559{ return Base::allocator_[i];}

◆ elt1Impl() [2/2]

template<class Derived , int SizeRows_, int SizeCols_>
TypeConst STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::elt1Impl ( int  i) const
inline
Returns
a constant reference on the ith element of the Allocator.
Parameters
iindexes of the element

Definition at line 555 of file STK_CAllocator.h.

555{ return Base::allocator_[i];}

◆ exchange()

template<class Derived , int SizeRows_, int SizeCols_>
void STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::exchange ( StructuredCAllocator< Derived, SizeRows_, SizeCols_ > &  T)
inline

exchange T with this.

Parameters
Tthe container to exchange

Definition at line 551 of file STK_CAllocator.h.

551{ Base::exchange(T);}

◆ resize1Impl()

template<class Derived , int SizeRows_, int SizeCols_>
Derived & STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::resize1Impl ( int  size)
inline

resize the allocator (for square and diagonal matrices).

Parameters
sizethe size of the point

Definition at line 576 of file STK_CAllocator.h.

577 { return this->asDerived().resize2Impl(size, size);}

◆ shift1Impl()

template<class Derived , int SizeRows_, int SizeCols_>
void STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::shift1Impl ( int  begin)
inline

shift the first indexes of the allocator (for square and diagonal matrices).

Parameters
beginthe index of the first row and column

Definition at line 572 of file STK_CAllocator.h.

572{ shift2Impl(begin, begin);}
void shift2Impl(int beginRows, int beginCols)
shift the first indexes of the allocator

◆ shift2Impl()

template<class Derived , int SizeRows_, int SizeCols_>
void STK::StructuredCAllocator< Derived, SizeRows_, SizeCols_ >::shift2Impl ( int  beginRows,
int  beginCols 
)
inline

shift the first indexes of the allocator

Parameters
beginRows,beginColsindexes to set

Definition at line 563 of file STK_CAllocator.h.

564 {
565 if ((beginRows == this->beginRows())&&(beginCols == this->beginCols())) return;
566 LowBase::shift(beginRows, beginCols);
567 this->allocator_.shift(this->shiftInc(beginRows, beginCols));
568 }

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