10 #ifndef _OCRA_QUADRATIC_FUNCTION_H_ 11 #define _OCRA_QUADRATIC_FUNCTION_H_ 53 template<
class Derived,
class VectorBase>
63 ,_inhibitPropagationFrom_q_or_r(false)
65 _q.push_back(
new VectorXd);
76 const MatrixXd&
getPi(
int index = 0)
const;
77 const VectorXd&
getqi(
int index = 0)
const;
78 double getri(
int index = 0)
const;
79 const VectorXd&
getr()
const;
81 void changePi(
const MatrixXd& Pi,
int index = 0);
82 void changeqi(
const VectorXd& qi,
int index = 0);
83 void changeri(
double ri,
int index = 0);
98 virtual void doChangePi(
const MatrixXd& Pi,
int index);
99 virtual void doChangeqi(
const VectorXd& qi,
int index);
100 virtual void doChangeri(
double ri,
int index);
116 mutable std::vector<VectorXd*>
_q;
122 mutable bool _inhibitPropagationFrom_q_or_r;
129 return get<PARTIAL_XX>(index);
145 return getr()[index];
162 #endif //_OCRA_QUADRATIC_FUNCTION_H_ virtual void updater() const
void invalidateq(int timestamp)
virtual void doChangeqi(const VectorXd &qi, int index)
void inhibitPropagationFrom_q_or_r() const
void changePi(const MatrixXd &Pi, int index=0)
virtual void doChangePi(const MatrixXd &Pi, int index)
void testQuadraticFunction()
virtual void updateq() const
virtual void updateValue() const
virtual void doChangeri(double ri, int index)
#define DEFINE_CLASS_POINTER_TYPEDEFS(Class)
virtual void updateJacobian() const
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual void doUpdateInputSizeEnd()
const VectorXd & getqi(int index=0) const
void changeqi(const VectorXd &qi, int index=0)
std::vector< VectorXd * > _q
This class represents a variable in a mathematical sense.
void desinhibitPropagationFrom_q_or_r() const
const MatrixXd & getPi(int index=0) const
virtual void updateHessian() const
void changeri(double ri, int index=0)
QuadraticFunction(Variable &x, const MatrixBase< Derived > &P, const VectorBase &q, double r)
virtual ~QuadraticFunction()
double getri(int index=0) const
Declaration file of the Function class.
void invalidater(int timestamp)
const VectorXd & getr() const
#define ocra_assert(ocra_expression)
virtual void doUpdateDimensionEnd(int oldDimension)