Linear

Subtype of Interp Method

The reference quantity r is linearly interpolated in piecewise fashion according to the QuantLib Linear method.
Formally, given any two successive nodes (x₁,r₁) and (x₂,r₂) then the value r corresponding to some x lying between x₁ and x₂ is given by
r = w₁*r₁ + w₂*r₂
where the weights are given by
w₁ = (x₂-x)/(x₂-x₁)
and
w₂ = 1 - w₁