17 template <
class SCALAR =
double>
21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
23 typedef std::vector<Eigen::Matrix<SCALAR, 1, 1>, Eigen::aligned_allocator<Eigen::Matrix<SCALAR, 1, 1>>>
EigenTraj;
42 for (
size_t i = 0;
i < arg.size();
i++)
43 this->push_back(arg[
i]);
51 this->push_back(el(0, 0));
58 for (
size_t i = 0;
i < this->size();
i++)
60 Eigen::Matrix<SCALAR, 1, 1> newElement;
61 newElement(0, 0) = (*this)[
i];
62 eigenTraj.push_back(newElement);
An discrete array (vector) of a particular data type.
Definition: DiscreteArray.h:22
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::vector< Eigen::Matrix< SCALAR, 1, 1 >, Eigen::aligned_allocator< Eigen::Matrix< SCALAR, 1, 1 > > > EigenTraj
Definition: ScalarArray.h:23
void fromEigenTrajectory(const EigenTraj in)
Definition: ScalarArray.h:48
ScalarArray(const std::vector< SCALAR > &arg)
constructor from std::vector
Definition: ScalarArray.h:40
ScalarArray(const ScalarArray &other)
copy constructor
Definition: ScalarArray.h:37
CppAD::AD< CppAD::cg::CG< double > > SCALAR
constexpr size_t n
Definition: MatrixInversionTest.cpp:14
An array of scalar data types.
Definition: ScalarArray.h:18
ScalarArray()
default constructor
Definition: ScalarArray.h:26
virtual ~ScalarArray()
destructor
Definition: ScalarArray.h:47
ScalarArray(size_t n, const SCALAR &value=SCALAR())
resize constructor
Definition: ScalarArray.h:34
EigenTraj toEigenTrajectory()
convert to an Eigen trajectory
Definition: ScalarArray.h:55