STK++ 0.9.13
|
s More...
#include <STK_ICArray.h>
Public Types | |
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 ArrayBase< Derived > | Base |
typedef hidden::Traits< Derived >::Allocator | Allocator |
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 TRange< sizeRows_ > | RowRange |
Type of the Range for the rows. | |
typedef TRange< sizeCols_ > | ColRange |
Type of the Range for the columns. | |
![]() | |
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 ExprBase< Derived > | Base |
typedef hidden::Traits< Derived >::Type | Type |
typedef hidden::Traits< Derived >::TypeConst | TypeConst |
![]() | |
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 ITContainer< Derived, structure_ > | Base |
typedef hidden::Traits< Derived >::Type | Type |
typedef hidden::Traits< Derived >::TypeConst | TypeConst |
Protected Member Functions | |
ICArray () | |
default constructor. | |
ICArray (int sizeRows, int sizeCols) | |
constructor with specified sizes. | |
ICArray (int sizeRows, int sizeCols, Type const &value) | |
constructor with specified sizes and value. | |
ICArray (Derived const &T, bool ref=false) | |
copy or wrapper constructor. | |
ICArray (Type *const &q, int sizeRows, int sizeCols) | |
wrapper constructor for 0 based C-Array. | |
template<class OtherAllocator > | |
ICArray (ITContainer2D< OtherAllocator > const &allocator, Range const &I, Range const &J) | |
constructor by reference, ref_=1. | |
template<class OtherAllocator > | |
ICArray (ITContainer2D< OtherAllocator > const &allocator) | |
constructor by reference, ref_=1. | |
~ICArray () | |
destructor | |
![]() | |
ArrayBase () | |
Default constructor. | |
~ArrayBase () | |
destructor | |
![]() | |
ExprBase () | |
Default constructor. | |
~ExprBase () | |
destructor | |
Protected Attributes | |
Allocator | allocator_ |
allocator of the memory | |
s
Interface class for CArray, CArrayPoint, CArrayVector, CArraySquare, CArrayNumber.
This class is the base that is inherited by all objects (matrix, vector, point) which are not expression and stored as CArrays. The common API for these objects is contained in this class.
This is essentially a wrapper of a CAllocator
Derived | is the derived type, e.g., a matrix type. |
Definition at line 126 of file STK_ICArray.h.
typedef hidden::Traits<Derived>::Allocator STK::ICArray< Derived >::Allocator |
Definition at line 130 of file STK_ICArray.h.
typedef ArrayBase<Derived> STK::ICArray< Derived >::Base |
Definition at line 129 of file STK_ICArray.h.
typedef hidden::Traits<Derived>::Col STK::ICArray< Derived >::Col |
Definition at line 133 of file STK_ICArray.h.
typedef TRange<sizeCols_> STK::ICArray< Derived >::ColRange |
Type of the Range for the columns.
Definition at line 148 of file STK_ICArray.h.
typedef hidden::Traits<Derived>::Row STK::ICArray< Derived >::Row |
Definition at line 132 of file STK_ICArray.h.
typedef TRange<sizeRows_> STK::ICArray< Derived >::RowRange |
Type of the Range for the rows.
Definition at line 146 of file STK_ICArray.h.
typedef hidden::Traits<Derived>::Type STK::ICArray< Derived >::Type |
Definition at line 134 of file STK_ICArray.h.
typedef hidden::Traits<Derived>::TypeConst STK::ICArray< Derived >::TypeConst |
Definition at line 135 of file STK_ICArray.h.
Enumerator | |
---|---|
structure_ | |
orient_ | |
sizeRows_ | |
sizeCols_ | |
storage_ |
Definition at line 137 of file STK_ICArray.h.
|
inlineprotected |
|
inlineprotected |
constructor with specified sizes.
sizeRows,sizeCols | size of the rows and columns |
Definition at line 158 of file STK_ICArray.h.
|
inlineprotected |
constructor with specified sizes and value.
sizeRows,sizeCols | size of the rows and columns |
value | the value to set |
Definition at line 163 of file STK_ICArray.h.
|
inlineprotected |
copy or wrapper constructor.
T | size of the rows |
ref | is this owning its own data ? |
Definition at line 168 of file STK_ICArray.h.
|
inlineprotected |
wrapper constructor for 0 based C-Array.
q | pointer on the array |
sizeRows,sizeCols | size of the rows and columns |
Definition at line 173 of file STK_ICArray.h.
|
inlineprotected |
constructor by reference, ref_=1.
allocator | the allocator to wrap |
I,J | range of the rows and columns to wrap |
Definition at line 179 of file STK_ICArray.h.
|
inlineprotected |
constructor by reference, ref_=1.
allocator | with the data |
Definition at line 186 of file STK_ICArray.h.
|
inlineprotected |
|
inline |
Get a constant reference on the main allocator.
Definition at line 206 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
clear all allocated memory .
Definition at line 198 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::CvHandler::setData(), and STK::PartitionHandler::setData().
|
inline |
implement the col operator using a reference on the column of the allocator
j | index of the column to reference |
Definition at line 317 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::KmmBase< Derived >::compute_dik(), STK::IMixtureStatModel::computeICL(), main(), STK::GammaBase< Derived >::moments(), STK::ICArray< Derived >::operator()(), STK::DiagGaussian_s< Array >::randomInit(), STK::DiagGaussian_sj< Array >::randomInit(), STK::DiagGaussian_sjk< Array >::randomInit(), STK::DiagGaussian_sjsk< Array >::randomInit(), STK::DiagGaussian_sk< Array >::randomInit(), STK::HDGaussian_AjkBkQkD< Array >::randomInit(), STK::Categorical_pjk< Array >::run(), STK::DiagGaussian_s< Array >::run(), STK::DiagGaussian_sj< Array >::run(), STK::DiagGaussian_sjk< Array >::run(), STK::DiagGaussian_sjsk< Array >::run(), STK::DiagGaussian_sk< Array >::run(), STK::HDGaussian_AjkBkQkD< Array >::run(), STK::DiagGaussianBase< Derived >::updateMean(), and STK::HDGaussianBase< Derived >::updateMean().
|
inline |
implement the col operator using a reference on the column of the allocator
I,j | range of the rows and index of the column to reference |
Definition at line 323 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the col operator using a reference on a range of columns of the allocator
J | range of columns to reference |
Definition at line 329 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
Definition at line 193 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the const element accessor for number arrays
Definition at line 221 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the writable element accessor for number arrays
Definition at line 223 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the const element accessor for vector/point/diagonal arrays
Definition at line 216 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the writable element accessor for vector/point/diagonal arrays
Definition at line 218 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the const element accessor
Definition at line 211 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the writable element accessor
Definition at line 213 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
true
if the container is empty, false
otherwise Definition at line 201 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::ISymEigen< Derived >::run().
|
inline |
exchange this with T.
T | the container to exchange with this |
Definition at line 408 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
true
if *this is reference container, false
otherwise Definition at line 203 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::computeLS(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::shift(), and STK::ICArray< Derived >::shift().
|
inline |
move T to this.
T | the array to move |
Definition at line 412 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
|
inline |
Definition at line 286 of file STK_ICArray.h.
|
inline |
i,j | indexes of the element to get |
Definition at line 234 of file STK_ICArray.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
i,j | row and column indexes |
Definition at line 247 of file STK_ICArray.h.
References STKOUT_OF_RANGE_2ARG.
|
inline |
i,J | index of the row and range of the columns |
i
in range J
Definition at line 304 of file STK_ICArray.h.
References STK::ICArray< Derived >::row().
|
inline |
I,J | range of the rows and columns |
I
, J
Definition at line 368 of file STK_ICArray.h.
References STK::ICArray< Derived >::sub().
|
inline |
I,j | range of the rows and index of the column to reference |
j
of this in the range I
Definition at line 335 of file STK_ICArray.h.
References STK::ICArray< Derived >::col().
|
inline |
i | index of the element to get |
Definition at line 261 of file STK_ICArray.h.
References STK_STATIC_ASSERT_ONE_DIMENSION_ONLY, and STKOUT_OF_RANGE_1ARG.
|
inline |
i | index of the element to get |
Definition at line 273 of file STK_ICArray.h.
References STK_STATIC_ASSERT_ONE_DIMENSION_ONLY, and STKOUT_OF_RANGE_1ARG.
|
inline |
I | range to get |
Definition at line 352 of file STK_ICArray.h.
References STK_STATIC_ASSERT_ONE_DIMENSION_ONLY, and STK::ICArray< Derived >::sub().
|
inline |
Definition at line 208 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::computeLS(), STK::lapack::Qr::computeQr(), STK::lapack::Svd::computeSvd(), and STK::lapack::SymEigen< SquareArray >::runImpl().
|
inline |
Resize the vector/point/diagonal/square array.
size | Range of the vector/point/diagonal/square array |
Definition at line 482 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STK::ICArray< Derived >::isRef(), STK::ICArray< Derived >::resize(), and STKRUNTIME_ERROR_1ARG.
|
inline |
resize the Array.
I,J | range of the rows and columns |
Definition at line 444 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STK::Arrays::array2D_, STK::Arrays::diagonal_, STK::ICArray< Derived >::isRef(), STK::Arrays::lower_symmetric_, STK::Arrays::lower_triangular_, STK::ICArray< Derived >::resize(), STK::Arrays::square_, STK_STATIC_ASSERT, STKRUNTIME_ERROR_2ARG, STK::ICArray< Derived >::structure_, STK::Arrays::symmetric_, STK::Arrays::upper_symmetric_, and STK::Arrays::upper_triangular_.
Referenced by STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::computeLS(), STK::lapack::Svd::computeSvd(), STK::Stat::Factor< Array >::Factor(), STK::Stat::MultiFactor< Array >::MultiFactor(), STK::CvHandler::partition(), STK::PartitionHandler::partition(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::resize(), STK::Bernoulli_pjParameters::resize(), STK::DiagGaussian_muj_sjParameters::resize(), STK::ModelGamma_aj_bjParameters::resize(), STK::ICArray< Derived >::resize(), STK::ISymEigen< Derived >::setData(), and STK::WeightedSvd< Array, WRows, WCols >::WeightedSvd().
|
inline |
Resize the vector/point/diagonal/square array.
I | Range of the vector |
Definition at line 469 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STK::ICArray< Derived >::isRef(), STK::ICArray< Derived >::resize(), and STKRUNTIME_ERROR_1ARG.
|
inline |
implement the row operator using a reference on the row of the allocator
i | index of the row to reference |
Definition at line 292 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
Referenced by STK::IMixtureComposer::cStep(), STK::IMixtureComposer::eStep(), STK::MixtureSemiLearner::initializeMixtureParameters(), main(), STK::IMixtureLearner::mapStep(), STK::IMixtureComposer::mapStep(), STK::ICArray< Derived >::operator()(), STK::IMixtureComposer::randomTik(), STK::MixtureSemiLearner::randomTik(), STK::MixtureSemiLearner::setLabels(), STK::IMixtureStatModel::setMixtureParameters(), STK::IMixtureStatModel::setMixtureParameters(), STK::ModelParameters< Clust::Gaussian_sjsk_ >::setParameters(), and STK::IMixtureComposer::sStep().
|
inline |
implement the row operator using a reference on the row of the allocator
i,J | index of the row and range of the columns to reference |
Definition at line 298 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the row operator using a reference on a range of rows of the allocator
I | range of the rows to reference |
Definition at line 310 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
Definition at line 195 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement setValue for vector/point/diagonal arrays
Definition at line 228 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement setValue for vector/point/diagonal arrays
Definition at line 226 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
shift the Array.
beginRows,beginCols | first indexes of the rows and columns |
Definition at line 416 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STK::Arrays::array2D_, STK::ICArray< Derived >::isRef(), STK::Arrays::lower_triangular_, STK::ICArray< Derived >::shift(), STK_STATIC_ASSERT, STKRUNTIME_ERROR_2ARG, STK::ICArray< Derived >::structure_, and STK::Arrays::upper_triangular_.
Referenced by STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::computeLS(), STK::lapack::Svd::computeSvd(), STK::lapack::Qr::runImpl(), STK::lapack::SymEigen< SquareArray >::runImpl(), STK::ICArray< Derived >::shift(), and STK::ICArray< Derived >::shift().
|
inline |
shift the Array.
firstIdx | first index of the vector/point/diagonal/square array. |
Definition at line 433 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STK::ICArray< Derived >::isRef(), STK::ICArray< Derived >::shift(), and STKRUNTIME_ERROR_1ARG.
|
inline |
implement the sub operator for 2D arrays using references on a range of rows and columns of the allocator
I,J | range of the rows and columns to reference |
Definition at line 362 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_.
|
inline |
implement the sub operator for 1D arrays using a reference on the row/column of the allocator
J | range to get |
Definition at line 343 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, and STK_STATIC_ASSERT_ONE_DIMENSION_ONLY.
Referenced by STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::computeLS(), main(), STK::ICArray< Derived >::operator()(), STK::ICArray< Derived >::operator[](), STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::runImpl(), and STK::lapack::MultiLeastSquare< ArrayB, ArrayA >::runImpl().
|
inline |
swap two elements: only for vectors an points.
Definition at line 372 of file STK_ICArray.h.
|
inline |
pos1,pos2 | positions of the columns to swap |
Definition at line 374 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STKOUT_OF_RANGE_2ARG, and STK::ICArray< Derived >::swapCols().
Referenced by STK::ICArray< Derived >::swapCols().
|
inline |
pos1,pos2 | positions of the rows to swap |
Definition at line 390 of file STK_ICArray.h.
References STK::ICArray< Derived >::allocator_, STKOUT_OF_RANGE_2ARG, and STK::ICArray< Derived >::swapRows().
Referenced by STK::ICArray< Derived >::swapRows().
|
protected |
allocator of the memory
Definition at line 152 of file STK_ICArray.h.
Referenced by STK::ICArray< Derived >::allocator(), STK::ICArray< Derived >::clear(), STK::ICArray< Derived >::col(), STK::ICArray< Derived >::col(), STK::ICArray< Derived >::col(), STK::ICArray< Derived >::colsImpl(), STK::ICArray< Derived >::elt0Impl(), STK::ICArray< Derived >::elt0Impl(), STK::ICArray< Derived >::elt1Impl(), STK::ICArray< Derived >::elt1Impl(), STK::ICArray< Derived >::elt2Impl(), STK::ICArray< Derived >::elt2Impl(), STK::ICArray< Derived >::empty(), STK::ICArray< Derived >::exchange(), STK::ICArray< Derived >::isRef(), STK::ICArray< Derived >::move(), STK::ICArray< Derived >::p_data(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::resize(), STK::ICArray< Derived >::row(), STK::ICArray< Derived >::row(), STK::ICArray< Derived >::row(), STK::ICArray< Derived >::rowsImpl(), STK::ICArray< Derived >::setValueImpl(), STK::ICArray< Derived >::setValueImpl(), STK::ICArray< Derived >::shift(), STK::ICArray< Derived >::shift(), STK::ICArray< Derived >::sub(), STK::ICArray< Derived >::sub(), STK::ICArray< Derived >::swapCols(), and STK::ICArray< Derived >::swapRows().