From 4923b7996d55b48ca617da5f698d0437b6133ed6 Mon Sep 17 00:00:00 2001 From: Yi Jiang Date: Thu, 4 Jan 2024 19:15:18 -0500 Subject: [PATCH] Shouldn't subtract 1, what was I thinking? --- ql/models/parameter.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ql/models/parameter.hpp b/ql/models/parameter.hpp index a2ed1dba7dd..2ce1f99007c 100644 --- a/ql/models/parameter.hpp +++ b/ql/models/parameter.hpp @@ -124,7 +124,7 @@ namespace QuantLib { Real value(const Array& params, Time t) const override { Size i = std::upper_bound(times_.begin(), times_.end(), t) - times_.begin(); - return params[i-(i!=0)]; + return params[i]; } private: