STK++ 0.9.13
STK_ExprBaseOperators.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: 13 oct. 2012
28 * Author: iovleff, S..._Dot_I..._At_stkpp_Dot_org (see copyright for ...)
29 **/
30
35#ifndef STK_EXPRBASEOPERATORS_H
36#define STK_EXPRBASEOPERATORS_H
37
39
41#define IMPLEMENT_BINARY_OPERATOR(OPERATORNAME, BINARYOPERATORNAME) \
42template<class Derived> \
43template<typename Rhs> \
44inline typename hidden::OperatorSelector<Derived, Rhs, Arrays::BINARYOPERATORNAME>::Result const \
45ExprBase<Derived>::OPERATORNAME( ExprBase<Rhs> const& other) const \
46{ return hidden::OperatorSelector<Derived, Rhs, Arrays::BINARYOPERATORNAME>::Selector::run(this->asDerived(), other.asDerived());}
47
48
49namespace STK
50{
51 IMPLEMENT_BINARY_OPERATOR(operator==,equalOp_)
55 IMPLEMENT_BINARY_OPERATOR(operator>=,greaterThanOrEqualOp_)
56 IMPLEMENT_BINARY_OPERATOR(operator<=,lessThanOrEqualOp_)
57
63
66
69
73} // namespace STK
74
75#undef IMPLEMENT_BINARY_OPERATOR
76
77#endif /* STK_EXPRBASEOPERATORS_H */
In this file we implement the class allowing to disambiguate the use of an UnaryOperator or a BinaryO...
#define IMPLEMENT_BINARY_OPERATOR(OPERATORNAME, BINARYOPERATORNAME)
utility macro allowing to implement binary operators
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
hidden::SliceVisitorSelector< Derived, hidden::MinVisitor, Arrays::by_col_ >::type_result min(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual minimal value of the ...
hidden::SliceVisitorSelector< Derived, hidden::MaxVisitor, Arrays::by_col_ >::type_result max(Derived const &A)
If A is a row-vector or a column-vector then the function will return the usual maximal value of the ...
The namespace STK is the main domain space of the Statistical ToolKit project.