35#ifndef STK_EXPRBASEVISITOR_H
36#define STK_EXPRBASEVISITOR_H
61template<
typename Derived>
62template<
typename Visitor>
66 Impl::run(this->asDerived(),
visitor);
71template<
typename Derived>
79template<
typename Derived>
87template<
typename Derived>
95template<
typename Derived>
100template<
typename Derived>
110template<
typename Derived>
121template<
typename Derived>
132template<
typename Derived>
143template<
typename Derived>
152template<
typename Derived>
162template<
typename Derived>
171template<
typename Derived>
181template<
typename Derived>
188template<
typename Derived>
196template<
typename Derived>
203template<
typename Derived>
212template<
typename Derived>
219template<
typename Derived>
228template<
typename Derived>
230{
return Type(std::sqrt(norm2()));}
231template<
typename Derived>
233{
return static_cast<Type>(std::sqrt(safe().norm2()));}
235template<
typename Derived>
237{
return square().sum();}
238template<
typename Derived>
240{
return safe().square().sum();}
242template<
typename Derived>
244{
return abs().maxElt();}
247template<
typename Derived>
254template<
typename Derived>
262template<
typename Derived>
266 return (*
this-mu).square().mean();
269template<
typename Derived>
273 return (*
this-mu).square().meanSafe();
276template<
typename Derived>
278{
return (*
this-
mean).square().mean();}
279template<
typename Derived>
281{
return (*
this-
mean).square().meanSafe();}
284template<
typename Derived>
285template<
typename Rhs>
292template<
typename Derived>
293template<
typename Rhs>
301template<
typename Derived>
302template<
typename Rhs>
307 return static_cast<Type>(std::sqrt(wnorm2(
weights)));
309template<
typename Derived>
310template<
typename Rhs>
315 return static_cast<Type>(std::sqrt(wnorm2Safe(
weights)));
318template<
typename Derived>
319template<
typename Rhs>
326template<
typename Derived>
327template<
typename Rhs>
332 return square().dotSafe(
weights);
336template<
typename Derived>
337template<
typename Rhs>
347template<
typename Derived>
348template<
typename Rhs>
359template<
typename Derived>
360template<
typename Rhs>
369template<
typename Derived>
370template<
typename Rhs>
381template<
typename Derived>
382template<
typename Rhs>
389template<
typename Derived>
390template<
typename Rhs>
In this file we define the appliers classes.
This file implement the slicing visitors in the namespace STK.
#define STK_STATIC_ASSERT_POINT_OR_VECTOR_ONLY(EXPR)
#define STK_STATIC_ASSERT_ONE_DIMENSION_ONLY(EXPR)
In this file we implement the selector of the visitor and apply pattern.
In this file we implement the different visitors allowing unrolling of the visit.
In this file we define the Visitors classes.
Type const varianceSafe() const
bool const any() const
check if there is any non-zero element in an expression.
Type const wmean(ExprBase< Rhs > const &weights) const
bool const all() const
check if all the elements in an expression are not zero.
Type const wnorm2(ExprBase< Rhs > const &weights) const
Type const meanSafe() const
Type const minElt() const
Type const wnorm2Safe(ExprBase< Rhs > const &weights) const
Type const variance() const
int count() const
compute the value of non-zero element in an expression.
Type const sumSafe() const
hidden::Traits< Derived >::Type Type
int nbAvailableValues() const
Visitor::TypeConst visit(Visitor &visitor) const
Visit the container using a constant visitor.
Type const maxElt() const
Type const minEltSafe() const
Type const wmeanSafe(ExprBase< Rhs > const &weights) const
Type const normInf() const
Type const wnormSafe(ExprBase< Rhs > const &weights) const
Type const wvarianceSafe(ExprBase< Rhs > const &weights) const
Type const wnorm(ExprBase< Rhs > const &weights) const
Type const normSafe() const
Type const wvariance(ExprBase< Rhs > const &weights) const
Type const wsum(ExprBase< Rhs > const &weights) const
Type const norm2Safe() const
Type const wsumSafe(ExprBase< Rhs > const &weights) const
Type const maxEltSafe() const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
bool isFinite(Type const &x)
utility method allowing to know if a value is a finite value
Real dot(ExprBase< Container1D1 > const &x, ExprBase< Container1D2 > const &y)
Compute the dot product.
hidden::SliceVisitorSelector< Derived, hidden::MeanVisitor, Arrays::by_col_ >::type_result mean(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual mean value of the vec...
hidden::SliceVisitorSelector< Derived, hidden::MeanSafeVisitor, Arrays::by_col_ >::type_result meanSafe(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual mean value of the vec...
The namespace STK is the main domain space of the Statistical ToolKit project.
static Type NA()
Adding a Non Available (NA) special number.
Visitor checking if all the elements of an array are different from zero.
Visitor checking if at least, one element of an array is different from zero.
Visitor counting the number of not-zero element in an array This visitor can be used in conjunction w...
utility class for getting the result from a visitor acting on a vector or a point.
Visitor computing safely the maximal coefficient of the Array.
Visitor computing the maximal coefficient of the Array.
Visitor computing safely the max of all the coefficients of the Array.
Visitor computing the max of all the coefficients of the Array.
Visitor computing safely the mean of all the coefficients of the Array.
Visitor computing the mean of all the coefficients of the Array.
Visitor computing safely the minimal coefficient with its value and indexes.
Visitor computing the min coefficient with its value and coordinates.
Visitor computing safely the min of all the coefficients of the Array.
Visitor computing the min of all the coefficients of the Array.
Visitor computing the sum of all the coefficients of the Array.
If< is2D_ &&unrollRows_ &&unrollCols_, ArrayImpl, HelperImpl >::Result Impl