34 #ifndef OPEN_WALKER_CORE_VECTOR_DOF_H 35 #define OPEN_WALKER_CORE_VECTOR_DOF_H 37 #include <Eigen/Dense> 48 template <
typename _Scalar,
int _Rows>
50 public Eigen::Matrix<_Scalar, _Rows, 1>
53 typedef _Scalar Scalar;
60 typedef Eigen::Matrix<Scalar, Rows, 1> Base;
69 static typename Base::ConstantReturnType
Zero()
77 static typename Base::ConstantReturnType
Ones()
85 static typename Base::ConstantReturnType
Constant(
const Scalar& value)
93 static const typename Base::RandomReturnType
Random()
101 static const typename Base::BasisReturnType
Unit(
typename Base::Index i)
120 template<
typename OtherDerived>
128 using Base::operator=;
131 VectorDof& setConstant(
const Scalar& value)
137 VectorDof& setLinSpaced(
const Scalar& low,
const Scalar& high)
167 std::ostringstream out;
168 out << this->transpose();
178 using Base::resizeLike;
179 using Base::conservativeResize;
184 using Base::LinSpaced;
191 #endif // OPEN_WALKER_CORE_VECTOR_DOF_H static const Base::BasisReturnType Unit(typename Base::Index i)
Returns an expression where all coefficients represent the i-th basis vector.
Definition: vector_dof.h:101
static Base::ConstantReturnType Zero()
Returns an expression where all coefficients equal zero.
Definition: vector_dof.h:69
static Base::ConstantReturnType Constant(const Scalar &value)
Returns an expression where all coefficients equal the given value.
Definition: vector_dof.h:85
The VectorDof class.
Definition: vector_dof.h:49
Contains the global configurations.
Definition: angular_acceleration.h:39
VectorDof()
Default Constructor.
Definition: vector_dof.h:111
std::string toString() const
Conversion to std::string.
Definition: vector_dof.h:165
#define OW_ROBOT_DOF
A definition to set degrees of freedom of the robot.
Definition: configuration.h:45
static const Base::RandomReturnType Random()
Returns an expression where all coefficients are random.
Definition: vector_dof.h:93
VectorDof(const Eigen::EigenBase< OtherDerived > &other)
Copy constructor.
Definition: vector_dof.h:121
static Base::ConstantReturnType Ones()
Returns an expression where all coefficients equal one.
Definition: vector_dof.h:77