- 3.0.2 core module.
ct::core::ScalarArray< SCALAR > Class Template Reference

An array of scalar data types. More...

#include <ScalarArray.h>

Inheritance diagram for ct::core::ScalarArray< SCALAR >:
ct::core::DiscreteArray< SCALAR > ct::core::tpl::TimeArray< SCALAR >

Public Member Functions

 ScalarArray ()
 default constructor More...
 
 ScalarArray (size_t n, const SCALAR &value=SCALAR())
 resize constructor More...
 
 ScalarArray (const ScalarArray &other)
 copy constructor More...
 
 ScalarArray (const std::vector< SCALAR > &arg)
 constructor from std::vector More...
 
virtual ~ScalarArray ()
 destructor More...
 
void fromEigenTrajectory (const EigenTraj in)
 
EigenTraj toEigenTrajectory ()
 convert to an Eigen trajectory More...
 
- Public Member Functions inherited from ct::core::DiscreteArray< SCALAR >
 DiscreteArray ()
 default constructor More...
 
 DiscreteArray (const DiscreteArray &&other)
 move constructor More...
 
 DiscreteArray (const DiscreteArray &other)
 copy constructor More...
 
 DiscreteArray (int n, const SCALAR &value=SCALAR())
 resize constructor More...
 
 DiscreteArray (iterator first, iterator last)
 copy constructor More...
 
 DiscreteArray (const_iterator first, const_iterator last)
 copy constructor More...
 
virtual ~DiscreteArray ()
 destructor More...
 
void swap (DiscreteArray &other)
 swaps the content of two arrays More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > & operator= (const DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > &rhs)
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > operator+ (const DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > &rhs) const
 overload + operator in order to be able to directly sum up two arrays More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > operator- (const DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > &rhs) const
 overload - operator in order to be able to directly take the difference between two arrays More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > & operator+= (const DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > &rhs)
 overload += operator More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > & operator-= (const DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > &rhs)
 overload -= operator More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > operator* (const SCALAR &scalar) const
 overload * operator More...
 
DiscreteArray< SCALAR, Eigen::aligned_allocator< SCALAR > > operator/ (const SCALAR &scalar) const
 overload / operator More...
 
BasetoImplementation ()
 returns the underlying std::vector More...
 
const BasetoImplementation () const
 returns the underlying std::vector More...
 
void eraseFront (const size_t N)
 erase an element from the front More...
 
void setConstant (const SCALAR &data)
 sets all elements to a constant. More...
 
void addOffset (const SCALAR &offset)
 add an offset to each element More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::vector< Eigen::Matrix< SCALAR, 1, 1 >, Eigen::aligned_allocator< Eigen::Matrix< SCALAR, 1, 1 > > > EigenTraj
 
- Public Attributes inherited from ct::core::DiscreteArray< SCALAR >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef SCALAR value_type
 data type More...
 

Additional Inherited Members

- Public Types inherited from ct::core::DiscreteArray< SCALAR >
typedef std::vector< SCALAR, Eigen::aligned_allocator< SCALAR > > Base
 base class (std::vector) More...
 
typedef std::vector< SCALAR, Eigen::aligned_allocator< SCALAR > >::iterator iterator
 iterator More...
 
typedef std::vector< SCALAR, Eigen::aligned_allocator< SCALAR > >::const_iterator const_iterator
 const iterator More...
 

Detailed Description

template<class SCALAR = double>
class ct::core::ScalarArray< SCALAR >

An array of scalar data types.

This class stores an array of scalar data types.

Constructor & Destructor Documentation

◆ ScalarArray() [1/4]

template<class SCALAR = double>
ct::core::ScalarArray< SCALAR >::ScalarArray ( )
inline

default constructor

◆ ScalarArray() [2/4]

template<class SCALAR = double>
ct::core::ScalarArray< SCALAR >::ScalarArray ( size_t  n,
const SCALAR value = SCALAR() 
)
inline

resize constructor

initializes an array with a certain length and fills it with a default value

Parameters
nlength of array
valuedefault value

◆ ScalarArray() [3/4]

template<class SCALAR = double>
ct::core::ScalarArray< SCALAR >::ScalarArray ( const ScalarArray< SCALAR > &  other)
inline

copy constructor

◆ ScalarArray() [4/4]

template<class SCALAR = double>
ct::core::ScalarArray< SCALAR >::ScalarArray ( const std::vector< SCALAR > &  arg)
inline

constructor from std::vector

◆ ~ScalarArray()

template<class SCALAR = double>
virtual ct::core::ScalarArray< SCALAR >::~ScalarArray ( )
inlinevirtual

destructor

Member Function Documentation

◆ fromEigenTrajectory()

template<class SCALAR = double>
void ct::core::ScalarArray< SCALAR >::fromEigenTrajectory ( const EigenTraj  in)
inline

◆ toEigenTrajectory()

template<class SCALAR = double>
EigenTraj ct::core::ScalarArray< SCALAR >::toEigenTrajectory ( )
inline

convert to an Eigen trajectory

Member Data Documentation

◆ EigenTraj

template<class SCALAR = double>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef std::vector<Eigen::Matrix<SCALAR, 1, 1>, Eigen::aligned_allocator<Eigen::Matrix<SCALAR, 1, 1> > > ct::core::ScalarArray< SCALAR >::EigenTraj

The documentation for this class was generated from the following file: