Skip to content

Commit ff9d23c

Browse files
added Langrange Polynomial Interpolation Documentation by Timothy Kandiado
1 parent ffe0f5f commit ff9d23c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/math/interpolation.rs

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub fn linear_interpolation(x: f64, point0: (f64, f64), point1: (f64, f64)) -> f
1212
///
1313
/// Source: https://en.wikipedia.org/wiki/Lagrange_polynomial
1414
/// Source: https://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html
15+
/// x is the point we wish to interpolate
16+
/// defined points are a vector of tuples containing known x and y values of our function
1517
pub fn langrange_polynomial_interpolation(x: f64, defined_points: &Vec<(f64, f64)>) -> f64 {
1618
let mut defined_x_values: Vec<f64> = Vec::new();
1719
let mut defined_y_values: Vec<f64> = Vec::new();

0 commit comments

Comments
 (0)