ocra-recipes
Doxygen documentation for the ocra-recipes repository
VariableMapping.h
Go to the documentation of this file.
1 
12 #ifndef _OCRABASE_VARIABLE_MAPPING_H_
13 #define _OCRABASE_VARIABLE_MAPPING_H_
14 
15 #ifdef WIN32
16 # pragma once
17 #endif
18 
19 namespace ocra
20 {
21  class Variable;
22 }
23 
24 #include <vector>
25 
26 namespace ocra
27 {
35  {
36  public:
37  VariableMapping(const Variable& relative, const Variable& base);
39 
40  private:
42  VariableMapping& operator= (const VariableMapping&);
43 
44  public:
45  const std::vector<int>& getMapping() const;
46  const Variable& getBaseVariable() const;
47  const Variable& getRelativeVariable() const;
48 
49  private:
50  void updateMapping() const;
51  void invalidate(int timestamp);
52 
53  private:
54  mutable std::vector<int> _mapping;
55  const Variable& _relative;
56  const Variable& _base;
57  mutable bool _validated;
58  };
59 }
60 
61 #endif //_OCRABASE_VARIABLE_MAPPING_H_
62 
63 // cmake:sourcegroup=Solvers
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
This class represents a variable in a mathematical sense.
Definition: Variable.h:105
const std::vector< int > & getMapping() const
A class to manage the relative mapping of a variable with respect to another one. ...
const Variable & getRelativeVariable() const
const Variable & getBaseVariable() const
VariableMapping(const Variable &relative, const Variable &base)