ocra-recipes
Doxygen documentation for the ocra-recipes repository
IdentityFunction.h
Go to the documentation of this file.
1 
10 #ifndef _OCRABASE_IDENTITY_FUNCTION_H_
11 #define _OCRABASE_IDENTITY_FUNCTION_H_
12 
13 #ifdef WIN32
14 # pragma once
15 #endif
16 
18 
19 namespace ocra
20 {
28  {
29  // ------------------------ structures --------------------------------------
30  public:
31  typedef DiagonalLinearFunction functionType_t; //< alias on the type of the mother class. Needed to duplicate the function tree.
32 
33  // ------------------------ constructors ------------------------------------
34  private:
38  IdentityFunction& operator= (const IdentityFunction&);
40 
41  public:
43  IdentityFunction(Variable& x, bool resizable = true);
44 
45  // ------------------------ public interface --------------------------------
46 
48  bool isResizable() const;
49 
50  // ------------------------ protected methods -------------------------------
51  protected:
52  virtual void updateValue() const;
53 
55  virtual void doUpdateInputSizeBegin();
56 
58  virtual void doUpdateInputSizeEnd();
59 
63  virtual void doChangeDiagonal(const VectorXd& d);
64  virtual void doChangeDiagonal(const double diagonalElementValue, const bool changeDefault = true);
65  virtual void doChangeDefaultDiagonalValue(const double v);
66  virtual void doChangeDefaultbValue(const double v);
68 
72  virtual void doChangeA(const MatrixXd& A);
73 
74  // ------------------------ private methods -------------------------------
75  private:
76  void buildIdentity();
77 
78  // ------------------------ private members -------------------------------
79  private:
80  bool _resizable;
81  };
82 }
83 
84 
85 
86 #endif //_OCRABASE_IDENTITY_FUNCTION_H_
87 
88 // cmake:sourcegroup=Function
virtual void doChangeDefaultDiagonalValue(const double v)
virtual void doUpdateInputSizeEnd()
virtual void doChangeDefaultbValue(const double v)
Variable & x
Definition: Function.h:309
virtual void doChangeDiagonal(const VectorXd &d)
DiagonalLinearFunction functionType_t
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
virtual void doChangeA(const MatrixXd &A)
This class represents a variable in a mathematical sense.
Definition: Variable.h:105
Declaration file of the DiagonalLinearFunction class.
virtual void doUpdateInputSizeBegin()
IdentityFunction class.
DiagonalLinearFunction class.
virtual void updateValue() const