package gsl

  1. Overview
  2. Docs

Module Gsl.InterpSource

Interpolation

Sourcetype t
Sourcetype accel
Sourcetype interp_type =
  1. | LINEAR
  2. | POLYNOMIAL
  3. | CSPLINE
  4. | CSPLINE_PERIODIC
  5. | AKIMA
  6. | AKIMA_PERIODIC
Sourceval make : interp_type -> int -> t
Sourceval init : t -> float array -> float array -> unit
Sourceval name : t -> string
Sourceval min_size : t -> int
Sourceval make_accel : unit -> accel
Sourceval i_eval : t -> float array -> float array -> float -> accel -> float
Sourceval i_eval_deriv : t -> float array -> float array -> float -> accel -> float
Sourceval i_eval_deriv2 : t -> float array -> float array -> float -> accel -> float
Sourceval i_eval_integ : t -> float array -> float array -> float -> float -> accel -> float

Higher level functions

Sourcetype interp = {
  1. interp : t;
  2. accel : accel;
  3. xa : float array;
  4. ya : float array;
  5. size : int;
  6. i_type : interp_type;
}
Sourceval make_interp : interp_type -> float array -> float array -> interp
Sourceval eval : interp -> float -> float
Sourceval eval_array : interp -> float array -> float array -> unit

eval_array interp x_a y_a fills the array y_a with the evaluation of the interpolation function interp for each point of array x_a. x_a and y_a must have the same length.

Sourceval eval_deriv : interp -> float -> float
Sourceval eval_deriv2 : interp -> float -> float
Sourceval eval_integ : interp -> float -> float -> float
OCaml

Innovation. Community. Security.