STK++ 0.9.13
STK::ITContainer< Derived, Arrays::lower_triangular_ > Class Template Reference

Specialization for lower_triangular_. More...

#include <STK_ITContainer.h>

Inheritance diagram for STK::ITContainer< Derived, Arrays::lower_triangular_ >:
Inheritance graph

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 ITContainerBase< Derived > Base
 
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.
 
- Public Types inherited from STK::ITContainerBase< 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 IRecursiveTemplate< Derived > Base
 
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.
 

Public Member Functions

Range rangeRowsInCol (int icol) const
 
Range rangeColsInRow (int irow) const
 compute the range of the effectively stored elements in the row irow.
 
Type at (int i, int j) const
 
Typeat (int i, int j)
 
- Public Member Functions inherited from STK::ITContainerBase< Derived >
ColRange constcols () const
 
int beginCols () const
 
int endCols () const
 
int sizeCols () const
 
RowRange constrows () const
 
int beginRows () const
 
int endRows () const
 
int sizeRows () const
 
int firstIdxCols () const
 
int firstIdxRows () const
 
int lastIdxCols () const
 
int lastIdxRows () const
 
RowRange constrangeRowsInCol (int) const
 
ColRange constrangeColsInRow (int) const
 
bool empty () const
 
int size () const
 
TypeConst elt (int i, int j) const
 
TypeConst elt (int i) const
 
TypeConst elt () const
 
Typeelt (int i, int j)
 
Typeelt (int i)
 
Typeelt ()
 
TypeConst at (int i, int j) const
 
TypeConst at (int i) const
 
Typeat (int i, int j)
 
Typeat (int i)
 
TypeConst operator() (int i, int j) const
 
Typeoperator() (int i, int j)
 
TypeConst operator[] (int i) const
 
Typeoperator[] (int i)
 
TypeConst operator() () const
 
Typeoperator() ()
 
- Public Member Functions inherited from STK::IRecursiveTemplate< Derived >
Derived & asDerived ()
 static cast : return a reference of this with a cast to the derived class.
 
Derived constasDerived () const
 static cast : return a const reference of this with a cast to the derived class.
 
Derived * asPtrDerived ()
 static cast : return a ptr on a Derived of this with a cast to the derived class.
 
Derived constasPtrDerived () const
 static cast : return a ptr on a constant Derived of this with a cast to the derived class.
 
Derived * clone () const
 create a leaf using the copy constructor of the Derived class.
 
Derived * clone (bool isRef) const
 create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not.
 

Protected Member Functions

 ITContainer ()
 default constructor.
 
 ~ITContainer ()
 destructor.
 
- Protected Member Functions inherited from STK::ITContainerBase< Derived >
 ITContainerBase ()
 Default constructor.
 
 ~ITContainerBase ()
 destructor.
 
- Protected Member Functions inherited from STK::IRecursiveTemplate< Derived >
 IRecursiveTemplate ()
 constructor.
 
 ~IRecursiveTemplate ()
 destructor.
 

Detailed Description

template<class Derived>
class STK::ITContainer< Derived, Arrays::lower_triangular_ >

Specialization for lower_triangular_.

Definition at line 427 of file STK_ITContainer.h.

Member Typedef Documentation

◆ Base

template<class Derived >
typedef ITContainerBase<Derived> STK::ITContainer< Derived, Arrays::lower_triangular_ >::Base

Definition at line 430 of file STK_ITContainer.h.

◆ ColRange

template<class Derived >
typedef TRange<sizeCols_> STK::ITContainer< Derived, Arrays::lower_triangular_ >::ColRange

Type of the Range for the columns.

Definition at line 444 of file STK_ITContainer.h.

◆ RowRange

template<class Derived >
typedef TRange<sizeRows_> STK::ITContainer< Derived, Arrays::lower_triangular_ >::RowRange

Type of the Range for the rows.

Definition at line 442 of file STK_ITContainer.h.

◆ Type

template<class Derived >
typedef hidden::Traits<Derived>::Type STK::ITContainer< Derived, Arrays::lower_triangular_ >::Type

Definition at line 431 of file STK_ITContainer.h.

◆ TypeConst

template<class Derived >
typedef hidden::Traits<Derived>::TypeConst STK::ITContainer< Derived, Arrays::lower_triangular_ >::TypeConst

Definition at line 432 of file STK_ITContainer.h.

Member Enumeration Documentation

◆ anonymous enum

template<class Derived >
anonymous enum
Enumerator
structure_ 
orient_ 
sizeRows_ 
sizeCols_ 
storage_ 

Definition at line 433 of file STK_ITContainer.h.

434 {
435 structure_ = hidden::Traits<Derived>::structure_,
436 orient_ = hidden::Traits<Derived>::orient_,
437 sizeRows_ = hidden::Traits<Derived>::sizeRows_,
438 sizeCols_ = hidden::Traits<Derived>::sizeCols_,
439 storage_ = hidden::Traits<Derived>::storage_
440 };

Constructor & Destructor Documentation

◆ ITContainer()

template<class Derived >
STK::ITContainer< Derived, Arrays::lower_triangular_ >::ITContainer ( )
inlineprotected

default constructor.

Definition at line 448 of file STK_ITContainer.h.

◆ ~ITContainer()

template<class Derived >
STK::ITContainer< Derived, Arrays::lower_triangular_ >::~ITContainer ( )
inlineprotected

destructor.

Definition at line 450 of file STK_ITContainer.h.

450{}

Member Function Documentation

◆ at() [1/2]

template<class Derived >
Type & STK::ITContainer< Derived, Arrays::lower_triangular_ >::at ( int  i,
int  j 
)
inline
Returns
safely a reference on the element (i, j)
Note
this method is only valid for arrays as it allow to modify the element.
Parameters
i,jrow and column indexes

Definition at line 479 of file STK_ITContainer.h.

480 {
481 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
482 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
483 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
484 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
485 if (j > i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, j > i);}
486 return this->asDerived().elt2Impl(i,j);
487 }
#define STKOUT_OF_RANGE_2ARG(Where, Arg1, Arg2, Error)
Definition STK_Macros.h:102
Derived & asDerived()
static cast : return a reference of this with a cast to the derived class.

References STKOUT_OF_RANGE_2ARG.

◆ at() [2/2]

template<class Derived >
Type STK::ITContainer< Derived, Arrays::lower_triangular_ >::at ( int  i,
int  j 
) const
inline
Returns
safely the constant element (i, j).
Parameters
i,jrow and column indexes

Definition at line 466 of file STK_ITContainer.h.

467 {
468 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
469 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
470 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
471 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
472 return (j>i) ? Type() : this->asDerived().elt2Impl(i, j);
473 }

References STKOUT_OF_RANGE_2ARG.

◆ rangeColsInRow()

template<class Derived >
Range STK::ITContainer< Derived, Arrays::lower_triangular_ >::rangeColsInRow ( int  irow) const
inline

compute the range of the effectively stored elements in the row irow.

Parameters
irowthe index of the row

Definition at line 461 of file STK_ITContainer.h.

462 { return Range(this->beginCols(), std::min(irow, this->lastIdxCols()), 0);}
TRange< UnknownSize > Range
Definition STK_Range.h:59

◆ rangeRowsInCol()

template<class Derived >
Range STK::ITContainer< Derived, Arrays::lower_triangular_ >::rangeRowsInCol ( int  icol) const
inline
Returns
the Range of the effectively stored elements in the column icol.
Parameters
icolthe number of the column to compute the range

Definition at line 456 of file STK_ITContainer.h.

457 { return Range(icol, this->lastIdxRows(), 0);}

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