36#ifndef STK_VISITORSIMPL_H
37#define STK_VISITORSIMPL_H
39#define Idx(size) baseIdx + size - 1
46template<
typename Visitor,
typename Derived,
bool Orient_,
int SizeRows_,
int SizeCols_>
48template<
typename Visitor,
typename Derived,
bool Orient_,
int SizeRows_,
int SizeCols_>
50template<
typename Visitor,
typename Derived,
int SizeRows_,
int SizeCols_>
53template<
typename Visitor,
typename Derived,
int SizeRows_,
int SizeCols_>
55template<
typename Visitor,
typename Derived,
int SizeRows_,
int SizeCols_>
59template<
typename Visitor,
typename Derived,
int SizeRows_>
61template<
typename Visitor,
typename Derived,
int SizeRows_>
63template<
typename Visitor,
typename Derived,
int SizeRows_>
65template<
typename Visitor,
typename Derived,
int orient_>
67template<
typename Visitor,
typename Derived,
int orient_>
74template<
typename Visitor,
typename Derived>
79 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
80 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
85 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
86 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
94template<
typename Visitor,
typename Derived>
99 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
100 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
105 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
106 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
114template<
typename Visitor,
typename Derived,
int SizeRows_ ,
int SizeCols_>
134template<
typename Visitor,
typename Derived,
int SizeRows_ ,
int SizeCols_>
154template<
typename Visitor,
typename Derived,
int SizeRows_>
165template<
typename Visitor,
typename Derived,
int SizeCols_>
178template<
typename Visitor,
typename Derived>
191template<
typename Visitor,
typename Derived>
205template<
typename Visitor,
typename Derived,
int SizeRows_>
211 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
217 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
227template<
typename Visitor,
typename Derived>
232 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
237 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
246template<
typename Visitor,
typename Derived,
int SizeCols_>
252 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
258 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
267template<
typename Visitor,
typename Derived>
272 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
277 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
284template<
typename Visitor,
typename Derived,
int SizeRows_,
int SizeCols_>
301template<
typename Visitor,
typename Derived,
int SizeCols_>
312template<
typename Visitor,
typename Derived,
int SizeRows_,
int SizeCols_>
329template<
typename Visitor,
typename Derived,
int SizeRows_>
340template<
typename Visitor,
typename Derived>
353template<
typename Visitor,
typename Derived,
int Size_>
370template<
typename Visitor,
typename Derived>
381template<
typename Visitor,
typename Derived>
394template<
typename Visitor,
typename Derived,
int Size_>
411template<
typename Visitor,
typename Derived>
422template<
typename Visitor,
typename Derived>
435template<
typename Visitor,
typename Derived,
int Size_>
452template<
typename Visitor,
typename Derived>
463template<
typename Visitor,
typename Derived>
468 for(
int j =
tab.lastIdxCols();
j >=
tab.beginCols(); --
j)
469 for(
int i = std::min(
j,
tab.lastIdxRows());
i >=
tab.beginRows(); --
i)
474 for(
int j =
tab.lastIdxCols();
j >=
tab.beginCols(); --
j)
475 for(
int i = std::min(
j,
tab.lastIdxRows());
i >=
tab.beginRows(); --
i)
482template<
typename Visitor,
typename Derived>
487 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
488 for(
int j = std::max(
i,
tab.beginCols());
j <
tab.endCols(); ++
j)
493 for(
int i =
tab.beginRows();
i <
tab.endRows(); ++
i)
494 for(
int j = std::max(
i,
tab.beginCols());
j <
tab.endCols(); ++
j)
502template<
typename Visitor,
typename Derived>
507 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
508 for(
int i = std::max(
j,
tab.beginRows());
i <
tab.endRows(); ++
i)
513 for(
int j =
tab.beginCols();
j <
tab.endCols(); ++
j)
514 for(
int i = std::max(
j,
tab.beginRows());
i <
tab.endRows(); ++
i)
521template<
typename Visitor,
typename Derived>
526 for(
int i =
tab.lastIdxRows();
i >=
tab.beginRows(); --
i)
527 for(
int j = std::min(
i,
tab.lastIdxCols());
j >=
tab.beginCols(); --
j)
532 for(
int i =
tab.lastIdxRows();
i >=
tab.beginRows(); --
i)
533 for(
int j = std::min(
i,
tab.lastIdxCols());
j >=
tab.beginCols(); --
j)
542template<
typename Visitor,
typename Derived>
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
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.
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
A VisitorDiagonalImpl allow to unroll the visit of a Diagonal tab if possible.
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
specialization for the general case with 1 row and 1 column arrays.
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
A VisitorPointImpl allow to unroll the visit of a row-vector if possible.
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
unroll the column baseIdx + SizeCols_ -1
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
unroll the row baseIdx + SizeRows_ -1
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)
static void apply(Derived &tab, Visitor &applier)
A visitor Vector allow to unroll the visit of a vector if possible.
static void apply(Derived &tab, Visitor &applier)
static void run(Derived const &tab, Visitor &visitor)