Module Gsl.Interp

Interpolation

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

Higher level functions

type interp = {
  1. interp : t;
  2. accel : accel;
  3. xa : float array;
  4. ya : float array;
  5. size : int;
  6. i_type : interp_type;
}
val make_interp : interp_type -> float array -> float array -> interp
val eval : interp -> float -> float
val 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.

val eval_deriv : interp -> float -> float
val eval_deriv2 : interp -> float -> float
val eval_integ : interp -> float -> float -> float