10 #ifndef YARP_EIGEN_EIGEN_H
11 #define YARP_EIGEN_EIGEN_H
27 return Eigen::Map<Eigen::VectorXd>(yarpVector.
data(),yarpVector.
size());
35 inline Eigen::Map< Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> >
toEigen(
yarp::sig::Matrix & yarpMatrix)
37 return Eigen::Map< Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> >(yarpMatrix.
data(),yarpMatrix.
rows(),yarpMatrix.
cols());
47 return Eigen::Map<const Eigen::VectorXd>(yarpVector.
data(),yarpVector.
size());
55 inline Eigen::Map<const Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> >
toEigen(
const yarp::sig::Matrix & yarpMatrix)
57 return Eigen::Map<const Eigen::Matrix<double,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> >(yarpMatrix.
data(),yarpMatrix.
rows(),yarpMatrix.
cols());
contains the definition of a Matrix type
contains the definition of a Vector type
double * data()
Return a pointer to the first element.
size_t cols() const
Return number of columns.
size_t rows() const
Return number of rows.
T * data()
Return a pointer to the first element of the vector.
Eigen::Map< Eigen::VectorXd > toEigen(yarp::sig::Vector &yarpVector)
Convert a yarp::sig::Vector to a Eigen::Map<Eigen::VectorXd> object.
The main, catch-all namespace for YARP.