Skip to content

Commit

Permalink
Shouldn't subtract 1, what was I thinking?
Browse files Browse the repository at this point in the history
  • Loading branch information
yjian012 committed Jan 5, 2024
1 parent 745516b commit 4923b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ql/models/parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4923b79

Please sign in to comment.