#ifndef GRID_MATH_OUTER_H #define GRID_MATH_OUTER_H namespace Grid { /////////////////////////////////////////////////////////////////////////////////////// // outerProduct Scalar x Scalar -> Scalar // Vector x Vector -> Matrix /////////////////////////////////////////////////////////////////////////////////////// template inline auto outerProduct (const iVector& lhs,const iVector& rhs) -> iMatrix { typedef decltype(outerProduct(lhs._internal[0],rhs._internal[0])) ret_t; iMatrix ret; for(int c1=0;c1 inline auto outerProduct (const iScalar& lhs,const iScalar& rhs) -> iScalar { typedef decltype(outerProduct(lhs._internal,rhs._internal)) ret_t; iScalar ret; ret._internal = outerProduct(lhs._internal,rhs._internal); return ret; } inline ComplexF outerProduct(const ComplexF &l, const ComplexF& r) { std::cout << "outer product taking conj "<