ocra-recipes
Doxygen documentation for the ocra-recipes repository
SubtractionFunction.h
Go to the documentation of this file.
1 
10 #ifndef _OCRABASE_SUBTRACTION_FUNCTION_H_
11 #define _OCRABASE_SUBTRACTION_FUNCTION_H_
12 
13 // includes
14 #include "ocra/optim/Function.h"
15 
16 
22 namespace ocra
23 {
31  {
32  // ------------------------ structures --------------------------------------
33  public:
34  typedef Function functionType_t; //< alias on the type of the mother class. Needed to duplicate the function tree.
35  protected:
36  private:
37 
38  // ------------------------ public static members ---------------------------
39  public:
40 
41  // ------------------------ constructors ------------------------------------
42  private:
45  protected:
46  public:
47  //TODO: implement
48  //SubtractionFunction(Function* f1, Function* f2);
49  SubtractionFunction(Function* f, const Vector& v);
50  SubtractionFunction(const Vector& v, Function* f);
51  virtual ~SubtractionFunction();
52 
53  // ------------------------ public interface --------------------------------
54  public:
55  void changeV(const Vector& v);
56 
57  // ------------------------ public methods ----------------------------------
58  public:
59 
60  // ------------------------ public static methods ---------------------------
61  public:
62 
63  // ------------------------ protected methods -------------------------------
64  protected:
65  virtual void computeValue(void) const;
66  virtual void computeGradient(void) const;
67  virtual void computeHessian(void) const;
68  virtual void computeJdot(void) const;
69  virtual void computeJdotXdot(void) const;
70 
71  virtual void doUpdateSize(void);
72 
73  // ------------------------ protected static methods ------------------------
74  protected:
75 
76  // ------------------------ private methods ---------------------------------
77  private:
78  void initHessian();
79 
80  // ------------------------ private static methods --------------------------
81  private:
82 
83  // ------------------------ protected members -------------------------------
84  protected:
85  int _case;
88  Vector _v1;
89  Vector _v2; //< -v2 in fact
90 
91  // ------------------------ protected static members ------------------------
92  protected:
93 
94  // ------------------------ private members ---------------------------------
95  private:
96 
97  // ------------------------ private static members --------------------------
98  private:
99 
100  // ------------------------ friendship declarations -------------------------
101  };
102 }
103 
104 #endif //_OCRABASE_SUBTRACTION_FUNCTION_H_
105 
106 // cmake:sourcegroup=toBeUpdated
virtual void doUpdateSize(void)
virtual void computeJdot(void) const
virtual void computeJdotXdot(void) const
void changeV(const Vector &v)
virtual void computeGradient(void) const
virtual void computeHessian(void) const
virtual void computeValue(void) const
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
Function class.
Definition: Function.h:77
SubtractionFunction class.
Declaration file of the Function class.