11 #ifndef BOGUS_BLOCK_OPERATORS_HPP
12 #define BOGUS_BLOCK_OPERATORS_HPP
14 #include "Expressions.hpp"
20 template <
typename LhsT,
typename RhsT >
21 Addition< LhsT, RhsT > operator+ (
const BlockObjectBase< LhsT >& lhs,
22 const BlockObjectBase< RhsT > &rhs )
24 return Addition< LhsT, RhsT >( lhs.derived(), rhs.derived() ) ;
27 template <
typename LhsT,
typename RhsT >
28 Addition< LhsT, RhsT > operator- (
const BlockObjectBase< LhsT >& lhs,
29 const BlockObjectBase< RhsT > &rhs )
31 return Addition< LhsT, RhsT >( lhs.derived(), rhs.derived(), 1, -1 ) ;
34 template <
typename Derived >
35 Scaling< Derived > operator* (
const BlockObjectBase< Derived >& lhs,
36 typename Derived::Scalar rhs )
38 return Scaling< Derived >( lhs.derived(), rhs ) ;
41 template <
typename Derived >
42 Scaling< Derived > operator* (
typename Derived::Scalar lhs ,
43 const BlockObjectBase< Derived >& rhs)
45 return Scaling< Derived >( rhs.derived(), lhs ) ;
48 template <
typename LhsT,
typename RhsT >
49 Product< LhsT, RhsT > operator* (
const BlockObjectBase< LhsT >& lhs,
50 const BlockObjectBase< RhsT > &rhs )
52 return Product< LhsT, RhsT >( lhs.derived(), rhs.derived() ) ;
55 template <
typename Derived >
56 Scaling< Derived > operator/ (
const BlockObjectBase< Derived >& lhs,
57 typename Derived::Scalar rhs )
59 return Scaling< Derived >( lhs.derived(), 1/rhs ) ;