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

A CArray is a two dimensional array with a continuous storage like a C-array. More...

#include <STK_CArray.h>

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

Public Types

enum  {
  structure_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::structure_ , orient_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::orient_ , sizeRows_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::sizeRows_ , sizeCols_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::sizeCols_ ,
  storage_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::storage_
}
 
typedef ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > > Base
 
typedef ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > > LowBase
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Row Row
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Col Col
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Type Type
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::TypeConst TypeConst
 
- Public Types inherited from STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >
enum  
 
typedef ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > > Base
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Allocator Allocator
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Row Row
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Col Col
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::Type Type
 
typedef hidden::Traits< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::TypeConst TypeConst
 
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::ArrayBase< Derived >
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
 
- Public Types inherited from STK::ExprBase< Derived >
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
 

Public Member Functions

 CArray ()
 Default constructor.
 
 CArray (int sizeRows, int sizeCols)
 constructor with specified dimension.
 
 CArray (Range rows, Range cols)
 constructor with specified ranges.
 
 CArray (int sizeRows, int sizeCols, Type const &v)
 constructor with specified size, initialization with a constant.
 
 CArray (Range rows, Range cols, Type const &v)
 constructor with specified ranges, initialization with a constant.
 
 CArray (CArray const &T, bool ref=false)
 Copy constructor.
 
template<class OtherArray >
 CArray (ICArray< OtherArray > const &T, Range const &I, Range const &J)
 Copy constructor by reference, ref_=1.
 
 CArray (Type *const &q, int sizeRows, int sizeCols)
 wrapper constructor for 0 based C-Array.
 
template<class OtherAllocator >
 CArray (ITContainer2D< OtherAllocator > const &allocator)
 constructor by reference.
 
template<class OtherDerived >
 CArray (ExprBase< OtherDerived > const &T)
 Copy constructor using an expression.
 
 ~CArray ()
 destructor.
 
CArrayoperator= (Type const &v)
 operator= : set the container to a constant value.
 
template<class Rhs >
CArrayoperator= (ExprBase< Rhs > const &rhs)
 operator = : overwrite this with the Right hand side rhs.
 
CArrayoperator= (CArray const &rhs)
 operator = : overwrite the CArray with the Right hand side rhs.
 
- Public Member Functions inherited from STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >
ColRange constcolsImpl () const
 
RowRange constrowsImpl () const
 
void clear ()
 clear all allocated memory .
 
bool empty () const
 
bool isRef () const
 
Allocator constallocator () const
 Get a constant reference on the main allocator.
 
Type *constp_data () const
 
Typeelt2Impl (int i, int j)
 implement the const element accessor
 
TypeConst elt2Impl (int i, int j) const
 implement the writable element accessor
 
Typeelt1Impl (int j)
 implement the const element accessor for vector/point/diagonal arrays
 
TypeConst elt1Impl (int j) const
 implement the writable element accessor for vector/point/diagonal arrays
 
Typeelt0Impl ()
 implement the const element accessor for number arrays
 
TypeConst elt0Impl () const
 implement the writable element accessor for number arrays
 
void setValueImpl (int j, TypeConst value)
 implement setValue for vector/point/diagonal arrays
 
void setValueImpl (int i, int j, TypeConst value)
 implement setValue for vector/point/diagonal arrays
 
Typeoperator() (int i, int j)
 
TypeConst operator() (int i, int j) const
 
Typeoperator() ()
 
TypeConst operator() () const
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, 1, Size_ >::Result operator() (int i, TRange< Size_ > const &J) const
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, Size_, 1 >::Result operator() (TRange< Size_ > const &I, int j) const
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, OtherRows_, OtherCols_ >::Result operator() (TRange< OtherRows_ > const &I, TRange< OtherCols_ > const &J) const
 
Typeoperator[] (int i)
 
TypeConst operator[] (int i) const
 
hidden::CSliceDispatcher< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, Size >::Result operator[] (TRange< Size > const &I) const
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, 1, sizeCols_ >::Result row (int i) const
 implement the row operator using a reference on the row of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, 1, Size_ >::Result row (int i, TRange< Size_ > const &J) const
 implement the row operator using a reference on the row of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, Size_, sizeCols_ >::Result row (TRange< Size_ > const &I) const
 implement the row operator using a reference on a range of rows of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, sizeRows_, 1 >::Result col (int j) const
 implement the col operator using a reference on the column of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, Size_, 1 >::Result col (TRange< Size_ > const &I, int j) const
 implement the col operator using a reference on the column of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, sizeRows_, Size_ >::Result col (TRange< Size_ > const &J) const
 implement the col operator using a reference on a range of columns of the allocator
 
hidden::CSliceDispatcher< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, Size >::Result sub (TRange< Size > const &J) const
 implement the sub operator for 1D arrays using a reference on the row/column of the allocator
 
hidden::CSlice< CArray< Type_, SizeRows_, SizeCols_, Orient_ >, OtherRows_, OtherCols_ >::Result sub (TRange< OtherRows_ > const &I, TRange< OtherCols_ > const &J) const
 implement the sub operator for 2D arrays using references on a range of rows and columns of the allocator
 
void swap (int i, int j)
 swap two elements: only for vectors an points.
 
void swapCols (int pos1, int pos2)
 
void swapRows (int pos1, int pos2)
 
void exchange (CArray< Type_, SizeRows_, SizeCols_, Orient_ > &T)
 exchange this with T.
 
void move (CArray< Type_, SizeRows_, SizeCols_, Orient_ > const &T)
 move T to this.
 
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & shift (int beginRows, int beginCols)
 shift the Array.
 
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & shift (int firstIdx)
 shift the Array.
 
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & resize (Range const &I, Range const &J)
 resize the Array.
 
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & resize (TRange< Size_ > const &I)
 Resize the vector/point/diagonal/square array.
 
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & resize (int size)
 Resize the vector/point/diagonal/square array.
 
- Public Member Functions inherited from STK::ArrayBase< Derived >
template<typename Visitor >
void apply (Visitor &visitor)
 Apply the Visitor visitor to the whole coefficients of the array.
 
Derived & randUnif ()
 set random values to this using a uniform law.
 
Derived & randGauss ()
 set random values to this using a standard gaussian law.
 
Derived & rand (Law::IUnivLaw< Type > const &law)
 set random values to this using a distribution law given by the user.
 
Derived & setOnes ()
 set one to this using a Visitor.
 
Derived & setZeros ()
 set zero to this using a Visitor.
 
Derived & ones ()
 set one to this using a Visitor.
 
Derived & zeros ()
 set zero to this using a Visitor.
 
Derived & setValue (TypeConst value)
 set a value to this container.
 
void setValue (int i, TypeConst value)
 set a value to this container at index i.
 
void setValue (int i, int j, TypeConst value)
 set a value to this container at position (i,j).
 
template<class Rhs >
Derived & assign (ExprBase< Rhs > const &rhs)
 
Derived & operator= (Type const &value)
 
Derived & operator= (Derived const &rhs)
 
template<typename Rhs >
Derived & operator= (ExprBase< Rhs > const &rhs)
 
template<typename Rhs >
Derived & operator+= (ExprBase< Rhs > const &other)
 Add Rhs to this.
 
template<typename Rhs >
Derived & operator-= (ExprBase< Rhs > const &other)
 subtract a Rhs to this.
 
template<typename Rhs >
Derived & operator/= (ExprBase< Rhs > const &other)
 divide this by Rhs.
 
template<typename Rhs >
Derived & operator%= (ExprBase< Rhs > const &other)
 Take modulo of this by Rhs.
 
template<typename Rhs >
Derived & operator*= (ExprBase< Rhs > const &other)
 multiply this by Rhs.
 
Derived & operator+= (Type const &other)
 Adding a constant to this.
 
Derived & operator-= (Type const &other)
 Subtract a constant to this.
 
Derived & operator*= (Type const &other)
 product of this by a constant.
 
Derived & operator/= (Type const &other)
 dividing this by a constant.
 
Derived & operator%= (Type const &other)
 take modulo of this by a constant.
 
template<class Rhs >
Derived & copy (ExprBase< Rhs > const &rhs)
 overwrite this with src.
 
TransposeOperator< Derived > const transpose () const
 
TransposeAccessor< Derived > transpose ()
 
DiagonalizeOperator< Derived > const diagonalize () const
 
DiagonalizeAccessor< Derived > diagonalize ()
 
DiagonalGetterOperator< Derived > const getDiagonal () const
 
DiagonalGetterAccessor< Derived > getDiagonal ()
 
UpperTriangularizeOperator< Derived > const upperTriangularize () const
 
UpperTriangularizeAccessor< Derived > upperTriangularize ()
 
LowerTriangularizeOperator< Derived > const lowerTriangularize () const
 
LowerTriangularizeAccessor< Derived > lowerTriangularize ()
 
SymmetrizeOperator< Derived > const symmetrize () const
 
SymmetrizeAccessor< Derived > symmetrize ()
 
UpperSymmetrizeOperator< Derived > const upperSymmetrize () const
 
UpperSymmetrizeAccessor< Derived > upperSymmetrize ()
 
LowerSymmetrizeOperator< Derived > const lowerSymmetrize () const
 
LowerSymmetrizeAccessor< Derived > lowerSymmetrize ()
 
ColOperator< Derived > const col (int j) const
 
RowOperator< Derived > const row (int i) const
 
template<int Size_>
SubVectorOperator< Derived, Size_ > const sub (TRange< Size_ > const &I) const
 
template<int SizeRows_, int SizeCols_>
SubOperator< Derived, SizeRows_, SizeCols_ > const sub (TRange< SizeRows_ > const &I, TRange< SizeCols_ > const &J) const
 
ColAccessor< Derived > col (int j)
 
RowAccessor< Derived > row (int i)
 
template<int Size_>
SubVectorAccessor< Derived, Size_sub (TRange< Size_ > const &I)
 
template<int SizeRows_, int SizeCols_>
SubAccessor< Derived, SizeRows_, SizeCols_sub (TRange< SizeRows_ > const &I, TRange< SizeCols_ > const &J)
 
TypeConst operator() (int i, int j) const
 
Typeoperator() (int i, int j)
 
TypeConst operator[] (int i) const
 
Typeoperator[] (int i)
 
TypeConst operator() () const
 
Typeoperator() ()
 
ArrayInitializer< Derived > operator<< (Type const &s)
 Convenient operator to set the coefficients of a matrix.
 
template<typename Rhs >
ArrayInitializer< Derived > operator<< (ArrayBase< Rhs > const &other)
 
- Public Member Functions inherited from STK::ExprBase< Derived >
template<typename Visitor >
Visitor::TypeConst visit (Visitor &visitor) const
 Visit the container using a constant visitor.
 
int count () const
 compute the value of non-zero element in an expression.
 
bool const any () const
 check if there is any non-zero element in an expression.
 
bool const all () const
 check if all the elements in an expression are not zero.
 
int nbAvailableValues () const
 
Type const minElt (int &row, int &col) const
 
Type const minEltSafe (int &row, int &col) const
 
Type const maxElt (int &row, int &col) const
 
Type const maxEltSafe (int &row, int &col) const
 
Type const minElt (int &pos) const
 
Type const minEltSafe (int &pos) const
 
Type const maxElt (int &pos) const
 
Type const maxEltSafe (int &pos) const
 
Type const minElt () const
 
Type const minEltSafe () const
 
Type const maxElt () const
 
Type const maxEltSafe () const
 
Type const sum () const
 
Type const sumSafe () const
 
Type const norm () const
 
Type const normSafe () const
 
Type const norm2 () const
 
Type const norm2Safe () const
 
Type const normInf () const
 
Type const mean () const
 
Type const meanSafe () const
 
Type const variance () const
 
Type const varianceSafe () const
 
Type const variance (Type const &mean) const
 
Type const varianceSafe (Type const &mean) const
 
template<typename Rhs >
Type const wsum (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wsumSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wnorm (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wnormSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wnorm2 (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wnorm2Safe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wmean (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wmeanSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wvariance (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wvarianceSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wvariance (Type const &mean, ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
Type const wvarianceSafe (Type const &mean, ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::equalOp_ >::Result const operator== (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::notEqualOp_ >::Result const operator!= (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::greaterThanOp_ >::Result const operator> (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::lessThanOp_ >::Result const operator< (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::greaterThanOrEqualOp_ >::Result const operator>= (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::lessThanOrEqualOp_ >::Result const operator<= (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::sumOp_ >::Result const operator+ (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::differenceOp_ >::Result const operator- (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::productOp_ >::Result const prod (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::divisionOp_ >::Result const operator/ (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::moduloOp_ >::Result const operator% (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::minOp_ >::Result const min (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::maxOp_ >::Result const max (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::logicalAndOp_ >::Result const operator&& (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::logicalOrOp_ >::Result const operator|| (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::bitwiseAndOp_ >::Result const operator& (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::bitwiseOrOp_ >::Result const operator| (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::OperatorSelector< Derived, Rhs, Arrays::bitwiseXorOp_ >::Result const operator^ (ExprBase< Rhs > const &other) const
 
UnaryOperator< OppositeOp< Type >, Derived > operator- () const
 
UnaryOperator< IsNaOp< Type >, Derived > isNA () const
 
UnaryOperator< NegOp< Type >, Derived > neg () const
 
UnaryOperator< IsFiniteOp< Type >, Derived > isFinite () const
 
UnaryOperator< IsInfiniteOp< Type >, Derived > isInfinite () const
 
UnaryOperator< AbsOp< Type >, Derived > abs () const
 
UnaryOperator< ExpOp< Type >, Derived > exp () const
 
UnaryOperator< LogOp< Type >, Derived > log () const
 
UnaryOperator< SqrtOp< Type >, Derived > sqrt () const
 
UnaryOperator< CosOp< Type >, Derived > cos () const
 
UnaryOperator< SinOp< Type >, Derived > sin () const
 
UnaryOperator< AcosOp< Type >, Derived > acos () const
 
UnaryOperator< AsinOp< Type >, Derived > asin () const
 
UnaryOperator< TanOp< Type >, Derived > tan () const
 
UnaryOperator< InverseOp< Type >, Derived > inverse () const
 
UnaryOperator< SquareOp< Type >, Derived > square () const
 
UnaryOperator< CubeOp< Type >, Derived > cube () const
 
UnaryOperator< EqualWithOp< Type >, Derived > operator== (Type const &value) const
 
UnaryOperator< NotEqualWithOp< Type >, Derived > operator!= (Type const &value) const
 
UnaryOperator< GreaterThanOp< Type >, Derived > operator> (Type const &value) const
 
UnaryOperator< LessThanOp< Type >, Derived > operator< (Type const &value) const
 
UnaryOperator< LeqThanOp< Type >, Derived > operator<= (Type const &value) const
 
UnaryOperator< GeqThanOp< Type >, Derived > operator>= (Type const &value) const
 
UnaryOperator< MinWithOp< Type >, Derived > min (Type const &value) const
 
UnaryOperator< MaxWithOp< Type >, Derived > max (Type const &value) const
 
UnaryOperator< SumWithOp< Type >, Derived > operator+ (Type const &value) const
 
UnaryOperator< DifferenceWithOp< Type >, Derived > operator- (Type const &value) const
 
UnaryOperator< ProductWithOp< Type >, Derived > operator* (Type const &value) const
 
UnaryOperator< DivisionWithOp< Type >, Derived > operator/ (Type const &value) const
 
UnaryOperator< ModuloWithOp< Type >, Derived > operator% (Type const &value) const
 
UnaryOperator< LogicalAndWithOp< Type >, Derived > operator&& (Type const &value) const
 
UnaryOperator< LogicalOrWithOp< Type >, Derived > operator|| (Type const &value) const
 
UnaryOperator< BitwiseAndWithOp< Type >, Derived > operator& (Type const &value) const
 
UnaryOperator< BitwiseOrWithOp< Type >, Derived > operator| (Type const &value) const
 
UnaryOperator< BitwiseXorWithOp< Type >, Derived > operator^ (Type const &value) const
 
UnaryOperator< PowOp< Type >, Derived > pow (Type const &value) const
 
UnaryOperator< SafeInverseOp< Type >, Derived > safeInverse (Type const &value) const
 
UnaryOperator< SafeOp< Type >, Derived > const safe (Type const value=Type()) const
 
template<typename OtherType >
UnaryOperator< CastOp< Type, OtherType >, Derived > const cast () const
 
UnaryOperator< Law::PdfOp< Type >, Derived > pdf (Law::IUnivLaw< Type > const &law) const
 compute pdf values to this using distribution law given by user
 
UnaryOperator< Law::LogPdfOp< Type >, Derived > lpdf (Law::IUnivLaw< Type > const &law) const
 compute log-pdf values to this using distribution law given by user
 
UnaryOperator< Law::CdfOp< Type >, Derived > cdf (Law::IUnivLaw< Type > const &law) const
 compute cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::LogCdfOp< Type >, Derived > lcdf (Law::IUnivLaw< Type > const &law) const
 compute log-cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::CdfcOp< Type >, Derived > cdfc (Law::IUnivLaw< Type > const &law) const
 compute complementary cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::LogCdfcOp< Type >, Derived > lcdfc (Law::IUnivLaw< Type > const &law) const
 compute complementary cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::IcdfOp< Type >, Derived > icdf (Law::IUnivLaw< Type > const &law) const
 compute inverse cumulative distribution function using distribution law given by user
 
template<template< typename > class OtherOperator>
UnaryOperator< OtherOperator< Type >, Derived > const funct0 () const
 
template<template< typename > class OtherOperator>
UnaryOperator< OtherOperator< Type >, Derived > const funct1 (Type const value) const
 
TransposeOperator< Derived > const transpose () const
 
DiagonalizeOperator< Derived > const diagonalize () const
 
DiagonalGetterOperator< Derived > const getDiagonal () const
 
UpperTriangularizeOperator< Derived > const upperTriangularize () const
 
LowerTriangularizeOperator< Derived > const lowerTriangularize () const
 
SymmetrizeOperator< Derived > const symmetrize () const
 
UpperSymmetrizeOperator< Derived > const upperSymmetrize () const
 
LowerSymmetrizeOperator< Derived > const lowerSymmetrize () const
 
template<int Size_>
SubVectorOperator< Derived, Size_ > const sub (TRange< Size_ > const &I) const
 
ColOperator< Derived > const col (int j) const
 
RowOperator< Derived > const row (int i) const
 
template<int Size_>
SubOperator< Derived, sizeRows_, Size_ > const col (TRange< Size_ > const &J) const
 
template<int Size_>
SubOperator< Derived, Size_, sizeCols_ > const row (TRange< Size_ > const &I) const
 
template<int SizeRows_, int SizeCols_>
SubOperator< Derived, SizeRows_, SizeCols_ > const sub (TRange< SizeRows_ > const &I, TRange< SizeCols_ > const &J) const
 
template<class Rhs >
hidden::Promote< Type, typenameRhs::Type >::result_type const dot (ExprBase< Rhs > const &other) const
 
template<class Rhs >
hidden::Promote< Type, typenameRhs::Type >::result_type const dotSafe (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::ProductSelector< Derived, Rhs, hidden::Traits< Derived >::structure_, hidden::Traits< Rhs >::structure_ >::ProductType const operator* (ExprBase< Rhs > const &other) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wsum (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wsumSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wnorm (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wnormSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wnorm2 (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wnorm2Safe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wmean (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wmeanSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wvariance (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wvarianceSafe (ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wvariance (Type const &mean, ExprBase< Rhs > const &weights) const
 
template<typename Rhs >
hidden::Traits< Derived >::Type const wvarianceSafe (Type const &mean, ExprBase< Rhs > const &weights) const
 

Additional Inherited Members

- Protected Member Functions inherited from STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >
 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 (CArray< Type_, SizeRows_, SizeCols_, Orient_ > const &T, bool ref=false)
 copy or wrapper constructor.
 
 ICArray (Type *const &q, int sizeRows, int sizeCols)
 wrapper constructor for 0 based C-Array.
 
 ICArray (ITContainer2D< OtherAllocator > const &allocator, Range const &I, Range const &J)
 constructor by reference, ref_=1.
 
 ICArray (ITContainer2D< OtherAllocator > const &allocator)
 constructor by reference, ref_=1.
 
 ~ICArray ()
 destructor
 
- Protected Member Functions inherited from STK::ArrayBase< Derived >
 ArrayBase ()
 Default constructor.
 
 ~ArrayBase ()
 destructor
 
- Protected Member Functions inherited from STK::ExprBase< Derived >
 ExprBase ()
 Default constructor.
 
 ~ExprBase ()
 destructor
 
- Protected Attributes inherited from STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >
Allocator allocator_
 allocator of the memory

 

Detailed Description

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

A CArray is a two dimensional array with a continuous storage like a C-array.

Definition at line 129 of file STK_CArray.h.

Member Typedef Documentation

◆ Base

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef ICArray< CArray<Type_, SizeRows_, SizeCols_, Orient_> > STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::Base

Definition at line 132 of file STK_CArray.h.

◆ Col

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

Definition at line 136 of file STK_CArray.h.

◆ LowBase

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
typedef ArrayBase< CArray<Type_, SizeRows_, SizeCols_, Orient_> > STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::LowBase

Definition at line 133 of file STK_CArray.h.

◆ Row

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

Definition at line 135 of file STK_CArray.h.

◆ Type

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

Definition at line 137 of file STK_CArray.h.

◆ TypeConst

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

Definition at line 138 of file STK_CArray.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 140 of file STK_CArray.h.

141 {
142 structure_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::structure_,
143 orient_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::orient_,
144 sizeRows_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::sizeRows_,
145 sizeCols_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::sizeCols_,
146 storage_ = hidden::Traits< CArray<Type_, SizeRows_, SizeCols_, Orient_> >::storage_
147 };

Constructor & Destructor Documentation

◆ CArray() [1/10]

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

Default constructor.

Definition at line 150 of file STK_CArray.h.

150: Base() {}
ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > > Base
Definition STK_CArray.h:132

◆ CArray() [2/10]

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

constructor with specified dimension.

Parameters
sizeRows,sizeColssize of the rows and columns

Definition at line 154 of file STK_CArray.h.

154: Base(sizeRows, sizeCols) {}

◆ CArray() [3/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( Range  rows,
Range  cols 
)
inline

constructor with specified ranges.

Parameters
rows,colsrange of the rows and columns

Definition at line 158 of file STK_CArray.h.

158 : Base(rows.size(), cols.size())
159 { this->shift(rows.begin(), cols.begin());}
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & shift(int beginRows, int beginCols)
shift the Array.

References STK::RangeBase< Derived >::begin(), and STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::shift().

◆ CArray() [4/10]

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

constructor with specified size, initialization with a constant.

Parameters
sizeRows,sizeColssize of the rows and columns
vinitial value of the container

Definition at line 164 of file STK_CArray.h.

164: Base(sizeRows, sizeCols, v) {}

◆ CArray() [5/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( Range  rows,
Range  cols,
Type const v 
)
inline

constructor with specified ranges, initialization with a constant.

Parameters
rows,colsrange of the rows and columns
vinitial value of the container

Definition at line 169 of file STK_CArray.h.

169 : Base(rows.size(), cols.size(), v)
170 { this->shift(rows.begin(), cols.begin());}

References STK::RangeBase< Derived >::begin(), and STK::ICArray< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::shift().

◆ CArray() [6/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( CArray< Type_, SizeRows_, SizeCols_, Orient_ > const T,
bool  ref = false 
)
inline

Copy constructor.

Parameters
Tthe container to copy
reftrue if T is wrapped

Definition at line 175 of file STK_CArray.h.

175: Base(T, ref) {}

◆ CArray() [7/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
template<class OtherArray >
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( ICArray< OtherArray > const T,
Range const I,
Range const J 
)
inline

Copy constructor by reference, ref_=1.

Parameters
Tthe container to wrap
I,Jrange of the rows and columns to wrap

Definition at line 181 of file STK_CArray.h.

182 : Base(T.allocator(), I, J) {}

◆ CArray() [8/10]

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

wrapper constructor for 0 based C-Array.

Parameters
qpointer on the array
sizeRows,sizeColssize of the rows and columns

Definition at line 187 of file STK_CArray.h.

187: Base(q, sizeRows, sizeCols) {}

◆ CArray() [9/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
template<class OtherAllocator >
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( ITContainer2D< OtherAllocator > const allocator)
inline

constructor by reference.

Parameters
allocatorthe allocator to wrap

Definition at line 192 of file STK_CArray.h.

192: Base(allocator.asDerived()) {}
Allocator const & allocator() const
Get a constant reference on the main allocator.

◆ CArray() [10/10]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
template<class OtherDerived >
STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::CArray ( ExprBase< OtherDerived > const T)
inline

Copy constructor using an expression.

Parameters
Tthe container to wrap

Definition at line 197 of file STK_CArray.h.

197: Base(T.sizeRows(), T.sizeCols()) { LowBase::operator=(T);}
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & operator=(Type const &value)

References STK::ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::operator=().

◆ ~CArray()

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

destructor.

Definition at line 199 of file STK_CArray.h.

199{}

Member Function Documentation

◆ operator=() [1/3]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
CArray & STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::operator= ( CArray< Type_, SizeRows_, SizeCols_, Orient_ > const rhs)
inline

operator = : overwrite the CArray with the Right hand side rhs.

Parameters
rhsthe container to copy

Definition at line 212 of file STK_CArray.h.

212{ return LowBase::assign(rhs);}
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & assign(ExprBase< Rhs > const &rhs)

References STK::ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::assign().

◆ operator=() [2/3]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
template<class Rhs >
CArray & STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::operator= ( ExprBase< Rhs > const rhs)
inline

operator = : overwrite this with the Right hand side rhs.

Parameters
rhsthe container to copy

Definition at line 208 of file STK_CArray.h.

208{ return LowBase::assign(rhs.asDerived());}

References STK::ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::assign().

◆ operator=() [3/3]

template<typename Type_ , int SizeRows_, int SizeCols_, bool Orient_>
CArray & STK::CArray< Type_, SizeRows_, SizeCols_, Orient_ >::operator= ( Type const v)
inline

operator= : set the container to a constant value.

Parameters
vthe value to set

Definition at line 203 of file STK_CArray.h.

203{ return LowBase::setValue(v);}
CArray< Type_, SizeRows_, SizeCols_, Orient_ > & setValue(TypeConst value)
set a value to this container.

References STK::ArrayBase< CArray< Type_, SizeRows_, SizeCols_, Orient_ > >::setValue().


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