From 5aeca3f22ea4d2b27f5f20b4113355541ddc0146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Thu, 9 Apr 2020 20:40:06 +0200 Subject: [PATCH] rename getStateComposite -> getVectorComposite --- include/core/state_block/has_state_blocks.h | 6 +++--- src/problem/problem.cpp | 2 +- src/processor/processor_motion.cpp | 4 ++-- src/state_block/has_state_blocks.cpp | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h index c1858d42b..843e48b46 100644 --- a/include/core/state_block/has_state_blocks.h +++ b/include/core/state_block/has_state_blocks.h @@ -73,9 +73,9 @@ class HasStateBlocks void getState(Eigen::VectorXd& _state, const StateStructure& _sub_structure = StateStructure()) const; Eigen::VectorXd getState(const StateStructure& _sub_structure = StateStructure()) const; - VectorComposite getStateComposite() const; - bool getStateComposite(VectorComposite& _state) const; - void setStateComposite(const VectorComposite& _state); + VectorComposite getVectorComposite() const; + bool getVectorComposite(VectorComposite& _state) const; + void setVectorComposite(const VectorComposite& _state); // Perturb state with noise void perturb(double amplitude = 0.01); diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp index 4dcc5f269..91f2545b9 100644 --- a/src/problem/problem.cpp +++ b/src/problem/problem.cpp @@ -382,7 +382,7 @@ inline bool Problem::getStateComposite(VectorComposite& _state) const { auto last_kf_or_aux = trajectory_ptr_->getLastKeyOrAuxFrame(); if (last_kf_or_aux) - _state = last_kf_or_aux->getStateComposite(); + _state = last_kf_or_aux->getVectorComposite(); else _state = VectorComposite(); } diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index 32ae946b7..4b34d5430 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -402,7 +402,7 @@ bool ProcessorMotion::getStateComposite(VectorComposite& _state) const { // TODO implement this if (last_ptr_ && last_ptr_->getFrame()) - return getLast()->getFrame()->getStateComposite(_state); + return getLast()->getFrame()->getVectorComposite(_state); else return false; } @@ -411,7 +411,7 @@ bool ProcessorMotion::getStateComposite(const TimeStamp& _ts, VectorComposite& _ { // TODO implement this if (last_ptr_ && last_ptr_->getFrame()) - return getLast()->getFrame()->getStateComposite(_state); + return getLast()->getFrame()->getVectorComposite(_state); else return false; } diff --git a/src/state_block/has_state_blocks.cpp b/src/state_block/has_state_blocks.cpp index 7bdd6b488..2c88b529c 100644 --- a/src/state_block/has_state_blocks.cpp +++ b/src/state_block/has_state_blocks.cpp @@ -44,7 +44,7 @@ void HasStateBlocks::removeStateBlocks(ProblemPtr _problem) } } -bool HasStateBlocks::getStateComposite(VectorComposite &_state) const +bool HasStateBlocks::getVectorComposite(VectorComposite &_state) const { for (auto &pair_key_sb : state_block_map_) { @@ -53,14 +53,14 @@ bool HasStateBlocks::getStateComposite(VectorComposite &_state) const return true; } -VectorComposite HasStateBlocks::getStateComposite() const +VectorComposite HasStateBlocks::getVectorComposite() const { VectorComposite state; - getStateComposite(state); + getVectorComposite(state); return state; } -void HasStateBlocks::setStateComposite(const VectorComposite &_state) +void HasStateBlocks::setVectorComposite(const VectorComposite &_state) { for (const auto &pair_key_sb : _state) { -- GitLab