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

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

#include <STK_SlicingOperators.h>

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

Public Types

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

Public Member Functions

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

Detailed Description

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

Generic expression when the row of an expression is accessed.

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

This class represents an expression where a row operator is applied to an expression. It is the return type of the row operation.

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

Definition at line 88 of file STK_SlicingOperators.h.

Member Typedef Documentation

◆ Base

Definition at line 91 of file STK_SlicingOperators.h.

◆ ColRange

Type of the Range for the columns.

Definition at line 105 of file STK_SlicingOperators.h.

◆ RowRange

Type of the Range for the rows.

Definition at line 103 of file STK_SlicingOperators.h.

◆ Type

Definition at line 92 of file STK_SlicingOperators.h.

◆ TypeConst

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

Definition at line 93 of file STK_SlicingOperators.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 94 of file STK_SlicingOperators.h.

95 {
96 structure_ = hidden::Traits< RowOperator<Lhs> >::structure_,
97 orient_ = hidden::Traits< RowOperator<Lhs> >::orient_,
98 sizeRows_ = hidden::Traits< RowOperator<Lhs> >::sizeRows_,
99 sizeCols_ = hidden::Traits< RowOperator<Lhs> >::sizeCols_,
100 storage_ = hidden::Traits< RowOperator<Lhs> >::storage_
101 };

Constructor & Destructor Documentation

◆ RowOperator()

template<typename Lhs >
STK::RowOperator< Lhs >::RowOperator ( Lhs const lhs,
int  i 
)
inline

constructor

Definition at line 108 of file STK_SlicingOperators.h.

108: Base(), lhs_(lhs), i_(i), rows_(i_, 1), cols_(lhs_.rangeColsInRow(i_)) {}
Lhs const & lhs() const
ExprBase< RowOperator< Lhs > > Base

Member Function Documentation

◆ colsImpl()

template<typename Lhs >
ColRange const & STK::RowOperator< Lhs >::colsImpl ( ) const
inline
Returns
the range of the Columns

Definition at line 115 of file STK_SlicingOperators.h.

115{ return cols_;}

◆ elt0Impl()

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

accesses to the element

Definition at line 133 of file STK_SlicingOperators.h.

133{ return (lhs().elt());}

◆ elt1Impl()

template<typename Lhs >
TypeConst STK::RowOperator< Lhs >::elt1Impl ( int  j) const
inline
Returns
the element jth element
Parameters
jindex of the jth element

Definition at line 131 of file STK_SlicingOperators.h.

131{ return (lhs().elt(i_, j));}

◆ elt2Impl()

template<typename Lhs >
TypeConst STK::RowOperator< Lhs >::elt2Impl ( int  i,
int  j 
) const
inline
Returns
the element (i,j)
Parameters
i,jindex of the row and column

Definition at line 121 of file STK_SlicingOperators.h.

122 {
123#ifdef STK_BOUNDS_CHECK
124 if (i != i_) { STKRUNTIME_ERROR_2ARG(RowOperatorBase::elt2Impl,i,j,row index is not valid);}
125#endif
126 return (lhs().elt(i_, j));
127 }
#define STKRUNTIME_ERROR_2ARG(Where, Arg1, Arg2, Error)
Definition STK_Macros.h:120
RowOperator< RowOperator< Lhs > > const row(int i) const

References STKRUNTIME_ERROR_2ARG.

◆ lhs()

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

Definition at line 117 of file STK_SlicingOperators.h.

117{ return lhs_;}

◆ rowsImpl()

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

Definition at line 113 of file STK_SlicingOperators.h.

113{ return rows_;}

Member Data Documentation

◆ cols_

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

Definition at line 139 of file STK_SlicingOperators.h.

◆ i_

template<typename Lhs >
int STK::RowOperator< Lhs >::i_
protected

Definition at line 137 of file STK_SlicingOperators.h.

◆ lhs_

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

Definition at line 136 of file STK_SlicingOperators.h.

◆ rows_

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

Definition at line 138 of file STK_SlicingOperators.h.


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