STK++ 0.9.13
STK_ITContainer.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. 2011
28 * Author: Serge Iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
40#ifndef STK_ITCONTAINER_H
41#define STK_ITCONTAINER_H
42
43namespace STK
44{
45
46namespace hidden
47{
55
56} // hidden namespace
57
103template <class Derived>
105{
106 public:
110 enum
111 {
117 };
122
123 protected:
128
129 public:
131 inline ColRange const& cols() const { return this->asDerived().colsImpl();};
133 inline int beginCols() const { return cols().begin();}
135 inline int endCols() const { return cols().end();}
137 inline int sizeCols() const { return cols().size();}
138
140 inline RowRange const& rows() const { return this->asDerived().rowsImpl();}
142 inline int beginRows() const { return rows().begin();}
144 inline int endRows() const { return rows().end();}
146 inline int sizeRows() const { return rows().size();}
147
148 // for backward compatibility
150 inline int firstIdxCols() const { return beginCols();}
152 inline int firstIdxRows() const { return beginRows();}
154 inline int lastIdxCols() const { return endCols()-1;}
156 inline int lastIdxRows() const { return endRows()-1;}
157
161 inline RowRange const& rangeRowsInCol(int) const { return rows();}
165 inline ColRange const& rangeColsInRow(int) const { return cols();}
166
168 bool empty() const { return (sizeCols()<=0 || sizeRows()<=0);}
169
171 inline int size() const { return sizeRows()*sizeCols();}
172
173 // const accesses
177 inline TypeConst elt(int i, int j) const
178 {
179#ifdef STK_BOUNDS_CHECK
184#endif
185 return this->asDerived().elt2Impl(i,j);
186 }
190 inline TypeConst elt(int i) const
191 {
193#ifdef STK_BOUNDS_CHECK
194 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::elt, i, begin() > i);}
195 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::elt, i, end() <= i);}
196#endif
197return this->asDerived().elt1Impl(i);
198 }
200 inline TypeConst elt() const { return this->asDerived().elt0Impl();}
201 // not-const accesses
205 inline Type& elt(int i, int j)
206 {
207#ifdef STK_BOUNDS_CHECK
208 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::elt, i, j, beginRows() > i);}
209 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::elt, i, j, endRows() <= i);}
210 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::elt, i, j, beginCols() > j);}
211 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::elt, i, j, endCols() <= j);}
212#endif
213 return this->asDerived().elt2Impl(i,j);
214 }
215 inline Type& elt(int i)
216 {
218#ifdef STK_BOUNDS_CHECK
219 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::elt, i, begin() > i);}
220 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::elt, i, end() <= i);}
221#endif
222 return this->asDerived().elt1Impl(i);
223 }
225 inline Type& elt() { return this->asDerived().elt0Impl();}
226
230 TypeConst at(int i, int j) const
231 {
232 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, beginRows() > i);}
233 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, endRows() <= i);}
234 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, beginCols() > j);}
235 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, endCols() <= j);}
236 return this->asDerived().elt2Impl(i, j);
237 }
241 TypeConst at(int i) const
242 {
244 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, begin() > i);}
245 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, end() <= i);}
246 return this->asDerived().elt1Impl(i);
247 }
252 Type& at(int i, int j)
253 {
254 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, beginRows() > i);}
255 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, endRows() <= i);}
256 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, beginCols() > j);}
257 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainerBase::at, i, j, endCols() <= j);}
258 return this->asDerived().elt2Impl(i,j);
259 }
264 Type& at(int i)
265 {
267 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, begin() > i);}
268 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, end() <= i);}
269 return this->asDerived().elt1Impl(i);
270 }
271 // overloaded operators
275 inline TypeConst operator()(int i, int j) const
276 {
277#ifdef STK_BOUNDS_CHECK
279 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainerBase::elt, i, j, endRows() <= i);}
281 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainerBase::elt, i, j, endCols() <= j);}
282#endif
283 return this->elt(i,j);
284 }
288 inline Type& operator()(int i, int j)
289 {
290 #ifdef STK_BOUNDS_CHECK
291 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::operator(), i, j, beginRows() > i);}
292 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::operator(), i, j, endRows() <= i);}
293 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::operator(), i, j, beginCols() > j);}
294 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::eoperator()lt, i, j, endCols() <= j);}
295 #endif
296 return this->asDerived().elt2Impl(i,j);
297 }
301 inline TypeConst operator[](int i) const
302 {
304#ifdef STK_BOUNDS_CHECK
305 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainer::operator[], i, begin() > i);}
306 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainer::operator[], i, end() <= i);}
307#endif
308 return this->elt(i);
309 }
313 inline Type& operator[](int i)
314 {
316#ifdef STK_BOUNDS_CHECK
317 if (this->asDerived().begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainer::operator[], i, begin() > i);}
318 if (this->asDerived().end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainer::operator[], i, end() <= i);}
319#endif
320 return this->elt(i);
321 }
323 inline TypeConst operator()() const
324 {
326 return this->elt();
327 }
329 inline Type& operator()()
330 {
332 return this->elt();
333 }
334};
335
340template < class Derived, int Structure_ = hidden::Traits<Derived>::structure_ >
342
345template <class Derived>
372
374template <class Derived>
375class ITContainer<Derived, Arrays::square_>: public ITContainerBase<Derived>
376{
377 public:
381 enum
382 {
388 };
393
394 protected:
399
400 public:
402 inline RowRange const& range() const { return this->rows();}
404 inline int begin() const { return range().begin();}
406 inline int end() const { return range().end();}
408 inline int size() const { return range().size();}
409
410 // for backward compatibility
412 inline int firstIdx() const { return this->beginRows();}
414 inline int lastIdx() const { return this->endRows()-1;}
415
416 Type trace() const
417 {
418 Type sum = 0.0;
419 for (int k = begin(); k< end(); k++) sum += this->elt(k, k);
420 return sum;
421 }
422};
423
426template <class Derived>
427class ITContainer<Derived, Arrays::lower_triangular_>: public ITContainerBase<Derived>
428{
429 public:
433 enum
434 {
440 };
445
446 protected:
451
452 public:
456 inline Range rangeRowsInCol( int icol) const
457 { return Range(icol, this->lastIdxRows(), 0);}
461 inline Range rangeColsInRow( int irow) const
462 { return Range(this->beginCols(), std::min(irow, this->lastIdxCols()), 0);}
466 Type at(int i, int j) const
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 }
479 Type& at(int i, int j)
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 }
488};
489
492template <class Derived>
493class ITContainer<Derived, Arrays::upper_triangular_>: public ITContainerBase<Derived>
494{
495 public:
499 enum
500 {
506 };
511
512 protected:
517
518 public:
523 { return Range(irow, this->lastIdxCols(), 0);}
528 { return Range(this->beginRows(), std::min(icol, this->lastIdxRows()), 0);}
532 Type at(int i, int j) const
533 {
534 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
535 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
536 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
537 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
538 return (i>j) ? Type() : this->asDerived().elt2Impl(i, j);
539 }
545 Type& at(int i, int j)
546 {
547 if (this->beginRows() > i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
548 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
549 if (this->beginCols() > j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
550 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
551 if (i > j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, i > j);}
552 return this->asDerived().elt2Impl(i,j);
553 }
554};
555
557template <class Derived>
558class ITContainer<Derived, Arrays::symmetric_>: public ITContainerBase<Derived>
559{
560 public:
564 enum
565 {
571 };
576
577 protected:
582
583 public:
585 inline RowRange const& range() const { return this->rows();}
587 inline int begin() const { return range().begin();}
589 inline int end() const { return range().end();}
591 inline int size() const { return range().size();}
592
593 // for backward compatibility
595 inline int firstIdx() const { return this->beginRows();}
597 inline int lastIdx() const { return this->endRows()-1;}
598
599 Type trace() const
600 {
601 Type sum = 0.0;
602 for (int k = begin(); k< end(); k++) sum += this->elt(k, k);
603 return sum;
604 }
605};
606
609template <class Derived>
610class ITContainer<Derived, Arrays::lower_symmetric_>: public ITContainerBase<Derived>
611{
612 public:
616 enum
617 {
623 };
628
629
630 protected:
635
636 public:
638 inline RowRange const& range() const { return this->rows();}
640 inline int begin() const { return range().begin();}
642 inline int end() const { return range().end();}
644 inline int size() const { return range().size();}
645
646 // for backward compatibility
648 inline int firstIdx() const { return this->beginRows();}
650 inline int lastIdx() const { return this->endRows()-1;}
651
652 Type trace() const
653 {
654 Type sum = 0.0;
655 for (int k = begin(); k< end(); k++) sum += this->elt(k, k);
656 return sum;
657 }
658 TypeConst at(int i, int j) const
659 {
660 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
661 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
662 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
663 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
664 return (i<j) ? this->asDerived().elt2Impl(j, i) : this->asDerived().elt2Impl(i, j);
665 }
670 Type& at(int i, int j)
671 {
672 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
673 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
674 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
675 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
676 if (i < j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, i < j);}
677 return this->asDerived().elt2Impl(i,j);
678 }
679};
680
683template <class Derived>
684class ITContainer<Derived, Arrays::upper_symmetric_>: public ITContainerBase<Derived>
685{
686 public:
690 enum
691 {
697 };
702
703 protected:
708
709 public:
711 inline RowRange const& range() const { return this->rows();}
713 inline int begin() const { return range().begin();}
715 inline int end() const { return range().end();}
717 inline int size() const { return range().size();}
718
719 // for backward compatibility
721 inline int firstIdx() const { return this->beginRows();}
723 inline int lastIdx() const { return this->endRows()-1;}
724
725 Type trace() const
726 {
727 Type sum = 0.0;
728 for (int k = begin(); k< end(); k++) sum += this->elt(k, k);
729 return sum;
730 }
734 TypeConst at(int i, int j) const
735 {
736 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
737 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
738 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
739 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
740 return (i>j) ?this->asDerived().elt2Impl(j, i) : this->asDerived().elt2Impl(i, j);
741 }
746 Type& at(int i, int j)
747 {
748 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
749 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
750 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
751 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
752 if (i>j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, i>j);}
753 return this->asDerived().elt2Impl(i,j);
754 }
755};
756
759template <class Derived>
760class ITContainer<Derived, Arrays::diagonal_>: public ITContainerBase<Derived>
761{
762 public:
766 enum
767 {
773 };
778
779 protected:
784
785 public:
787 inline RowRange const& range() const { return this->rows();}
789 inline int begin() const { return range().begin();}
791 inline int end() const { return range().end();}
793 inline int size() const { return range().size();}
794
795 // for backward compatibility
797 inline int firstIdx() const { return begin();}
799 inline int lastIdx() const { return end()-1;}
800
802 inline Range rangeRowsInCol(int pos) const { return Range(pos,1);}
804 inline Range rangeColsInRow(int pos) const { return Range(pos,1);}
805
807 inline TypeConst front() const { return this->elt(firstIdx());}
809 inline TypeConst back() const { return this->elt(lastIdx());}
810
812 inline Type& front() { return this->elt(firstIdx());}
814 inline Type& back() { return this->elt(lastIdx());}
815
819 Type at(int i, int j) const
820 {
821 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
822 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
823 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
824 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
825 return (i==j) ? this->asDerived().elt2Impl(i,j) : Type();
826 }
830 TypeConst at(int i) const
831 {
832 if (this->begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainer::at, i, begin() > i);}
833 if (this->lastIdx() < i) { STKOUT_OF_RANGE_1ARG(ITContainer::at, i, lastIdx() < i);}
834 return this->asDerived().elt1Impl(i);
835 }
841 Type& at(int i, int j)
842 {
843 if (this->beginRows() > i){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginRows() > i);}
844 if (this->endRows() <= i) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endRows() <= i);}
845 if (this->beginCols() > j){ STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, beginCols() > j);}
846 if (this->endCols() <= j) { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, endCols() <= j);}
847 if (i != j)
848 { STKOUT_OF_RANGE_2ARG(ITContainer::at, i, j, i != j);}
849 return this->asDerived().elt2Impl(i,j);
850 }
856 Type& at(int i)
857 {
858 if (this->begin() > i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, begin() > i);}
859 if (this->end() <= i) { STKOUT_OF_RANGE_1ARG(ITContainerBase::at, i, end() <= i);}
860 return this->asDerived().elt1Impl(i);
861 }
862};
863
866template <class Derived>
867class ITContainer<Derived, Arrays::vector_>: public ITContainerBase<Derived>
868{
869 public:
873 enum
874 {
880 };
885
886 protected:
891
892 public:
894 inline RowRange const& range() const { return this->rows();}
896 inline int begin() const { return range().begin();}
898 inline int end() const { return range().end();}
900 inline int size() const { return range().size();}
901
902 // for backward compatibility
904 inline int firstIdx() const { return begin();}
906 inline int lastIdx() const { return end()-1;}
907
909 inline int colIdx() const { return this->beginCols();}
910
912 inline TypeConst front() const { return this->elt(firstIdx());}
914 inline TypeConst back() const { return this->elt(lastIdx());}
915
917 inline Type& front() { return this->elt(firstIdx());}
919 inline Type& back() { return this->elt(lastIdx());}
920};
921
924template <class Derived>
925class ITContainer<Derived, Arrays::point_>: public ITContainerBase<Derived>
926{
927 public:
931 enum
932 {
938 };
943
944 protected:
949
950 public:
952 inline ColRange const& range() const { return this->asDerived().cols();}
954 inline int begin() const { return range().begin();}
956 inline int end() const { return range().end();}
958 inline int size() const { return range().size();}
959
961 inline int rowIdx() const { return this->beginRows();}
962
963 // for backward compatibility
965 inline int firstIdx() const { return begin();}
967 inline int lastIdx() const { return end()-1;}
968
970 inline TypeConst front() const { return this->elt(firstIdx());}
972 inline TypeConst back() const { return this->elt(lastIdx());}
973
975 inline Type& front() { return this->elt(firstIdx());}
977 inline Type& back() { return this->elt(lastIdx());}
978};
981template <class Derived>
982class ITContainer<Derived, Arrays::number_>: public ITContainerBase<Derived>
983{
984 public:
988 enum
989 {
995 };
1000
1001 protected:
1006
1007 public:
1009 inline ColRange const& range() const { return this->asDerived().rows();}
1011 inline int begin() const { return range().begin();}
1013 inline int end() const { return range().end();}
1015 inline int size() const { return 1;}
1017 operator TypeConst const() const {return this->asDerived().elt0Impl();}
1018};
1019
1020} // namespace STK
1021
1022#endif /* STK_ITCONTAINER_H */
#define STKOUT_OF_RANGE_1ARG(Where, Arg, Error)
Definition STK_Macros.h:93
#define STKOUT_OF_RANGE_2ARG(Where, Arg1, Arg2, Error)
Definition STK_Macros.h:102
#define STK_STATIC_ASSERT_ONE_DIMENSION_ONLY(EXPR)
#define STK_STATIC_ASSERT_ZERO_DIMENSION_ONLY(EXPR)
Interface base class for all classes implementing the curious recursive template paradigm.
Derived & asDerived()
static cast : return a reference of this with a cast to the derived class.
Interface base class for 2D containers.
Type & at(int i, int j)
TypeConst at(int i, int j) const
TypeConst operator()(int i, int j) const
ColRange const & rangeColsInRow(int) const
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
IRecursiveTemplate< Derived > Base
TypeConst operator[](int i) const
TypeConst operator()() const
ITContainerBase()
Default constructor.
TypeConst at(int i) const
TypeConst elt(int i) const
hidden::Traits< Derived >::Type Type
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
hidden::Traits< Derived >::TypeConst TypeConst
Type & elt(int i, int j)
TypeConst elt() const
~ITContainerBase()
destructor.
ColRange const & cols() const
Type & operator()(int i, int j)
RowRange const & rangeRowsInCol(int) const
TypeConst elt(int i, int j) const
RowRange const & rows() const
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
Range rangeColsInRow(int irow) const
compute the range of the effectively stored elements in the row irow.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
hidden::Traits< Derived >::TypeConst TypeConst
hidden::Traits< Derived >::Type Type
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
Range rangeRowsInCol(int icol) const
compute the range of the effectively stored elements in column icol.
TRange< sizeRows_ > RowRange
Type of the Range for the rows.
hidden::Traits< Derived >::TypeConst TypeConst
TRange< sizeCols_ > ColRange
Type of the Range for the columns.
Specialized interface class for all arrays (can be either 2D arrays or 1D arrays).
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
int begin() const
get the first index of the TRange.
Definition STK_Range.h:93
Index sub-vector region: Specialization when the size is unknown.
Definition STK_Range.h:265
int end() const
get the ending index of the TRange.
Definition STK_Range.h:192
int size() const
get the size of the TRange (the number of elements).
Definition STK_Range.h:196
classes inheriting NoAssignOperator should not generate a default operator=.
NoAssignOperator & operator=(const NoAssignOperator &)
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
The namespace STK is the main domain space of the Statistical ToolKit project.
TRange< UnknownSize > Range
Definition STK_Range.h:59