25 #ifndef FIBER_DIFFERENCE_H_
26 #define FIBER_DIFFERENCE_H_
32 template <
typename Scalar,
class Exp1,
class Exp2>
45 static_assert(Exp1::ROWS_ == Exp2::ROWS_
46 && Exp1::COLS_ == Exp2::COLS_
47 && Exp1::SIZE_ == Exp2::SIZE_,
48 "Matrix sizes must agree in difference");
56 return (
A_[i] -
B_[i]);
60 return (
A_(i, j) -
B_(i, j));
64 template <
typename Scalar,
class Exp1,
class Exp2>
68 static_cast<Exp2 const&>(B));
74 #endif // FIBER_DIFFERENCE_H_
Scalar operator[](Size i) const
expression template for rvalues
_Difference< Scalar, Exp1, Exp2 > operator-(_RValue< Scalar, Exp1 > const &A, _RValue< Scalar, Exp2 > const &B)
_Difference(Exp1 const &A, Exp2 const &B)
Scalar operator()(Size i, Size j) const
expression template for difference of two matrix expressions