25 #ifndef FIBER_CROSS_MATRIX_H_
26 #define FIBER_CROSS_MATRIX_H_
30 namespace cross_matrix {
57 template <
typename Scalar,
class Exp>
70 static_assert(Exp::SIZE_ == 3,
71 "Cross-product matrices are only defined for size = 3"
81 return (*
this)(i / 3, i % 3);
86 assert(0 <= i && i <= 2);
87 assert(0 <= j && j <= 2);
100 template <
typename Scalar,
class Exp>
107 #endif // FIBER_CROSS_MATRIX_H_
_CrossMatrix< Scalar, Exp > CrossMatrix(_RValue< Scalar, Exp > const &A)
cross-product matrix of a vector
Scalar operator[](Size i) const
return the evaluated i'th element of a vector expression
expression template for rvalues
Exp const & v_
wrapped expression
const int kIDX[9]
indices of a vector in it's cross-product representation
cross-product matrix of a vector
Scalar operator()(Size i, Size j) const
return the evaluated (j,i)'th element of a matrix expression
const int kSIGN[9]
signs in the cross-product representation
_CrossMatrix(Exp const &A)