From 23f811d8087563ba99df57b7b1442d4d5cdddcdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu> Date: Thu, 13 Oct 2022 08:29:31 +0200 Subject: [PATCH] Document all perturb() instances --- include/core/problem/problem.h | 5 ++++- include/core/state_block/has_state_blocks.h | 5 ++++- include/core/state_block/state_block.h | 4 +++- include/core/state_block/state_composite.h | 5 ++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/include/core/problem/problem.h b/include/core/problem/problem.h index 46500c6e2..e9134b559 100644 --- a/include/core/problem/problem.h +++ b/include/core/problem/problem.h @@ -366,7 +366,10 @@ class Problem : public std::enable_shared_from_this<Problem> // All branches ------------------------------------------- - // perturb states + /** + * \brief perturb all states states with random noise + * following an uniform distribution in [ -amplitude, amplitude ] + */ void perturb(double amplitude = 0.01); // transform states void transform(const VectorComposite& _transformation); diff --git a/include/core/state_block/has_state_blocks.h b/include/core/state_block/has_state_blocks.h index 40ddcebbe..f11047c17 100644 --- a/include/core/state_block/has_state_blocks.h +++ b/include/core/state_block/has_state_blocks.h @@ -97,7 +97,10 @@ class HasStateBlocks unsigned int getSize(const StateStructure& _structure="") const; unsigned int getLocalSize(const StateStructure& _structure="") const; - // Perturb state + /** + * \brief perturb all states states with random noise + * following an uniform distribution in [ -amplitude, amplitude ] + */ void perturb(double amplitude = 0.01); protected: diff --git a/include/core/state_block/state_block.h b/include/core/state_block/state_block.h index 2dbab85a7..aa78dff96 100644 --- a/include/core/state_block/state_block.h +++ b/include/core/state_block/state_block.h @@ -176,7 +176,9 @@ public: virtual Eigen::VectorXd identity() const; Eigen::VectorXd zero() const; - /** \brief perturb state + /** + * \brief perturb all states states with random noise + * following an uniform distribution in [ -amplitude, amplitude ] */ void perturb(double amplitude = 0.1); diff --git a/include/core/state_block/state_composite.h b/include/core/state_block/state_composite.h index 3a2e72aa3..8f1d6de1f 100644 --- a/include/core/state_block/state_composite.h +++ b/include/core/state_block/state_composite.h @@ -314,7 +314,10 @@ class StateBlockComposite // Plus operator void plus(const VectorComposite& _dx); - // Perturb state with random noise + /** + * \brief perturb all states states with random noise + * following an uniform distribution in [ -amplitude, amplitude ] + */ void perturb(double amplitude = 0.01); // These act on all state blocks. Per-block action must be done through state_block.fix() or through extended API in derived classes of this. -- GitLab