35 #ifndef ACADO_TOOLKIT_VECTOR_HPP 36 #define ACADO_TOOLKIT_VECTOR_HPP 67 template<
typename OtherDerived>
71 template<
typename OtherDerived>
75 template<
typename OtherDerived>
93 const T*
const _values
96 { std::copy(_values, _values + _dim,
Base::data()); }
101 : Base( _values.size() )
102 { std::copy(_values.begin(), _values.end(),
Base::data()); }
121 return (
operator==( _arg ) ==
false);
128 for (
unsigned el = 0; el <
Base::rows(); ++el)
138 for (
unsigned el = 0; el <
Base::rows(); ++el)
181 {
return Base::maxCoeff(); }
185 {
return Base::minCoeff(); }
189 {
return Base::mean(); }
275 const std::string&
name,
291 const std::string& name,
340 #endif // ACADO_TOOLKIT_VECTOR_HPP const char DEFAULT_END_STRING[4]
GenericVector< bool > BVector
USING_NAMESPACE_ACADO typedef TaylorVariable< Interval > T
bool operator>(const GenericVector &_arg) const
const uint DEFAULT_PRECISION
void init(unsigned _dim=0)
Allows to pass back messages to the calling function.
const char DEFAULT_COL_SEPARATOR[2]
GenericVector(const Eigen::MatrixBase< OtherDerived > &other)
GenericVector & setUnitVector(unsigned _idx)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > cwiseAbs() const
#define CLOSE_NAMESPACE_ACADO
const char DEFAULT_START_STRING[3]
EIGEN_STRONG_INLINE Index rows() const
GenericVector(unsigned _dim)
static const DVector emptyConstVector
bool isApprox(const Scalar &x, const Scalar &y, typename NumTraits< Scalar >::Real precision=NumTraits< Scalar >::dummy_precision())
GenericVector(unsigned _dim, const T *const _values)
bool operator==(const GenericVector &_arg) const
std::istream & operator>>(std::istream &_stream, GenericVector< T > &_arg)
virtual returnValue print(std::ostream &stream=std::cout, const std::string &name=DEFAULT_LABEL, const std::string &startString=DEFAULT_START_STRING, const std::string &endString=DEFAULT_END_STRING, uint width=DEFAULT_WIDTH, uint precision=DEFAULT_PRECISION, const std::string &colSeparator=DEFAULT_COL_SEPARATOR, const std::string &rowSeparator=DEFAULT_ROW_SEPARATOR) const
std::ostream & operator<<(std::ostream &_stream, const GenericVector< T > &_arg)
bool operator<(const GenericVector &_arg) const
bool operator>=(const GenericVector &_arg) const
GenericVector< int > IVector
Derived & setZero(Index size)
Derived & setConstant(Index size, const Scalar &value)
GenericVector(std::vector< T > _values)
EIGEN_STRONG_INLINE const Scalar * data() const
Eigen::Matrix< T, Eigen::Dynamic, 1 > Base
bool operator<=(const GenericVector &_arg) const
GenericVector & append(const GenericVector &_arg)
bool operator!=(const GenericVector &_arg) const
EIGEN_STRONG_INLINE Derived & _set(const DenseBase< OtherDerived > &other)
Copies the value of the expression other into *this with automatic resizing.
GenericVector< double > DVector
GenericVector(const Eigen::EigenBase< OtherDerived > &other)
void setAll(const T &_value)
const double EQUALITY_EPS
const char DEFAULT_ROW_SEPARATOR[6]
static DVector emptyVector
#define BEGIN_NAMESPACE_ACADO
The matrix class, also used for vectors and row-vectors.
GenericVector(const Eigen::ReturnByValue< OtherDerived > &other)
const char DEFAULT_LABEL[1]
Base class for all dense matrices, vectors, and expressions.
GenericVector getAbsolute() const
T getNorm(VectorNorm _norm) const
#define ACADOERRORTEXT(retval, text)
virtual returnValue read(std::istream &stream)