diff --git a/include/core/state_block/state_composite.h b/include/core/state_block/state_composite.h index f820fc5bab837b85e68263609f5a9102a7580bd4..7989fd807eab08187c802e0386af02de56ef4f1b 100644 --- a/include/core/state_block/state_composite.h +++ b/include/core/state_block/state_composite.h @@ -69,13 +69,7 @@ class VectorComposite : public std::unordered_map < char, Eigen::VectorXd > void set(const VectorXd& _v, const StateStructure& _structure, const std::list<int>& _sizes); void setZero(); - bool includesStructure(const StateStructure& _structure) - { - for (auto key : _structure) - if (count(key) == 0) - return false; - return true; - } + bool includesStructure(const StateStructure &_structure) const; friend std::ostream& operator <<(std::ostream &_os, const wolf::VectorComposite &_x); friend wolf::VectorComposite operator +(const wolf::VectorComposite &_x, const wolf::VectorComposite &_y); diff --git a/src/state_block/state_composite.cpp b/src/state_block/state_composite.cpp index 0f4efab6f1f093d8f1425d0855a453c6370f1c93..169bc82ca8edd1fa751bac1e309aa2ce1eb95379 100644 --- a/src/state_block/state_composite.cpp +++ b/src/state_block/state_composite.cpp @@ -81,6 +81,14 @@ Eigen::VectorXd VectorComposite::vector(const StateStructure &_structure) const return x; } +bool VectorComposite::includesStructure(const StateStructure &_structure) const +{ + for (auto key : _structure) + if (count(key) == 0) + return false; + return true; +} + std::ostream& operator <<(std::ostream &_os, const wolf::VectorComposite &_x) { for (const auto &pair_key_vec : _x)