STK++ 0.9.13
STK::ColOperator< Lhs > Class Template Reference

Generic expression when the column of an expression is accessed. More...

#include <STK_SlicingOperators.h>

Inheritance diagram for STK::ColOperator< Lhs >:
Inheritance graph

Public Types

enum  {
  structure_ = hidden::Traits< ColOperator<Lhs> >::structure_ , orient_ = hidden::Traits< ColOperator<Lhs> >::orient_ , sizeRows_ = hidden::Traits< ColOperator<Lhs> >::sizeRows_ , sizeCols_ = hidden::Traits< ColOperator<Lhs> >::sizeCols_ ,
  storage_ = hidden::Traits< ColOperator<Lhs> >::storage_
}
 
typedef ExprBase< ColOperator< Lhs > > Base
 
typedef hidden::Traits< ColOperator< Lhs > >::Type Type
 
typedef hidden::Traits< ColOperator< Lhs > >::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::ExprBase< ColOperator< Lhs > >
enum  
 
typedef ITContainer< ColOperator< Lhs >, structure_ > Base
 
typedef hidden::Traits< ColOperator< Lhs > >::Type Type
 
typedef hidden::Traits< ColOperator< Lhs > >::TypeConst TypeConst
 

Public Member Functions

 ColOperator (Lhs const &lhs, int j)
 constructor
 
RowRange constrowsImpl () const
 
ColRange constcolsImpl () const
 
Lhs constlhs () const
 
TypeConst elt2Impl (int i, int j) const
 
TypeConst elt1Impl (int i) const
 
TypeConst elt0Impl () const
 access to the element
 
- Public Member Functions inherited from STK::ExprBase< ColOperator< Lhs > >
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 minElt (int &pos) const
 
Type const minElt () const
 
Type const minEltSafe (int &row, int &col) const
 
Type const minEltSafe (int &pos) const
 
Type const minEltSafe () const
 
Type const maxElt (int &row, int &col) const
 
Type const maxElt (int &pos) const
 
Type const maxElt () const
 
Type const maxEltSafe (int &row, int &col) const
 
Type const maxEltSafe (int &pos) 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 variance (Type const &mean) const
 
Type const varianceSafe () const
 
Type const varianceSafe (Type const &mean) const
 
Type const wsum (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wsum (ExprBase< Rhs > const &weights) const
 
Type const wsumSafe (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wsumSafe (ExprBase< Rhs > const &weights) const
 
Type const wnorm (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wnorm (ExprBase< Rhs > const &weights) const
 
Type const wnormSafe (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wnormSafe (ExprBase< Rhs > const &weights) const
 
Type const wnorm2 (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wnorm2 (ExprBase< Rhs > const &weights) const
 
Type const wnorm2Safe (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wnorm2Safe (ExprBase< Rhs > const &weights) const
 
Type const wmean (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wmean (ExprBase< Rhs > const &weights) const
 
Type const wmeanSafe (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wmeanSafe (ExprBase< Rhs > const &weights) const
 
Type const wvariance (ExprBase< Rhs > const &weights) const
 
Type const wvariance (Type const &mean, ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wvariance (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wvariance (Type const &mean, ExprBase< Rhs > const &weights) const
 
Type const wvarianceSafe (ExprBase< Rhs > const &weights) const
 
Type const wvarianceSafe (Type const &mean, ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wvarianceSafe (ExprBase< Rhs > const &weights) const
 
hidden::Traits< ColOperator< Lhs > >::Type const wvarianceSafe (Type const &mean, ExprBase< Rhs > const &weights) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::equalOp_ >::Result const operator== (ExprBase< Rhs > const &other) const
 
UnaryOperator< EqualWithOp< Type >, ColOperator< Lhs > > operator== (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::notEqualOp_ >::Result const operator!= (ExprBase< Rhs > const &other) const
 
UnaryOperator< NotEqualWithOp< Type >, ColOperator< Lhs > > operator!= (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::greaterThanOp_ >::Result const operator> (ExprBase< Rhs > const &other) const
 
UnaryOperator< GreaterThanOp< Type >, ColOperator< Lhs > > operator> (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::lessThanOp_ >::Result const operator< (ExprBase< Rhs > const &other) const
 
UnaryOperator< LessThanOp< Type >, ColOperator< Lhs > > operator< (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::greaterThanOrEqualOp_ >::Result const operator>= (ExprBase< Rhs > const &other) const
 
UnaryOperator< GeqThanOp< Type >, ColOperator< Lhs > > operator>= (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::lessThanOrEqualOp_ >::Result const operator<= (ExprBase< Rhs > const &other) const
 
UnaryOperator< LeqThanOp< Type >, ColOperator< Lhs > > operator<= (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::sumOp_ >::Result const operator+ (ExprBase< Rhs > const &other) const
 
UnaryOperator< SumWithOp< Type >, ColOperator< Lhs > > operator+ (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::differenceOp_ >::Result const operator- (ExprBase< Rhs > const &other) const
 
UnaryOperator< OppositeOp< Type >, ColOperator< Lhs > > operator- () const
 
UnaryOperator< DifferenceWithOp< Type >, ColOperator< Lhs > > operator- (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::productOp_ >::Result const prod (ExprBase< Rhs > const &other) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::divisionOp_ >::Result const operator/ (ExprBase< Rhs > const &other) const
 
UnaryOperator< DivisionWithOp< Type >, ColOperator< Lhs > > operator/ (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::moduloOp_ >::Result const operator% (ExprBase< Rhs > const &other) const
 
UnaryOperator< ModuloWithOp< Type >, ColOperator< Lhs > > operator% (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::minOp_ >::Result const min (ExprBase< Rhs > const &other) const
 
UnaryOperator< MinWithOp< Type >, ColOperator< Lhs > > min (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::maxOp_ >::Result const max (ExprBase< Rhs > const &other) const
 
UnaryOperator< MaxWithOp< Type >, ColOperator< Lhs > > max (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::logicalAndOp_ >::Result const operator&& (ExprBase< Rhs > const &other) const
 
UnaryOperator< LogicalAndWithOp< Type >, ColOperator< Lhs > > operator&& (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::logicalOrOp_ >::Result const operator|| (ExprBase< Rhs > const &other) const
 
UnaryOperator< LogicalOrWithOp< Type >, ColOperator< Lhs > > operator|| (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::bitwiseAndOp_ >::Result const operator& (ExprBase< Rhs > const &other) const
 
UnaryOperator< BitwiseAndWithOp< Type >, ColOperator< Lhs > > operator& (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::bitwiseOrOp_ >::Result const operator| (ExprBase< Rhs > const &other) const
 
UnaryOperator< BitwiseOrWithOp< Type >, ColOperator< Lhs > > operator| (Type const &value) const
 
hidden::OperatorSelector< ColOperator< Lhs >, Rhs, Arrays::bitwiseXorOp_ >::Result const operator^ (ExprBase< Rhs > const &other) const
 
UnaryOperator< BitwiseXorWithOp< Type >, ColOperator< Lhs > > operator^ (Type const &value) const
 
UnaryOperator< IsNaOp< Type >, ColOperator< Lhs > > isNA () const
 
UnaryOperator< NegOp< Type >, ColOperator< Lhs > > neg () const
 
UnaryOperator< IsFiniteOp< Type >, ColOperator< Lhs > > isFinite () const
 
UnaryOperator< IsInfiniteOp< Type >, ColOperator< Lhs > > isInfinite () const
 
UnaryOperator< AbsOp< Type >, ColOperator< Lhs > > abs () const
 
UnaryOperator< ExpOp< Type >, ColOperator< Lhs > > exp () const
 
UnaryOperator< LogOp< Type >, ColOperator< Lhs > > log () const
 
UnaryOperator< SqrtOp< Type >, ColOperator< Lhs > > sqrt () const
 
UnaryOperator< CosOp< Type >, ColOperator< Lhs > > cos () const
 
UnaryOperator< SinOp< Type >, ColOperator< Lhs > > sin () const
 
UnaryOperator< AcosOp< Type >, ColOperator< Lhs > > acos () const
 
UnaryOperator< AsinOp< Type >, ColOperator< Lhs > > asin () const
 
UnaryOperator< TanOp< Type >, ColOperator< Lhs > > tan () const
 
UnaryOperator< InverseOp< Type >, ColOperator< Lhs > > inverse () const
 
UnaryOperator< SquareOp< Type >, ColOperator< Lhs > > square () const
 
UnaryOperator< CubeOp< Type >, ColOperator< Lhs > > cube () const
 
UnaryOperator< ProductWithOp< Type >, ColOperator< Lhs > > operator* (Type const &value) const
 
hidden::ProductSelector< ColOperator< Lhs >, Rhs, hidden::Traits< ColOperator< Lhs > >::structure_, hidden::Traits< Rhs >::structure_ >::ProductType const operator* (ExprBase< Rhs > const &other) const
 
UnaryOperator< PowOp< Type >, ColOperator< Lhs > > pow (Type const &value) const
 
UnaryOperator< SafeInverseOp< Type >, ColOperator< Lhs > > safeInverse (Type const &value) const
 
UnaryOperator< SafeOp< Type >, ColOperator< Lhs > > const safe (Type const value=Type()) const
 
UnaryOperator< CastOp< Type, OtherType >, ColOperator< Lhs > > const cast () const
 
UnaryOperator< Law::PdfOp< Type >, ColOperator< Lhs > > pdf (Law::IUnivLaw< Type > const &law) const
 compute pdf values to this using distribution law given by user
 
UnaryOperator< Law::LogPdfOp< Type >, ColOperator< Lhs > > lpdf (Law::IUnivLaw< Type > const &law) const
 compute log-pdf values to this using distribution law given by user
 
UnaryOperator< Law::CdfOp< Type >, ColOperator< Lhs > > cdf (Law::IUnivLaw< Type > const &law) const
 compute cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::LogCdfOp< Type >, ColOperator< Lhs > > lcdf (Law::IUnivLaw< Type > const &law) const
 compute log-cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::CdfcOp< Type >, ColOperator< Lhs > > cdfc (Law::IUnivLaw< Type > const &law) const
 compute complementary cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::LogCdfcOp< Type >, ColOperator< Lhs > > lcdfc (Law::IUnivLaw< Type > const &law) const
 compute complementary cumulative distribution function of this using distribution law given by user
 
UnaryOperator< Law::IcdfOp< Type >, ColOperator< Lhs > > icdf (Law::IUnivLaw< Type > const &law) const
 compute inverse cumulative distribution function using distribution law given by user
 
UnaryOperator< OtherOperator< Type >, ColOperator< Lhs > > const funct0 () const
 
UnaryOperator< OtherOperator< Type >, ColOperator< Lhs > > const funct1 (Type const value) const
 
TransposeOperator< ColOperator< Lhs > > const transpose () const
 
DiagonalizeOperator< ColOperator< Lhs > > const diagonalize () const
 
DiagonalGetterOperator< ColOperator< Lhs > > const getDiagonal () const
 
UpperTriangularizeOperator< ColOperator< Lhs > > const upperTriangularize () const
 
LowerTriangularizeOperator< ColOperator< Lhs > > const lowerTriangularize () const
 
SymmetrizeOperator< ColOperator< Lhs > > const symmetrize () const
 
UpperSymmetrizeOperator< ColOperator< Lhs > > const upperSymmetrize () const
 
LowerSymmetrizeOperator< ColOperator< Lhs > > const lowerSymmetrize () const
 
SubVectorOperator< ColOperator< Lhs >, Size_ > const sub (TRange< Size_ > const &I) const
 
SubOperator< ColOperator< Lhs >, SizeRows_, SizeCols_ > const sub (TRange< SizeRows_ > const &I, TRange< SizeCols_ > const &J) const
 
ColOperator< ColOperator< Lhs > > const col (int j) const
 
SubOperator< ColOperator< Lhs >, sizeRows_, Size_ > const col (TRange< Size_ > const &J) const
 
RowOperator< ColOperator< Lhs > > const row (int i) const
 
SubOperator< ColOperator< Lhs >, Size_, sizeCols_ > const row (TRange< Size_ > const &I) const
 
hidden::Promote< Type, typenameRhs::Type >::result_type const dot (ExprBase< Rhs > const &other) const
 
hidden::Promote< Type, typenameRhs::Type >::result_type const dotSafe (ExprBase< Rhs > const &other) const
 

Protected Attributes

Lhs constlhs_
 
const int j_
 
const RowRange rows_
 
const ColRange cols_
 

Additional Inherited Members

- Static Public Member Functions inherited from STK::TRef< 1 >
static bool isRef ()
 
- Protected Member Functions inherited from STK::ExprBase< ColOperator< Lhs > >
 ExprBase ()
 Default constructor.
 
 ~ExprBase ()
 destructor
 

Detailed Description

template<typename Lhs>
class STK::ColOperator< Lhs >

Generic expression when the column of an expression is accessed.

Template Parameters
Lhsthe type of the expression to which we are applying the column operator.

This class represents an expression where a column accessor is applied to an expression. It is the return type of the col operation.

Most of the time, this is the only way that it is used, so you typically don't have to name ColOperator type explicitly.

Definition at line 183 of file STK_SlicingOperators.h.

Member Typedef Documentation

◆ Base

Definition at line 186 of file STK_SlicingOperators.h.

◆ ColRange

Type of the Range for the columns.

Definition at line 200 of file STK_SlicingOperators.h.

◆ RowRange

Type of the Range for the rows.

Definition at line 198 of file STK_SlicingOperators.h.

◆ Type

Definition at line 187 of file STK_SlicingOperators.h.

◆ TypeConst

template<typename Lhs >
typedef hidden::Traits<ColOperator<Lhs>>::TypeConst STK::ColOperator< Lhs >::TypeConst

Definition at line 188 of file STK_SlicingOperators.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename Lhs >
anonymous enum
Enumerator
structure_ 
orient_ 
sizeRows_ 
sizeCols_ 
storage_ 

Definition at line 189 of file STK_SlicingOperators.h.

190 {
191 structure_ = hidden::Traits< ColOperator<Lhs> >::structure_,
192 orient_ = hidden::Traits< ColOperator<Lhs> >::orient_,
193 sizeRows_ = hidden::Traits< ColOperator<Lhs> >::sizeRows_,
194 sizeCols_ = hidden::Traits< ColOperator<Lhs> >::sizeCols_,
195 storage_ = hidden::Traits< ColOperator<Lhs> >::storage_
196 };

Constructor & Destructor Documentation

◆ ColOperator()

template<typename Lhs >
STK::ColOperator< Lhs >::ColOperator ( Lhs const lhs,
int  j 
)
inline

constructor

Definition at line 203 of file STK_SlicingOperators.h.

204 : Base(), lhs_(lhs), j_(j), rows_(lhs_.rangeRowsInCol(j_)), cols_(j_,1) {}
ExprBase< ColOperator< Lhs > > Base
Lhs const & lhs() const

Member Function Documentation

◆ colsImpl()

template<typename Lhs >
ColRange const & STK::ColOperator< Lhs >::colsImpl ( ) const
inline
Returns
the columns range

Definition at line 211 of file STK_SlicingOperators.h.

211{ return cols_;}

◆ elt0Impl()

template<typename Lhs >
TypeConst STK::ColOperator< Lhs >::elt0Impl ( ) const
inline

access to the element

Definition at line 230 of file STK_SlicingOperators.h.

230{ return (lhs_.elt(j_));}

◆ elt1Impl()

template<typename Lhs >
TypeConst STK::ColOperator< Lhs >::elt1Impl ( int  i) const
inline
Returns
the element ith element
Parameters
iindex of the element to get

Definition at line 228 of file STK_SlicingOperators.h.

228{ return (lhs_.elt(i, j_));}

◆ elt2Impl()

template<typename Lhs >
TypeConst STK::ColOperator< Lhs >::elt2Impl ( int  i,
int  j 
) const
inline
Returns
the ith element of the column
Parameters
i,jindexes of the element

Definition at line 218 of file STK_SlicingOperators.h.

219 {
220#ifdef STK_BOUNDS_CHECK
221 if (j != j_) { STKRUNTIME_ERROR_2ARG(ColOperatorBase::elt2Impl,i,j,column index is not valid);}
222#endif
223 return (lhs_.elt(i, j_));
224 }
#define STKRUNTIME_ERROR_2ARG(Where, Arg1, Arg2, Error)
Definition STK_Macros.h:120

References STKRUNTIME_ERROR_2ARG.

◆ lhs()

template<typename Lhs >
Lhs const & STK::ColOperator< Lhs >::lhs ( ) const
inline
Returns
the left hand side expression

Definition at line 214 of file STK_SlicingOperators.h.

214{ return lhs_; }

◆ rowsImpl()

template<typename Lhs >
RowRange const & STK::ColOperator< Lhs >::rowsImpl ( ) const
inline
Returns
the range of the rows

Definition at line 209 of file STK_SlicingOperators.h.

209{ return rows_;}

Member Data Documentation

◆ cols_

template<typename Lhs >
const ColRange STK::ColOperator< Lhs >::cols_
protected

Definition at line 236 of file STK_SlicingOperators.h.

◆ j_

template<typename Lhs >
const int STK::ColOperator< Lhs >::j_
protected

Definition at line 234 of file STK_SlicingOperators.h.

◆ lhs_

template<typename Lhs >
Lhs const& STK::ColOperator< Lhs >::lhs_
protected

Definition at line 233 of file STK_SlicingOperators.h.

◆ rows_

template<typename Lhs >
const RowRange STK::ColOperator< Lhs >::rows_
protected

Definition at line 235 of file STK_SlicingOperators.h.


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