From 601aa755a4f07a8a08397e79cc24fce70ee06205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fr=C3=B6hlich?= Date: Fri, 17 May 2024 14:01:57 +0100 Subject: [PATCH] prototype implementation --- include/amici/backwardproblem.h | 6 ++++++ include/amici/edata.h | 6 ++++++ src/edata.cpp | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/include/amici/backwardproblem.h b/include/amici/backwardproblem.h index a5d32e3c47..64395e00fe 100644 --- a/include/amici/backwardproblem.h +++ b/include/amici/backwardproblem.h @@ -70,6 +70,12 @@ class BackwardProblem { */ AmiVector const& getAdjointState() const { return xB_; } + /** + * @brief Accessor for dxB + * @return xB + */ + AmiVector const& getAdjointStateDerivative() const { return dxB_; } + /** * @brief Accessor for xQB * @return xQB diff --git a/include/amici/edata.h b/include/amici/edata.h index e135bedd9e..3d7433b1ec 100644 --- a/include/amici/edata.h +++ b/include/amici/edata.h @@ -445,6 +445,12 @@ class ExpData : public SimulationParameters { std::vector const& input, char const* fieldname ) const; + /** + * @brief check whether this instance implements only equilibration + * without simulation + */ + bool isEquilibration() const; + /** @brief number of observables */ int nytrue_{0}; diff --git a/src/edata.cpp b/src/edata.cpp index fee49d5717..3bb0a062fc 100644 --- a/src/edata.cpp +++ b/src/edata.cpp @@ -386,6 +386,11 @@ void ExpData::checkEventsDimension( ); } +bool ExpData::isEquilibration() const { + return ts_.size() == 1 && std::isinf(ts_[0]); +} + + void checkSigmaPositivity( std::vector const& sigmaVector, char const* vectorName ) {