ocra-recipes
Doxygen documentation for the ocra-recipes repository
BoundFunction.h
Go to the documentation of this file.
1 
13 #ifndef _OCRABASE_BOUND_FUNCTION_H_
14 #define _OCRABASE_BOUND_FUNCTION_H_
15 
16 #ifdef WIN32
17 # pragma once
18 #endif
19 
20 // includes
22 
28 namespace ocra
29 {
32  {
35  };
36 
37 
46  {
47 
48  // ------------------------ structures --------------------------------------
49  public:
50  typedef DiagonalLinearFunction functionType_t; //< alias on the type of the mother class. Needed to duplicate the function tree.
51 
52  // ------------------------ constructors ------------------------------------
53  private:
57  BoundFunction& operator= (const BoundFunction&);
59 
60  public:
68  BoundFunction(Variable& x, const VectorXd& bound, eBoundType type);
69  BoundFunction(Variable& x, const double bound, eBoundType type);
71 
72  // ------------------------ public interface --------------------------------
73  public:
76  void changeBounds(const double bound);
77  void changeBounds(const VectorXd& bounds);
79 
81  void changeIthBound(const int i, const double bound);
82 
83 
84  // ------------------------ protected methods -------------------------------
85  protected:
90  void doChangeDiagonal(const VectorXd& d);
91  void doChangeDiagonal(const double diagonalElementValue, const bool changeDefault = true);
92  void doChangeDefaultDiagonalValue(const double v);
93  void doChangeDefaultbValue(const double v);
95  };
96 }
97 
98 #endif //_OCRABASE_BOUND_FUNCTION_H_
99 
100 // cmake:sourcegroup=Function
void doChangeDefaultDiagonalValue(const double v)
void changeBounds(const double bound)
Variable & x
Definition: Function.h:309
DiagonalLinearFunction functionType_t
Definition: BoundFunction.h:50
BoundFunction class.
Definition: BoundFunction.h:45
void doChangeDiagonal(const VectorXd &d)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
void changeIthBound(const int i, const double bound)
This class represents a variable in a mathematical sense.
Definition: Variable.h:105
Declaration file of the DiagonalLinearFunction class.
void doChangeDefaultbValue(const double v)
DiagonalLinearFunction class.