6#ifndef YARP_MATH_VEC2D_H
7#define YARP_MATH_VEC2D_H
22 std::is_same_v<T, int> || std::is_same_v<T, size_t> || std::is_same_v<T, double>,
23 "vec2D<T>: T must be int, size_t or double"
29 template <
typename Derived>
32 template <
typename Derived,
typename Scalar>
46 std::string PrintToString(
int precision = -1,
int width = -1)
const;
48 Vec2DCommon() =
default;
53 bool operator!=(
const Derived& other)
const;
54 Derived
operator+(
const Derived& other)
const;
55 Derived
operator-(
const Derived& other)
const;
56 Derived
operator*(
const Derived& other)
const;
68 using yarp::math::Vec2DCommon<
Vec2DOfDouble,
double>::Vec2DCommon;
75 using yarp::math::Vec2DCommon<
Vec2DOfInt,
int>::Vec2DCommon;
82 using yarp::math::Vec2DCommon<
Vec2DOfSizet,
size_t>::Vec2DCommon;
bool operator==(const struct v4l2_control &left, const struct v4l2_control &right)
contains the definition of a Matrix type
contains the definition of a Vector type
Vec2DOfDoubleData()=default
Vec2DOfSizetData()=default
Vector operator+(const Vector &a, const double &s)
Mathematical operations.
Vector operator-(const Vector &a, const double &s)
Subtraction operator between a vector and a scalar (defined in Math.h).
Vector operator*(double k, const Vector &b)
Scalar-vector product operator (defined in Math.h).
Vector & operator-=(Vector &a, const double &s)
Subtraction operator between a vector and a scalar (defined in Math.h).
Vector & operator+=(Vector &a, const double &s)
Addition operator between a scalar and a vector (defined in Math.h).
typename vec2D_selector< T >::type Vec2D
Derived operator*(const yarp::sig::Matrix &lhs, const Derived &rhs)