18 template <
class SCALAR =
double,
class TIME_SCALAR =
double>
22 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
41 for (
size_t i = 0;
i < arg.size();
i++)
48 std::vector<Eigen::Matrix<SCALAR, 1, 1>, Eigen::aligned_allocator<Eigen::Matrix<SCALAR, 1, 1>>>
toEigenTrajectory()
50 std::vector<Eigen::Matrix<SCALAR, 1, 1>, Eigen::aligned_allocator<Eigen::Matrix<SCALAR, 1, 1>>> eigenTraj;
51 for (
size_t i = 0;
i < this->
size();
i++)
53 Eigen::Matrix<SCALAR, 1, 1> newElement;
54 newElement(0, 0) = (*this)[
i];
55 eigenTraj.push_back(newElement);
Specialized type of a discrete trajectory for scalar types.
Definition: ScalarTrajectory.h:19
size_t size() const
returns the size of the trajectory
Definition: DiscreteTrajectoryBase.h:146
virtual ~ScalarTrajectory()
destructor
Definition: ScalarTrajectory.h:46
std::vector< Eigen::Matrix< SCALAR, 1, 1 >, Eigen::aligned_allocator< Eigen::Matrix< SCALAR, 1, 1 > > > toEigenTrajectory()
convert to an Eigen trajectory
Definition: ScalarTrajectory.h:48
CppAD::AD< CppAD::cg::CG< double > > SCALAR
A discrete, timed trajectory with interpolation.
Definition: DiscreteTrajectoryBase.h:31
constexpr size_t n
Definition: MatrixInversionTest.cpp:14
ScalarTrajectory(size_t n, const SCALAR &value=SCALAR())
resize constructor
Definition: ScalarTrajectory.h:33
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ScalarTrajectory()
default constructor
Definition: ScalarTrajectory.h:25
void push_back(const SCALAR &data, const TIME_SCALAR &time, const bool timeIsAbsolute)
Add a data and time point at the end.
Definition: DiscreteTrajectoryBase.h:181
ScalarTrajectory(const ScalarTrajectory &other)
copy constructor
Definition: ScalarTrajectory.h:36
ScalarTrajectory(const std::vector< SCALAR > &arg)
constructor from std::vector
Definition: ScalarTrajectory.h:39