## Linear

Subtype of Interp MethodThe reference quantity

**is linearly interpolated in piecewise fashion according to the QuantLib Linear method.**

*r*Formally, given any two successive nodes

**and**

*(x₁,r₁)***then the value**

*(x₂,r₂)***corresponding to some**

*r***lying between**

*x***and**

*x₁***is given by**

*x₂*

*r = w₁*r₁ + w₂*r₂*where the weights are given by

*w₁ = (x₂-x)/(x₂-x₁)*and

*w₂ = 1 - w₁*