We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffe0f5f commit ff9d23cCopy full SHA for ff9d23c
src/math/interpolation.rs
@@ -12,6 +12,8 @@ pub fn linear_interpolation(x: f64, point0: (f64, f64), point1: (f64, f64)) -> f
12
///
13
/// Source: https://en.wikipedia.org/wiki/Lagrange_polynomial
14
/// 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
17
pub fn langrange_polynomial_interpolation(x: f64, defined_points: &Vec<(f64, f64)>) -> f64 {
18
let mut defined_x_values: Vec<f64> = Vec::new();
19
let mut defined_y_values: Vec<f64> = Vec::new();
0 commit comments