16 template <
typename Type,
size_t M,
size_t N>
19 template<
typename Type,
size_t M>
20 class Vector :
public Matrix<Type, M, 1>
32 explicit Vector(
const Type data_[M]) :
37 template<
size_t P,
size_t Q>
39 Matrix<Type, M, 1>(slice_in)
45 const MatrixM1 &v = *
this;
55 Type
dot(
const MatrixM1 & b)
const {
58 for (
size_t i = 0; i<M; i++) {
70 return Vector(MatrixM1::operator*(b));
92 return (*
this) /
norm();
96 const Type n =
norm();
114 for (
size_t i = 0; i<M; i++) {
Type operator()(size_t i) const
Type operator*(const MatrixM1 &b) const
Type norm_squared() const
Vector normalized() const
Type dot(const MatrixM1 &b) const
Vector operator*(Type b) const
bool longerThan(Type testVal) const
Type & operator()(size_t i)
Vector(const MatrixM1 &other)
Vector(const Type data_[M])
Vector unit_or_zero(const Type eps=Type(1e-5)) const
Vector(const Slice< Type, M, 1, P, Q > &slice_in)
Dual< Scalar, N > sqrt(const Dual< Scalar, N > &a)
Matrix< Type, M, 1 > MatrixM1