36#ifndef STK_ARRAYBYVECTORPRODUCT_H
37#define STK_ARRAYBYVECTORPRODUCT_H
56template<
typename Type>
80template<
typename Lhs,
typename Rhs,
typename Result>
83 typedef typename Result::Type
Type;
90 for (
int j= lhs.beginCols();
j<lhs.endCols(); ++
j)
92 for (
int i= lhs.beginRows();
i< lhs.endRows(); ++
i)
93 {
res.elt(
i) += lhs(
i,
j) * rhs[
j];}
104template<
typename Lhs,
typename Rhs,
typename Result>
107 typedef typename Result::Type
Type;
114 for (
int j= rhs.beginCols();
j<rhs.endCols(); ++
j)
116 for (
int i= rhs.beginRows();
i< rhs.endRows(); ++
i)
117 {
res.elt(
j) += lhs[
i] * rhs(
i,
j);}
125template<
typename Lhs,
typename Rhs,
typename Result>
128 typedef typename Result::Type
Type;
132 template<
class SubLhs,
class SubRhs>
136 for (
int j=r.beginCols();
j< r.endCols(); ++
j)
139 for (
int i=
l.begin();
i<
l.end(); ++
i) {
sum +=
l.elt(
i) * r.elt(
i,
j); }
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Index sub-vector region: Specialization when the size is unknown.
Arrays::SumOp< Lhs, Rhs >::result_type sum(Lhs const &lhs, Rhs const &rhs)
convenience function for summing two arrays
const int pointByArrayColSize_
TRange< pointByArrayRowSize_ > pointByArrayRowRange
TRange< pointByArrayColSize_ > PointByArrayColRange
const int pointByArrayRowSize_
The namespace STK is the main domain space of the Statistical ToolKit project.
this structure regroup all the methods using only pointers on the Type
static Type vectorByVector(Type const *p_lhs, Type const *p_rhs)
multiplication of two vectors
static Type PanelByVector(Type const *p_lhs, Type const *p_rhs)
multiplication of two vectors
This structure regroup the products between a point and different kind of array.
static void run(ExprBase< Lhs > const &l, ExprBase< Rhs > const &r, Result &res)
Compute the product res = l*r with l a point (a row-vector) and r a matrix using column decomposition...
static void mult(SubLhs const &l, SubRhs const &r, Result &res)
Compute the product res = l*r with l a point (a row-vector) and r a matrix using the standard formula...
Methods to use for C=AV with A a general matrix and V a vector.
static void run(Lhs const &lhs, Rhs const &rhs, Result &res)
Main method for Matrices by vector multiplication implementation res have been resized and initialize...
Methods to use for C=PB with P a point and B a matrix.
static void run(Lhs const &lhs, Rhs const &rhs, Result &res)
Main method for point by Matrices multiplication implementation.