Class LeastSquaresFit.BSpline

All Implemented Interfaces:
DoubleUnaryOperator, RealValuedDomainOps, RealValuedFunctOps, RealValuedFunctVAOps, VADomainOps
Enclosing class:
LeastSquaresFit

public static class LeastSquaresFit.BSpline extends LeastSquaresFit
Class providing a least squares fit using a BSpline. The spline can be adjusted by changing its degree and the number of control points it uses. One can optionally specify the either end of the spline or both is/are clamped, or that the spline is periodic. The default is an unclamped, non-periodic spline.
  • Constructor Details

    • BSpline

      public BSpline(int degree, int n, double[] x, double[] y)
      Constructor specifying a B-spline's degree, number of control points, and a set of Y values for given X values. The number of X,Y data points must be larger than the number of control points. A default mode (BSpline.Mode.UNCLAMPED) will be used.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      x - values in the domain of the spline
      y - values in the range of the spline
    • BSpline

      public BSpline(int degree, int n, BSpline.Mode mode, double[] x, double[] y)
      Constructor specifying a B-spline's degree, number of control points, mode, and a set of Y values for given X values. The number of X,Y data points must be larger than the number of control points. If the mode argument is null, it must be cast to the type BSpline.Mode to a void a conflict with a constructor that uses three arrays of double.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      mode - the mode for the B-spline (either BSpline.Mode.UNCLAMPED, BSpline.Mode.CLAMPED, BSpline.Mode.CLAMPED_LEFT, BSpline.Mode.CLAMPED_RIGHT, or BSpline.Mode.PERIODIC); null for the default (BSpline.Mode.UNCLAMPED)
      x - values in the domain of the spline
      y - values in the range of the spline
    • BSpline

      public BSpline(int degree, int n, double[] x, double[] y, double sigma)
      Constructor specifying a B-spline's degree, number of control points, and a set of Y values for given X values, with a specified error for the Y values. The number of X,Y data points must be larger than the number of control points. A default mode (BSpline.Mode.UNCLAMPED) will be used.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      x - values in the domain of the spline
      y - values in the range of the spline
      sigma - the standard deviation for the Y values
    • BSpline

      public BSpline(int degree, int n, BSpline.Mode mode, double[] x, double[] y, double sigma)
      Constructor specifying a B-spline's degree, number of control points, mode, and a set of Y values for given X values, with a specified error for the Y values. The number of X,Y data points must be larger than the number of control points.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      mode - the mode for the B-spline (either BSpline.Mode.UNCLAMPED, BSpline.Mode.CLAMPED, BSpline.Mode.CLAMPED_LEFT, BSpline.Mode.CLAMPED_RIGHT, or BSpline.Mode.PERIODIC); null for the default (BSpline.Mode.UNCLAMPED).
      x - values in the domain of the spline
      y - values in the range of the spline
      sigma - the standard deviation for the Y values
    • BSpline

      public BSpline(int degree, int n, double[] x, double[] y, double[] sigma)
      Constructor specifying a B-spline's degree, number of control points, mode, and a set of Y values and their standard deviations for given X values. The number of X,Y data points must be larger than the number of control points. A default mode (BSpline.Mode.UNCLAMPED) will be used.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      x - values in the domain of the spline
      y - values in the range of the spline
      sigma - the standard deviations for the values provided by the argument y
    • BSpline

      public BSpline(int degree, int n, BSpline.Mode mode, double[] x, double[] y, double[] sigma)
      Constructor specifying a B-spline's degree, number of control points, mode, and a set of Y values and their standard deviations for given X values. The number of X,Y data points must be larger than the number of control points.
      Parameters:
      degree - the degree of the B-spline that will be created
      n - the number of control points
      mode - the mode for the B-spline (either BSpline.Mode.UNCLAMPED, BSpline.Mode.CLAMPED, BSpline.Mode.CLAMPED_LEFT, BSpline.Mode.CLAMPED_RIGHT, or BSpline.Mode.PERIODIC); null for the default (BSpline.Mode.UNCLAMPED)
      x - values in the domain of the spline
      y - values in the range of the spline
      sigma - the standard deviations for the values provided by the argument y
  • Method Details