@@ -50,6 +50,8 @@ namespace qlibs {
5050 class nState {
5151 private:
5252 real_t x[ 3 ] = { 0 .0_re, 0 .0_re, 0 .0_re };
53+ real_t vmin{ -REAL_MAX };
54+ real_t vmax{ +REAL_MAX };
5355 void inline update ( const real_t &s )
5456 {
5557 x[ 2 ] = x[ 1 ];
@@ -153,7 +155,18 @@ namespace qlibs {
153155 dMethod = m;
154156 }
155157
156- /* *
158+ /* *
159+ * @brief Sets the saturation limits for the integrator output.
160+ * @param[in] minV The minimum value the output can reach.
161+ * @param[in] maxV The maximum value the output can reach.
162+ * @return @c true if the limits are valid and applied; @c false
163+ * otherwise (e.g., minV > maxV).
164+ * @note If not set, the output is unbounded.
165+ */
166+ bool setSaturation ( const real_t minV,
167+ const real_t maxV ) noexcept ;
168+
169+ /* *
157170 * @brief Get the value of the state.
158171 * @return The current value of the state.
159172 */
@@ -222,8 +235,6 @@ namespace qlibs {
222235 class integrator : public nState , private nonCopyable {
223236 private:
224237 real_t dt;
225- real_t min{ -REAL_MAX };
226- real_t max{ +REAL_MAX };
227238 public:
228239 virtual ~integrator () {}
229240
@@ -240,15 +251,6 @@ namespace qlibs {
240251 integrator ( const real_t timeStep,
241252 const real_t initialCondition = 0 .0_re );
242253
243- /* *
244- * @brief Sets the saturation limits for the integrator output.
245- * @param[in] minV The minimum value the output can reach.
246- * @param[in] maxV The maximum value the output can reach.
247- * @return @c true if the limits are valid and applied; @c false
248- * otherwise (e.g., minV > maxV).
249- * @note If not set, the output is unbounded.
250- */
251- bool setSaturation ( const real_t minV, const real_t maxV ) noexcept ;
252254
253255 /* *
254256 * @brief Performs one step of numerical integration.
0 commit comments