STK++ 0.9.13
|
Interface base class for 2D containers. More...
#include <STK_IContainer2D.h>
Public Types | |
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 | |
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 |
Protected Member Functions | |
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. | |
Private Attributes | |
RowRange | rows_ |
Vertical range : Range of the indexes for the rows. | |
ColRange | cols_ |
Horizontal range : Range of the indexes for the columns. | |
Interface base class for 2D containers.
The IContainer2D class is the base class for all two-dimensional containers storing data and which cannot be part of an expression. A two-dimensional container is defined by an horizontal range of index for the columns and a vertical range of index for the rows.
This Interface base class stores the ranges and allows to derived classes to manipulate these ranges.
Definition at line 53 of file STK_IContainer2D.h.
Type of the Range for the columns.
Definition at line 59 of file STK_IContainer2D.h.
Type of the Range for the rows.
Definition at line 57 of file STK_IContainer2D.h.
|
inline |
Default constructor.
cols_ = 1:0 and rows_ = 1:0.
Definition at line 62 of file STK_IContainer2D.h.
|
inline |
Constructor with specified ranges.
I,J | vertical and horizontal range |
Definition at line 66 of file STK_IContainer2D.h.
|
inline |
Copy constructor.
T | the container to copy |
Definition at line 70 of file STK_IContainer2D.h.
|
inline |
|
inline |
Definition at line 77 of file STK_IContainer2D.h.
References STK::RangeBase< Derived >::begin(), and STK::IContainer2D< SizeRows_, SizeCols_ >::cols_.
Referenced by STK::IArray2D< Derived >::beginCols().
|
inline |
Definition at line 86 of file STK_IContainer2D.h.
References STK::RangeBase< Derived >::begin(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::IArray2D< Derived >::beginRows().
|
inline |
Definition at line 75 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_.
Referenced by STK::IArray2D< Derived >::cols(), and STK::IArray2D< Derived >::colsImpl().
|
inlineprotected |
Decrement the columns first index.
dec | the decrement to apply |
Definition at line 159 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::decFirst().
|
inlineprotected |
Decrement the first index of the number of rows.
dec | the decrement to apply |
Definition at line 130 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::decFirst(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inlineprotected |
Decrement the last index of the columns.
dec | the decrement to apply |
Definition at line 167 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::decLast().
|
inlineprotected |
Decrement the end of the number of rows.
dec | the decrement to apply |
Definition at line 138 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::decLast(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::Array2DDiagonal< Type_ >::erase(), STK::SArray2DDiagonal< Type_ >::erase(), STK::Array2DDiagonal< Type_ >::popBack(), and STK::SArray2DDiagonal< Type_ >::popBack().
|
inlineprotected |
Decrement the last index of the columns.
dec | the decrement to apply |
Definition at line 192 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::decLast().
|
inlineprotected |
Decrement the end of the number of rows.
dec | the decrement to apply |
Definition at line 184 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::decLast(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inline |
true
if the container is empty, false
otherwise Definition at line 98 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, STK::TRange< Size_ >::empty(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::IArray2D< Derived >::empty().
|
inline |
Definition at line 79 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::end().
Referenced by STK::IArray2D< Derived >::endCols().
|
inline |
Definition at line 88 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::end(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::IArray2D< Derived >::endRows().
|
inlineprotected |
exchange this container with T
T | the container to exchange with this |
Definition at line 172 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inlineprotected |
increment the first index of the columns.
inc | the increment to apply |
Definition at line 155 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::incFirst().
|
inlineprotected |
Increment the first index of the number of rows.
inc | the increment to apply |
Definition at line 126 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::incFirst(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inlineprotected |
Increment the last index of the columns.
inc | the increment to apply |
Definition at line 163 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::incLast().
|
inlineprotected |
Increment the end of the number of rows.
inc | the increment to apply |
Definition at line 134 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::incLast(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::Array2DDiagonal< Type_ >::insertElt(), STK::SArray2DDiagonal< Type_ >::insertElt(), STK::Array2DDiagonal< Type_ >::pushBack(), and STK::SArray2DDiagonal< Type_ >::pushBack().
|
inlineprotected |
Increment the last index of the columns.
inc | the increment to apply |
Definition at line 188 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::incLast().
|
inlineprotected |
Increment the end of the number of rows.
inc | the increment to apply |
Definition at line 180 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::incLast(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inlineprotected |
Increment the columns range.
inc | the increment to apply the range |
Definition at line 151 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::inc().
|
inlineprotected |
Increment the range of the number of rows.
inc | the increment to apply |
Definition at line 122 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::inc(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inline |
Definition at line 93 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::lastIdx().
Referenced by STK::IArray2D< Derived >::lastIdxCols().
|
inline |
Definition at line 95 of file STK_IContainer2D.h.
References STK::TRange< Size_ >::lastIdx(), and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::IArray2D< Derived >::lastIdxRows().
|
inline |
Definition at line 84 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Referenced by STK::IArray2D< Derived >::rows(), and STK::IArray2D< Derived >::rowsImpl().
|
inlineprotected |
Set the columns range.
J | the columns range |
Definition at line 143 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_.
|
inlineprotected |
Set the ranges of the container.
I,J | the vertical and horizontal range |
Definition at line 108 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
|
inlineprotected |
Set the range of the number of rows.
I | the range of the rows number |
Definition at line 114 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::rows_.
Set the first index of the rows and columns.
rbeg,cbeg | the first index of the rows and columns |
Definition at line 104 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, STK::IContainer2D< SizeRows_, SizeCols_ >::rows_, and STK::TRange< Size_ >::shift().
|
inlineprotected |
Shift the columns first index to beg.
beg | the new first index |
Definition at line 147 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::shift().
|
inlineprotected |
Set the first index of the rows.
beg | the first index of the rows |
Definition at line 118 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::rows_, and STK::TRange< Size_ >::shift().
|
inline |
Definition at line 81 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::cols_, and STK::TRange< Size_ >::size().
Referenced by STK::IArray2D< Derived >::sizeCols().
|
inline |
Definition at line 90 of file STK_IContainer2D.h.
References STK::IContainer2D< SizeRows_, SizeCols_ >::rows_, and STK::TRange< Size_ >::size().
Referenced by STK::IArray2D< Derived >::sizeRows().
|
private |
Horizontal range : Range of the indexes for the columns.
Definition at line 198 of file STK_IContainer2D.h.
Referenced by STK::IContainer2D< SizeRows_, SizeCols_ >::beginCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::cols(), STK::IContainer2D< SizeRows_, SizeCols_ >::decBeginCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::decEndCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::decLastIdxCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::empty(), STK::IContainer2D< SizeRows_, SizeCols_ >::endCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::exchange(), STK::IContainer2D< SizeRows_, SizeCols_ >::incBeginCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::incEndCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::incLastIdxCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::incRangeCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::lastIdxCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::setCols(), STK::IContainer2D< SizeRows_, SizeCols_ >::setRanges(), STK::IContainer2D< SizeRows_, SizeCols_ >::shift(), STK::IContainer2D< SizeRows_, SizeCols_ >::shiftCols(), and STK::IContainer2D< SizeRows_, SizeCols_ >::sizeCols().
|
private |
Vertical range : Range of the indexes for the rows.
Definition at line 196 of file STK_IContainer2D.h.
Referenced by STK::IContainer2D< SizeRows_, SizeCols_ >::beginRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::decBeginRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::decEndRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::decLastIdxRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::empty(), STK::IContainer2D< SizeRows_, SizeCols_ >::endRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::exchange(), STK::IContainer2D< SizeRows_, SizeCols_ >::incBeginRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::incEndRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::incLastIdxRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::incRangeRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::lastIdxRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::rows(), STK::IContainer2D< SizeRows_, SizeCols_ >::setRanges(), STK::IContainer2D< SizeRows_, SizeCols_ >::setRows(), STK::IContainer2D< SizeRows_, SizeCols_ >::shift(), STK::IContainer2D< SizeRows_, SizeCols_ >::shiftRows(), and STK::IContainer2D< SizeRows_, SizeCols_ >::sizeRows().