Skip to content
Snippets Groups Projects

Resolve "HasStateBlocks::addStateBlock() needs to register SB's"

1 file
+ 7
7
Compare changes
  • Side-by-side
  • Inline
@@ -26,7 +26,7 @@ class HasStateBlocks
@@ -26,7 +26,7 @@ class HasStateBlocks
void appendToStructure(const std::string& _frame_type){ structure_ += _frame_type; }
void appendToStructure(const std::string& _frame_type){ structure_ += _frame_type; }
bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type) != std::string::npos; }
bool isInStructure(const std::string& _sb_type) { return structure_.find(_sb_type) != std::string::npos; }
const std::map<std::string, StateBlockPtr>& getStateBlockMap() const;
const std::unordered_map<std::string, StateBlockPtr>& getStateBlockMap() const;
std::vector<StateBlockPtr> getStateBlockVec() const;
std::vector<StateBlockPtr> getStateBlockVec() const;
// Some typical shortcuts -- not all should be coded here, see notes below.
// Some typical shortcuts -- not all should be coded here, see notes below.
@@ -64,15 +64,15 @@ class HasStateBlocks
@@ -64,15 +64,15 @@ class HasStateBlocks
void removeStateBlocks(ProblemPtr _problem);
void removeStateBlocks(ProblemPtr _problem);
// States
// States
virtual void setState(const Eigen::VectorXd& _state, const bool _notify = true);
virtual void setState(const Eigen::VectorXd& _state, const bool _notify = true);
Eigen::VectorXd getState() const;
Eigen::VectorXd getState() const;
void getState(Eigen::VectorXd& _state) const;
void getState(Eigen::VectorXd& _state) const;
unsigned int getSize() const;
unsigned int getSize() const;
unsigned int getLocalSize() const;
unsigned int getLocalSize() const;
private:
private:
std::string structure_;
std::string structure_;
std::map<std::string, StateBlockPtr> state_block_map_;
std::unordered_map<std::string, StateBlockPtr> state_block_map_;
};
};
@@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks()
@@ -97,7 +97,7 @@ inline HasStateBlocks::~HasStateBlocks()
//
//
}
}
inline const std::map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const
inline const std::unordered_map<std::string, StateBlockPtr>& HasStateBlocks::getStateBlockMap() const
{
{
return state_block_map_;
return state_block_map_;
}
}
Loading