## Linear

Subtype of Interp MethodThe reference quantity

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

*v*Formally, given any two successive nodes

**and**

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

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

*v***lying between**

*x***and**

*x₁***is given by**

*x₂*

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

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

*w₂ = 1 - w₁*