ocra-recipes
Doxygen documentation for the ocra-recipes repository
SquaredLinearFunction.h
Go to the documentation of this file.
1 
14 #ifndef _OCRABASE_SQUARED_LINEAR_FUNCTION_H_
15 #define _OCRABASE_SQUARED_LINEAR_FUNCTION_H_
16 
17 // includes
20 #include <sstream>
21 
27 namespace ocra
28 {
39  {
40  // ------------------------ structures --------------------------------------
41  public:
42  typedef QuadraticFunction functionType_t; //< alias on the type of the mother class. Needed to duplicate the function tree.
43 
44  // ------------------------ constructors ------------------------------------
45  private:
47  SquaredLinearFunction& operator= (const SquaredLinearFunction&);
48  protected:
49  public:
52 
53  void changeWeight(const VectorXd& weight);
54  //void setWeight(const VectorXd& weight);
55 
57  const LinearFunction& getFunction() const;
58 
59  // ------------------------ protected methods -------------------------------
60  protected:
61  void updateHessian() const;
62 
63  void updateq() const;
64  void updater() const;
65 
67 
68  void onResize(int);
69 
70  // ------------------------ protected members -------------------------------
71  protected:
73  VectorXd _weight;
74  };
75 
76 
78 }
79 
80 #endif //_OCRABASE_SQUARED_LINEAR_FUNCTION_H_
81 
82 // cmake:sourcegroup=Function
LinearFunction class.
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
void testSquaredLinearFunction()
Declaration file of the LinearFunction class.
SquaredLinearFunction class.
void changeWeight(const VectorXd &weight)
QuadraticFunction class.
Declaration file of the QuadraticFunction class.