23 #ifndef NDARRAY_DETAIL_BinaryOp_h_INCLUDED
24 #define NDARRAY_DETAIL_BinaryOp_h_INCLUDED
34 #include <boost/iterator/iterator_adaptor.hpp>
35 #include <boost/iterator/zip_iterator.hpp>
36 #include <boost/tuple/tuple.hpp>
48 template <
typename Operand1,
typename Operand2,
typename BinaryFunction>
50 BinaryOpIterator<Operand1,Operand2,BinaryFunction>,
53 typename ExpressionTraits<Operand1>::Iterator,
54 typename ExpressionTraits<Operand2>::Iterator
57 typename ExpressionTraits< BinaryOpExpression<Operand1,Operand2,BinaryFunction> >::Value,
59 typename ExpressionTraits< BinaryOpExpression<Operand1,Operand2,BinaryFunction> >::Reference
73 BinaryFunction
const & functor
87 this->base_reference()->
template get<0>(),
88 this->base_reference()->
template get<1>()
102 template <
typename Operand1,
typename Operand2,
typename BinaryFunction,
int N>
114 Operand1
const & operand1,
115 Operand2
const & operand2,
116 BinaryFunction
const & functor
150 #endif // !NDARRAY_DETAIL_BinaryOp_h_INCLUDED
Reference operator[](int n) const
ExpressionTraits< Self >::Iterator Iterator
ExpressionTraits< Operation >::Reference Reference
BinaryOpExpression< Operand1, Operand2, BinaryFunction > Operation
BinaryOpIterator(BinaryOpIterator const &other)
Code to apply arbitrary scalar functors to arrays.
ExpressionTraits< Self >::ND ND
BinaryOpExpression(Operand1 const &operand1, Operand2 const &operand2, BinaryFunction const &functor)
#define NDARRAY_ASSERT(ARG)
ExpressionTraits< Operand2 >::Iterator BaseIterator2
ExpressionTraits< Self >::Element Element
ExpressionTraits< Self >::Value Value
Definitions for ExpressionBase.
ExpressionTraits< Operation >::Value Value
BinaryOpExpression< Operand1, Operand2, BinaryFunction, N > Self
UnaryFunction::result_type vectorize(UnaryFunction const &functor, Scalar const &scalar)
Apply a non-mutating unary function object to a scalar.
ExpressionTraits< Self >::Reference Reference
friend class boost::iterator_core_access
Reference dereference() const
BinaryOpIterator(BaseIterator1 const &baseIter1, BaseIterator2 const &baseIter2, BinaryFunction const &functor)
CRTP base class for all multidimensional expressions.
ExpressionTraits< Operand1 >::Iterator BaseIterator1