|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
9 #ifndef YARP_MATH_VEC2D_H
10 #define YARP_MATH_VEC2D_H
19 #include <type_traits>
27 static_assert(std::is_same<size_t, T>::value || std::is_same<int, T>::value || std::is_same<double, T>::value,
"Vec2D can be specialized only as size_t, int, double");
35 Vec2D<T>(
const T& x_value,
const T& y_value);
55 std::string
toString(
int precision = -1,
int width = -1)
const;
95 #endif // YARP_MATH_VEC2D_H
This is a base class for objects that can be both read from and be written to the YARP network.
contains the definition of a Vector type
bool write(yarp::os::ConnectionWriter &connection) const override
Write vector to a connection.
yarp::math::Vec2D< T > operator+(yarp::math::Vec2D< T > lhs, const yarp::math::Vec2D< T > &rhs)
contains the definition of a Matrix type
yarp::os::Type getType() const override
Vector & operator+=(Vector &a, const double &s)
Addition operator between a scalar and a vector (defined in Math.h).
double norm(const yarp::sig::Vector &v)
Returns the Euclidean norm of the vector (defined in Math.h).
static Type byName(const char *name)
An interface for writing to a network connection.
An interface for reading from a network connection.
VectorOf< double > Vector
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
std::string toString(const T &value)
convert an arbitrary type to string.
Vector & operator-=(Vector &a, const double &s)
Subtraction operator between a vector and a scalar (defined in Math.h).
The main, catch-all namespace for YARP.
yarp::math::Vec2D< T > operator*(const yarp::sig::Matrix &lhs, yarp::math::Vec2D< T > rhs)
yarp::math::Vec2D< T > operator-(yarp::math::Vec2D< T > lhs, const yarp::math::Vec2D< T > &rhs)