STK++ 0.9.13
STK_ExprBaseDot.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------*/
2/* Copyright (C) 2004-2016 Serge Iovleff
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. 2012
28 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
36#ifndef STK_EXPRBASEDOT_H
37#define STK_EXPRBASEDOT_H
38
39namespace STK
40{
41
42/* @returns the dot product of *this with other. */
43template<class Lhs>
44template<class Rhs>
45typename hidden::Promote<typename hidden::Traits<Lhs>::Type, typename Rhs::Type>::result_type const
53
54/* @returns the dot product of *this with other. */
55template<class Lhs>
56template<class Rhs>
57typename hidden::Promote<typename hidden::Traits<Lhs>::Type, typename Rhs::Type>::result_type const
59{
60 typedef typename hidden::Traits<Rhs>::Type RType;
63 return BinaryOperator< ProductOp<Type, RType>, Lhs, Rhs>(this->asDerived(), other.asDerived()).sumSafe();
64}
65
66
67} // namespace STK
68
69#endif /* STK_ARRAYBASEDOT_H */
#define STK_STATIC_ASSERT_POINT_OR_VECTOR_ONLY(EXPR)
#define STK_STATIC_ASSERT_ONE_DIMENSION_ONLY(EXPR)
hidden::Promote< Type, typenameRhs::Type >::result_type const dotSafe(ExprBase< Rhs > const &other) const
hidden::Promote< Type, typenameRhs::Type >::result_type const dot(ExprBase< Rhs > const &other) const
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
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.
Convenient struct to Promote the result Type of some binary functors.