STK++ 0.9.13
STK_Array1D_InnerIterator.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff, Université Lille 1, Inria
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this program; if not, write to the
16 Free Software Foundation, Inc.,
17 59 Temple Place,
18 Suite 330,
19 Boston, MA 02111-1307
20 USA
21
22 Contact: S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
23*/
24
25/*
26 * Project: stkpp::Arrays
27 * created on: 26 nov. 2007
28 * Author: Serge Iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
35#ifndef STK_ARRAY1D_INNERITERATOR_H
36#define STK_ARRAY1D_INNERITERATOR_H
37
38#include "STK_Array1D.h"
40namespace STK
41{
42
43template<class Type_, int Size_ >
44class Array1D<Type_, Size_>::InnerOperator: public InnerIteratorBase< Array1D<Type_, Size_>, Array1D<Type_, Size_>::InnerOperator >
45{
46 public:
48
49 enum
50 {
57 };
58
61
64
65 using Base::p_array_;
66 using Base::row_;
67 using Base::col_;
68
77
79 inline operator bool() const { return row_ != p_array_->end(); }
81 inline TypeConst valueImpl() const { return p_array_->allocator().elt(row_);}
83 inline reference valueRefImpl() const { return p_array_->allocator().elt(row_);}
85 inline InnerOperator const& nextImpl() const { row_++; return *this;}
87 inline InnerOperator const& prevImpl() const { row_--; return *this;}
88};
89
90} // namespace STK
91
92#endif // STK_ARRAY1DINNERITERATOR_H
In this file we define and implement the final class Array1D.
In this file we define the base class for inner iterators on arrays.
hidden::Traits< Array1D< Type_, Size_ > >::TypeConst TypeConst
hidden::Traits< Array1D< Type_, Size_ > >::Type Type
InnerOperator(InnerOperator const &it)
copy constructor.
InnerIteratorBase< Array1D< Type_, Size_ >, Array1D< Type_, Size_ >::InnerOperator > Base
InnerOperator const & nextImpl() const
go to next position
InnerOperator const & prevImpl() const
go to previous position
hidden::RemoveConst< Type >::Type & reference
InnerOperator(Array1D< Type_, Size_ > &array)
default constructor.
hidden::RemoveConst< Type >::Type * pointer
template one dimensional Arrays.
hidden::Traits< Array1D< Type_, Size_ > >::Type Type
hidden::Traits< Array1D< Type_, Size_ > >::TypeConst TypeConst
InnerIteratorBase is a base class for all iterators on allocators.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
The namespace STK is the main domain space of the Statistical ToolKit project.