25 #ifndef FIBER_PRODUCT_H_
26 #define FIBER_PRODUCT_H_
33 template<
typename Scalar,
class Exp1,
class Exp2>
36 static_assert(Exp1::COLS_ == Exp2::ROWS_,
37 "Inner dimensions of matrix multiplication must agree");
40 for(
int i=0; i < Exp1::ROWS_; i++) {
41 for(
int j=0; j < Exp2::COLS_; j++) {
49 template <
typename Scalar,
class Exp1,
class Exp2>
52 static_assert(Exp1::SIZE_ == Exp2::SIZE_,
53 "Cannot compute a dot product of vectors that are not the"
56 for (
int i = 0; i < A.
size(); i++) {
64 #endif // FIBER_PRODUCT_H_
_RView< Scalar, Exp, Exp::ROWS_, 1 > GetColumn(_RValue< Scalar, Exp > const &A, int j)
expression template for rvalues
_RView< Scalar, Exp, 1, Exp::COLS_ > GetRow(_RValue< Scalar, Exp > const &A, int i)
Scalar Dot(_RValue< Scalar, Exp1 > const &A, _RValue< Scalar, Exp2 > const &B)
Dot product of two vectors.
Matrix< Scalar, Exp1::ROWS_, Exp2::COLS_ > operator*(_RValue< Scalar, Exp1 > const &A, _RValue< Scalar, Exp2 > const &B)
Matrix multiplication.