52template<
class Type>
class List1D;
53template<
class Derived>
struct BiDirectionalIterator;
54template<
class Derived>
struct ConstBiDirectionalIterator;
179 for (
int j=T.begin();
j<T.end();
j++)
180 { (*p1) =
pt1->data();
194#ifdef STK_BOUNDS_CHECK
195 if ((
J.begin()<T.begin()))
197 if ((
J.lastIdx()>T.lastIdx()))
207 T.moveCurrentPosition(
J.begin());
289 if ((
J.lastIdx()>
this->lastIdx()))
316 if (this->
isRef())
return;
338 catch (std::bad_alloc & error)
342 for (
int j=2;
j<=n;
j++)
345 catch (std::bad_alloc & error)
348 {
p2 =
p1->getLeft();
373 for (
int i=
I.begin();
i<=
I.lastIdx();
i++)
381 if (
other.empty())
return;
401 const int first =
range.lastIdx() + 1;
430 for (
int j1=1;
j1<=n;
j1++)
435 catch (std::bad_alloc & error)
494 for (
int l=1;
l<=n;
l++)
523#ifdef STK_BOUNDS_CHECK
559 { (*p1) =
pt1->data();
567 { (*p1) =
pt1->data();
583 if ( this->
range() == I)
return *
this;
589 const int inc =
I.lastIdx() - this->
lastIdx();
628 catch (std::bad_alloc & error)
630 {
p2 =
p1->getLeft();
653 if (this->
isRef())
return;
657 {
p2 =
p1->getRight();
In this file we define the main traits class we use for the STK++ Containers.
In this file we define utilities functions and enum for the Array classes.
In this file we implement the BiDirectionalIterator class.
This file define the cell classes for the list classes.
In this file we define and implement the DenseRandomIterator and ConstDenseRandomIterator classes.
This is an internal header file, included by other Containers library headers.
in this file we define the interface class ITContainer1D.
#define STKOUT_OF_RANGE_1ARG(Where, Arg, Error)
#define STKRUNTIME_ERROR_1ARG(Where, Arg, Error)
#define STKOUT_OF_RANGE_2ARG(Where, Arg1, Arg2, Error)
#define STKRUNTIME_ERROR_NO_ARG(Where, Error)
#define STKRUNTIME_ERROR_2ARG(Where, Arg1, Arg2, Error)
This file include all the header files of the project STKernel.
virtual void setData(YArray_ const &y, XArray_ const &x)
set the data set.
Interface base class for homogeneous 1D containers.
bool empty() const
Is there some data ?
void incRange(int n=1)
increment the range of the container (can be negative).
List1D< Type_ > & resize(Range const &I=RowRange())
void setRange(RowRange const &I=RowRange())
Set range of the rows of the container.
void incLast(int n=1)
increment the end of the container (can be negative).
RowRange const & range() const
void decLast(int n=1)
decrement the end of the container.
template One dimensional Horizontal List.
ReverseIterator reverse_iterator
hidden::Traits< List1D< Type_ > >::ConstReverseIterator ConstReverseIterator
void pushBack(int const &n=1)
Add n Elts to the container.
List1D(List1D< Type > const &T, Range const &J, bool ref=true)
access to many elements.
List1D subImpl(Range const &J) const
access to many elements.
List1D(Range const &I, Type const &v)
Misc constructor, initialization with a constant.
List1D< Type > & operator=(Type const &v)
operator= : set the container to a constant value.
hidden::Traits< List1D< Type_ > >::ReverseIterator ReverseIterator
void erase(int pos, int const &n=1)
Delete n elts at the pos index to the container.
Cell * p_current_
Current position pointed in the List1D.
List1D(List1D< Type > const &T)
Copy constructor.
hidden::Traits< List1D< Type_ > >::RowRange RowRange
void setDefault()
set members values to default.
Type & elt1Impl(int pos)
access to one element.
void moveCurrentPosition(int pos) const
Move the current position to pos.
hidden::Traits< List1D< Type_ > >::TypeConst TypeConst
void shiftImpl(int const &beg)
New first index for the object.
ConstReverseIterator const_reverse_iterator
Cell * p_last_
Last Element of the List.
void moveCurrentPositionRight() const
move CurrentPositionent position to right
hidden::Traits< List1D< Type_ > >::ConstIterator ConstIterator
void initialize(Range const &I)
Protected function for initialization.
void merge(List1D const &other)
merge this with other.
ConstIterator const_iterator
List1D & operator=(const List1D &T)
operator = : overwrite the List1D with T.
Cell * p_begin_
First Element of the List.
int currentPosition_
Current position of pointer p_current_ in the List1D.
hidden::Traits< List1D< Type_ > >::Type Type
void insertElt(int pos, int const &n=1)
Insert n elts at the position pos of the container.
Type const & elt1Impl(int pos) const
access to one element const.
ITContainer1D< List1D< Type > > Base
hidden::Traits< List1D< Type_ > >::Iterator Iterator
List1D< Type > & resizeImpl(Range const &I)
Resize the container.
void insert(Range const &I, Type const &v)
Insert element v in the range I of the List1D.
List1D()
Default constructor : empty List.
void moveCurrentPositionLeft() const
Move CurrentPositionent position to left.
void popBack(int const &n=1)
Delete n last elements of the container.
List1D(Range const &I)
constructor with specified Range.
Cell const *const p_lastIdx() const
void clear()
Clear the object.
void freeMem()
Protected function for deallocation.
RowRange const & rows() const
List1D(Cell *const &p_first, Cell *const &p_last, Range const &J)
constructor by reference, ref_=1.
hidden::Traits< List1D< Type_ > >::ColRange ColRange
void swap(int const &j1, int const &j2)
Swapping the j1th column and the j2th column.
Cell const *const p_begin() const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Index sub-vector region: Specialization when the size is unknown.
TRange & incLast(int inc=1)
create the TRange [begin_, end_+inc)
@ dense_
dense matrix/vector/array/expression
@ point_
row oriented vector/array/expression
const int UnknownSize
This value means that an integer is not known at compile-time, and that instead the value is stored i...
const int baseIdx
base index of the containers created in STK++.
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
BiDirectionalIterator< List1D< Type_ > > Iterator
List1D< Type_ > SubVector
RemoveConst< Type_ >::Type const & TypeConst
std::reverse_iterator< ConstIterator > ConstReverseIterator
std::reverse_iterator< Iterator > ReverseIterator
ConstBiDirectionalIterator< List1D< Type_ > > ConstIterator