Class LagrangeFormula

java.lang.Object
boofcv.alg.interpolate.array.LagrangeFormula

public class LagrangeFormula extends Object
Langrange's formula is a straight forward way to perform polynomial interpolation. It is not the most computationally efficient approach and does not provide any estimate of its accuracy. The order of the polynomial refers to the number of points used in the interpolation minus one.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    process_F32(float sample, float[] x, float[] y, int i0, int i1)
    UsingLlangrange's formula it interpulates the value of a function at the specified sample point given discrete samples.
    static double
    process_F64(double sample, double[] x, double[] y, int i0, int i1)
    UsingLlangrange's formula it interpulates the value of a function at the specified sample point given discrete samples.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LagrangeFormula

      public LagrangeFormula()
  • Method Details

    • process_F64

      public static double process_F64(double sample, double[] x, double[] y, int i0, int i1)
      UsingLlangrange's formula it interpulates the value of a function at the specified sample point given discrete samples. Which samples are used and the order of the approximation are given by i0 and i1.
      Parameters:
      sample - Where the estimate is done.
      x - Where the function was sampled.
      y - The function's value at the sample points
      i0 - The first point considered.
      i1 - The last point considered.
      Returns:
      The estimated y value at the sample point.
    • process_F32

      public static float process_F32(float sample, float[] x, float[] y, int i0, int i1)
      UsingLlangrange's formula it interpulates the value of a function at the specified sample point given discrete samples. Which samples are used and the order of the approximation are given by i0 and i1. The order is = i1-i0+1.
      Parameters:
      sample - Where the estimate is done.
      x - Where the function was sampled.
      y - The function's value at the sample points
      i0 - The first point considered.
      i1 - The last point considered.
      Returns:
      The estimated y value at the sample point.