File: gsl_fun.mli

package info (click to toggle)
orpie 1.5.2-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 1,924 kB
  • ctags: 2,720
  • sloc: ml: 13,872; ansic: 3,754; makefile: 310; sh: 11; python: 11
file content (60 lines) | stat: -rw-r--r-- 1,670 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(* ocamlgsl - OCaml interface to GSL                        *)
(* Copyright (©) 2002-2005 - Olivier Andrieu                *)
(* distributed under the terms of the GPL version 2         *)

(** Callbacks and types for error estimates *)

(** {3 Types for special functions} *)

(** These type are used by module {! Gsl_sf} *)

type result = {
    res : float ;
    err : float ; }
(** The result of a computation : [res] is the value and [err] an
    estimate of the absolute  error in the value. *)

type result_e10 = {
    res_e10 : float ;
    err_e10 : float ;
    e10     : int ;
  } 
(** Result of computation with a scaling exponent. Actual result is
    obtained as [res *. 10. ** e10]. *)

type mode = 
  | DOUBLE (** Double precision : 2 * 10^-16 *)
  | SIMPLE (** Single precision : 10^-7 *)
  | APPROX (** Approximate values : 5 * 10^-4 *)
(** Reduce the accuracy of some evaluations to speed up computations. *)

external smash : result_e10 -> result 
    = "ml_gsl_sf_result_smash_e"


(** {3 Callbacks} *)

type gsl_fun = float -> float
type gsl_fun_fdf = {
   f   : float -> float ;
   df  : float -> float ;
   fdf : float -> float * float ;
  } 

type monte_fun = float array -> float

open Gsl_vector

type multi_fun = x:vector -> f:vector -> unit
type multi_fun_fdf = {
    multi_f   : x:vector -> f:vector -> unit ;
    multi_df  : x:vector -> j:Gsl_matrix.matrix -> unit ;
    multi_fdf : x:vector -> f:vector -> j:Gsl_matrix.matrix -> unit ;
  } 

type multim_fun = x:vector -> float
type multim_fun_fdf = {
    multim_f   : x:vector -> float ;
    multim_df  : x:vector -> g:vector -> unit ;
    multim_fdf : x:vector -> g:vector -> float ;
  }