STK++ 0.9.13
STK::SubVectorOperator< Lhs, Size_ > Class Template Reference

Generic expression when the sub-part of an expression is accessed (specialization for vectors) More...

#include <STK_SlicingOperators.h>

Inheritance diagram for STK::SubVectorOperator< Lhs, Size_ >:
Inheritance graph

Public Types

enum  {
  structure_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::structure_ , orient_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::orient_ , sizeRows_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::sizeRows_ , sizeCols_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::sizeCols_ ,
  storage_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::storage_
}
 
typedef hidden::Traits< SubVectorOperator< Lhs, Size_ > >::Type Type
 
typedef hidden::Traits< SubVectorOperator< Lhs, Size_ > >::TypeConst TypeConst
 
typedef SubVectorOperatorBase< Lhs, Size_, structure_Base
 
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

 SubVectorOperator (Lhs const &lhs, TRange< Size_ > const &I)
 constructor
 
Lhs constlhs () const
 
TypeConst elt2Impl (int i, int j) const
 
TypeConst elt1Impl (int i) const
 
TypeConst elt0Impl () const
 accesses to the element
 

Protected Member Functions

Typeelt2Impl (int i, int j)
 
Typeelt1Impl (int i)
 
Typeelt0Impl ()
 accesses to the element
 

Protected Attributes

Lhs constlhs_
 

Additional Inherited Members

- Static Public Member Functions inherited from STK::TRef< 1 >
static bool isRef ()
 

Detailed Description

template<typename Lhs, int Size_>
class STK::SubVectorOperator< Lhs, Size_ >

Generic expression when the sub-part of an expression is accessed (specialization for vectors)

Template Parameters
Lhsthe type of the array or expression to which we are applying the sub operator.

This class represents an expression where a subVectorAccessor is applied to an array expression. It is the return type of the sub(Range I) operation.

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

Template Parameters
Lhsthe type of the array or expression to which we are applying the sub operator.

This class represents an expression where a subVectorOperator is applied to an array expression. It is the return type of the sub(Range I) operation.

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

Definition at line 284 of file STK_SlicingOperators.h.

Member Typedef Documentation

◆ Base

◆ ColRange

Type of the Range for the columns.

Definition at line 305 of file STK_SlicingOperators.h.

◆ RowRange

Type of the Range for the rows.

Definition at line 303 of file STK_SlicingOperators.h.

◆ Type

Definition at line 290 of file STK_SlicingOperators.h.

◆ TypeConst

Definition at line 291 of file STK_SlicingOperators.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 292 of file STK_SlicingOperators.h.

293 {
294 structure_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::structure_,
295 orient_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::orient_,
296 sizeRows_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::sizeRows_,
297 sizeCols_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::sizeCols_,
298 storage_ = hidden::Traits< SubVectorOperator<Lhs, Size_> >::storage_
299 };

Constructor & Destructor Documentation

◆ SubVectorOperator()

template<typename Lhs , int Size_>
STK::SubVectorOperator< Lhs, Size_ >::SubVectorOperator ( Lhs const lhs,
TRange< Size_ > const I 
)
inline

constructor

Definition at line 308 of file STK_SlicingOperators.h.

308: Base(I), lhs_(lhs) {}
SubVectorOperatorBase< Lhs, Size_, structure_ > Base

Member Function Documentation

◆ elt0Impl() [1/2]

template<typename Lhs , int Size_>
Type & STK::SubVectorOperator< Lhs, Size_ >::elt0Impl ( )
inlineprotected

accesses to the element

Definition at line 332 of file STK_SlicingOperators.h.

332{ return (lhs_.elt());}

◆ elt0Impl() [2/2]

template<typename Lhs , int Size_>
TypeConst STK::SubVectorOperator< Lhs, Size_ >::elt0Impl ( ) const
inline

accesses to the element

Definition at line 320 of file STK_SlicingOperators.h.

320{ return (lhs_.elt());}

◆ elt1Impl() [1/2]

template<typename Lhs , int Size_>
Type & STK::SubVectorOperator< Lhs, Size_ >::elt1Impl ( int  i)
inlineprotected
Returns
i-th element
Parameters
ielement index

Definition at line 330 of file STK_SlicingOperators.h.

330{ return (lhs_.elt1Impl(i));}

◆ elt1Impl() [2/2]

template<typename Lhs , int Size_>
TypeConst STK::SubVectorOperator< Lhs, Size_ >::elt1Impl ( int  i) const
inline
Returns
i-th element
Parameters
ielement index

Definition at line 318 of file STK_SlicingOperators.h.

318{ return (lhs_.elt1Impl(i));}

◆ elt2Impl() [1/2]

template<typename Lhs , int Size_>
Type & STK::SubVectorOperator< Lhs, Size_ >::elt2Impl ( int  i,
int  j 
)
inlineprotected
Returns
element (i,j)
Parameters
i,jrow and column indexes

Definition at line 326 of file STK_SlicingOperators.h.

326{ return (lhs_.elt2Impl(i, j));}

◆ elt2Impl() [2/2]

template<typename Lhs , int Size_>
TypeConst STK::SubVectorOperator< Lhs, Size_ >::elt2Impl ( int  i,
int  j 
) const
inline
Returns
element (i,j)
Parameters
i,jrow and column indexes

Definition at line 314 of file STK_SlicingOperators.h.

314{ return (lhs_.elt2Impl(i, j));}

◆ lhs()

template<typename Lhs , int Size_>
Lhs const & STK::SubVectorOperator< Lhs, Size_ >::lhs ( ) const
inline
Returns
the left hand side expression

Definition at line 310 of file STK_SlicingOperators.h.

310{ return lhs_;}

Member Data Documentation

◆ lhs_

template<typename Lhs , int Size_>
Lhs const& STK::SubVectorOperator< Lhs, Size_ >::lhs_
protected

Definition at line 335 of file STK_SlicingOperators.h.


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