ocamlgsl-0.6.0/wrappers.h0000664000076400007640000000577310607753561014076 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #ifndef _MLGSL_WRAPPERS_ #define _MLGSL_WRAPPERS_ #include #include #include #ifdef ARCH_ALIGN_DOUBLE #error "Architectures with double-word alignment for doubles are not supported" #endif #define IS_CUSTOM(v) (Tag_val(v) == Custom_tag) #define Unoption(v) (Field((v), 0)) #define Opt_arg(v, conv, def) (Is_block(v) ? conv(Field((v),0)) : (def)) #define Val_none Val_int(0) #define Val_negbool(x) Val_not(Val_bool(x)) #define Array_length(v) (Wosize_val(v)) #define Double_array_length(v) (Wosize_val(v) / Double_wosize) #define Double_array_val(v) ((double *)v) #define Unit(v) ((v), Val_unit) static inline value copy_two_double(double a, double b) { CAMLparam0(); CAMLlocal3(r, va, vb); va = copy_double(a); vb = copy_double(b); r = alloc_small(2, 0); Field(r, 0) = va; Field(r, 1) = vb; CAMLreturn(r); } static inline value copy_two_double_arr(double a, double b) { value r; r=alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(r, 0, a); Store_double_field(r, 1, b); return r; } #define Abstract_ptr(v, p) \ ( v=alloc_small(1, Abstract_tag), Field(v, 0)=Val_bp(p) ) #define ML1(name, conv1, convr) \ CAMLprim value ml_##name(value arg1) \ { CAMLparam1(arg1); \ CAMLreturn(convr(name(conv1(arg1)))) ; } #define ML1_alloc(name, conv1, convr) \ CAMLprim value ml_##name(value arg1) \ { CAMLparam1(arg1); CAMLlocal1(res); \ convr(res, name(conv1(arg1))); \ CAMLreturn(res); } #define ML2(name, conv1, conv2, convr) \ CAMLprim value ml_##name(value arg1, value arg2) \ { CAMLparam2(arg1, arg2); \ CAMLreturn(convr(name(conv1(arg1), conv2(arg2)))) ; } #define ML3(name, conv1, conv2, conv3, convr) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3) \ { CAMLparam3(arg1, arg2, arg3); \ CAMLreturn(convr(name(conv1(arg1), conv2(arg2), conv3(arg3)))) ; } #define ML4(name, conv1, conv2, conv3, conv4, convr) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3, value arg4) \ { CAMLparam4(arg1, arg2, arg3, arg4); \ CAMLreturn(convr(name(conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4)))) ; } #define ML5(name, conv1, conv2, conv3, conv4, conv5, convr) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3, value arg4, value arg5) \ { CAMLparam5(arg1, arg2, arg3, arg4, arg5); \ CAMLreturn(convr(name(conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), conv5(arg5)))) ; } #define CONCAT2x(a,b) a ## _ ## b #define CONCAT2(a,b) CONCAT2x(a,b) #define CONCAT3x(a,b,c) a ## _ ## b ## _ ## c #define CONCAT3(a,b,c) CONCAT3x(a,b,c) #if defined (__GNUC__) || defined (DONT_USE_ALLOCA) #define LOCALARRAY(type, x, len) type x [(len)] #else #include #define LOCALARRAY(type, x, len) type * x = ( type *) alloca(sizeof( type ) * (len)) #endif #endif /* _MLGSL_WRAPPERS_ */ ocamlgsl-0.6.0/gsl_misc.ml0000664000076400007640000000071310600031632014156 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) let maybe_or_else o def = match o with | None -> def | Some v -> v let may vo f = match vo with | None -> () | Some v -> f v let may_apply fo v = match fo with | None -> () | Some f -> f v let is = function | None -> false | Some _ -> true ocamlgsl-0.6.0/io.h0000664000076400007640000001053710600031632012611 0ustar olivoliv/***********************************************************************/ /* */ /* Objective Caml */ /* */ /* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ /* */ /* Copyright 1996 Institut National de Recherche en Informatique et */ /* en Automatique. All rights reserved. This file is distributed */ /* under the terms of the GNU Library General Public License, with */ /* the special exception on linking described in file ../LICENSE. */ /* */ /***********************************************************************/ /* Buffered input/output */ #ifndef _io_ #define _io_ #include #include #ifndef IO_BUFFER_SIZE #define IO_BUFFER_SIZE 4096 #endif #ifdef HAS_OFF_T #include typedef off_t file_offset; #else typedef long file_offset; #endif struct channel { int fd; /* Unix file descriptor */ file_offset offset; /* Absolute position of fd in the file */ char * end; /* Physical end of the buffer */ char * curr; /* Current position in the buffer */ char * max; /* Logical end of the buffer (for input) */ void * mutex; /* Placeholder for mutex (for systhreads) */ struct channel * next; /* Linear chaining of channels (flush_all) */ int revealed; /* For Cash only */ int old_revealed; /* For Cash only */ int refcount; /* For flush_all and for Cash */ char buff[IO_BUFFER_SIZE]; /* The buffer itself */ }; /* For an output channel: [offset] is the absolute position of the beginning of the buffer [buff]. For an input channel: [offset] is the absolute position of the logical end of the buffer, [max]. */ /* Functions and macros that can be called from C. Take arguments of type struct channel *. No locking is performed. */ #define putch(channel, ch) do{ \ if ((channel)->curr >= (channel)->end) flush_partial(channel); \ *((channel)->curr)++ = (ch); \ }while(0) #define getch(channel) \ ((channel)->curr >= (channel)->max \ ? refill(channel) \ : (unsigned char) *((channel))->curr++) CAMLextern struct channel * open_descriptor_in (int); CAMLextern struct channel * open_descriptor_out (int); CAMLextern void close_channel (struct channel *); CAMLextern int channel_binary_mode (struct channel *); CAMLextern int flush_partial (struct channel *); CAMLextern void flush (struct channel *); CAMLextern void putword (struct channel *, uint32); CAMLextern int putblock (struct channel *, char *, long); CAMLextern void really_putblock (struct channel *, char *, long); CAMLextern unsigned char refill (struct channel *); CAMLextern uint32 getword (struct channel *); CAMLextern int getblock (struct channel *, char *, long); CAMLextern int really_getblock (struct channel *, char *, long); /* Extract a struct channel * from the heap object representing it */ #define Channel(v) (*((struct channel **) (Data_custom_val(v)))) /* The locking machinery */ CAMLextern void (*channel_mutex_free) (struct channel *); CAMLextern void (*channel_mutex_lock) (struct channel *); CAMLextern void (*channel_mutex_unlock) (struct channel *); CAMLextern void (*channel_mutex_unlock_exn) (void); #define Lock(channel) \ if (channel_mutex_lock != NULL) (*channel_mutex_lock)(channel) #define Unlock(channel) \ if (channel_mutex_unlock != NULL) (*channel_mutex_unlock)(channel) #define Unlock_exn() \ if (channel_mutex_unlock_exn != NULL) (*channel_mutex_unlock_exn)() /* Conversion between file_offset and int64 */ #ifdef ARCH_INT64_TYPE #define Val_file_offset(fofs) copy_int64(fofs) #define File_offset_val(v) ((file_offset) Int64_val(v)) #else CAMLextern value Val_file_offset(file_offset fofs); CAMLextern file_offset File_offset_val(value v); #endif #endif /* _io_ */ ocamlgsl-0.6.0/gsl_error.ml0000664000076400007640000000655710600031632014370 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) external gsl_version : unit -> string = "ml_gsl_version" let version = gsl_version () type errno = | CONTINUE (* iteration has not converged *) | FAILURE | EDOM (* input domain error, e.g sqrt(-1) *) | ERANGE (* output range error, e.g. exp(1e100) *) | EFAULT (* invalid pointer *) | EINVAL (* invalid argument supplied by user *) | EFAILED (* generic failure *) | EFACTOR (* factorization failed *) | ESANITY (* sanity check failed - shouldn't happen *) | ENOMEM (* malloc failed *) | EBADFUNC (* problem with user-supplied function *) | ERUNAWAY (* iterative process is out of control *) | EMAXITER (* exceeded max number of iterations *) | EZERODIV (* tried to divide by zero *) | EBADTOL (* user specified an invalid tolerance *) | ETOL (* failed to reach the specified tolerance *) | EUNDRFLW (* underflow *) | EOVRFLW (* overflow *) | ELOSS (* loss of accuracy *) | EROUND (* failed because of roundoff error *) | EBADLEN (* matrix, vector lengths are not conformant *) | ENOTSQR (* matrix not square *) | ESING (* apparent singularity detected *) | EDIVERGE (* integral or series is divergent *) | EUNSUP (* requested feature is not supported by the hardware *) | EUNIMPL (* requested feature not (yet) implemented *) | ECACHE (* cache limit exceeded *) | ETABLE (* table limit exceeded *) | ENOPROG (* iteration is not making progress towards solution *) | ENOPROGJ (* jacobian evaluations are not improving the solution *) | ETOLF (* cannot reach the specified tolerance in F *) | ETOLX (* cannot reach the specified tolerance in X *) | ETOLG (* cannot reach the specified tolerance in gradient *) | EOF (* end of file *) exception Gsl_exn of (errno * string) external raise_caml_exn : bool -> unit = "ml_gsl_error_init" let _ = Callback.register_exception "mlgsl_exn" (Gsl_exn (CONTINUE, "")) let init () = raise_caml_exn true let uninit () = raise_caml_exn false external strerror : errno -> string = "ml_gsl_strerror" let string_of_errno = function | CONTINUE -> "CONTINUE" | FAILURE -> "FAILURE" | EDOM -> "EDOM" | ERANGE -> "ERANGE" | EFAULT -> "EFAULT" | EINVAL -> "EINVAL" | EFAILED -> "EFAILED" | EFACTOR -> "EFACTOR" | ESANITY -> "ESANITY" | ENOMEM -> "ENOMEM" | EBADFUNC -> "EBADFUNC" | ERUNAWAY -> "ERUNAWAY" | EMAXITER -> "EMAXITER" | EZERODIV -> "EZERODIV" | EBADTOL -> "EBADTOL" | ETOL -> "ETOL" | EUNDRFLW -> "EUNDRFLW" | EOVRFLW -> "EOVRFLW" | ELOSS -> "ELOSS" | EROUND -> "EROUND" | EBADLEN -> "EBADLEN" | ENOTSQR -> "ENOTSQR" | ESING -> "ESING" | EDIVERGE -> "EDIVERGE" | EUNSUP -> "EUNSUP" | EUNIMPL -> "EUNIMPL" | ECACHE -> "ECACHE" | ETABLE -> "ETABLE" | ENOPROG -> "ENOPROG" | ENOPROGJ -> "ENOPROGJ" | ETOLF -> "ETOLF" | ETOLX -> "ETOLX" | ETOLG -> "ETOLG" | EOF -> "EOF" let pprint_exn = function | Gsl_exn (errno, msg) -> Printf.sprintf "GSL error: %s, %s\n %s" (string_of_errno errno) (strerror errno) msg | e -> Printexc.to_string e let handle_exn f x = try f x with exn -> prerr_endline (pprint_exn exn) ; raise exn ocamlgsl-0.6.0/gsl_error.mli0000664000076400007640000000426510600031632014533 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Error reporting *) (** version of GSL library *) val version : string type errno = | CONTINUE (** iteration has not converged *) | FAILURE | EDOM (** input domain error, e.g sqrt(-1) *) | ERANGE (** output range error, e.g. exp(1e100) *) | EFAULT (** invalid pointer *) | EINVAL (** invalid argument supplied by user *) | EFAILED (** generic failure *) | EFACTOR (** factorization failed *) | ESANITY (** sanity check failed - shouldn't happen *) | ENOMEM (** malloc failed *) | EBADFUNC (** problem with user-supplied function *) | ERUNAWAY (** iterative process is out of control *) | EMAXITER (** exceeded max number of iterations *) | EZERODIV (** tried to divide by zero *) | EBADTOL (** user specified an invalid tolerance *) | ETOL (** failed to reach the specified tolerance *) | EUNDRFLW (** underflow *) | EOVRFLW (** overflow *) | ELOSS (** loss of accuracy *) | EROUND (** failed because of roundoff error *) | EBADLEN (** matrix, vector lengths are not conformant *) | ENOTSQR (** matrix not square *) | ESING (** apparent singularity detected *) | EDIVERGE (** integral or series is divergent *) | EUNSUP (** requested feature is not supported by the hardware *) | EUNIMPL (** requested feature not (yet) implemented *) | ECACHE (** cache limit exceeded *) | ETABLE (** table limit exceeded *) | ENOPROG (** iteration is not making progress towards solution *) | ENOPROGJ (** jacobian evaluations are not improving the solution *) | ETOLF (** cannot reach the specified tolerance in F *) | ETOLX (** cannot reach the specified tolerance in X *) | ETOLG (** cannot reach the specified tolerance in gradient *) | EOF (** end of file *) exception Gsl_exn of (errno * string) val init : unit -> unit val uninit : unit -> unit external strerror : errno -> string = "ml_gsl_strerror" val string_of_errno : errno -> string val pprint_exn : exn -> string val handle_exn : ('a -> 'b) -> 'a -> 'b ocamlgsl-0.6.0/mlgsl_error.c0000664000076400007640000000305710600031632014523 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include CAMLprim value ml_gsl_version(value unit) { return copy_string(gsl_version); } CAMLprim value ml_gsl_strerror(value ml_errno) { int c_errno = Int_val(ml_errno); int gsl_errno = (c_errno <= 1) ? (c_errno - 2) : (c_errno - 1) ; return copy_string(gsl_strerror(gsl_errno)); } static inline int conv_err_code(int gsl_errno) { if(gsl_errno < 0) return gsl_errno + 2 ; else return gsl_errno + 1 ; } static value *ml_gsl_exn; static void ml_gsl_raise_exn(const char *msg, int gsl_errno) { CAMLlocal2(exn_msg, exn_arg); exn_msg = copy_string(msg); exn_arg = alloc_small(2, 0); Field(exn_arg, 0) = Val_int(conv_err_code(gsl_errno)); Field(exn_arg, 1) = exn_msg; if(ml_gsl_exn != NULL) raise_with_arg(*ml_gsl_exn, exn_arg); else failwith("GSL error"); } static void ml_gsl_error_handler(const char *reason, const char *file, int line, int gsl_errno) { ml_gsl_raise_exn(reason, gsl_errno); } CAMLprim value ml_gsl_error_init(value init) { static gsl_error_handler_t *old; if(ml_gsl_exn == NULL) ml_gsl_exn = caml_named_value("mlgsl_exn"); if(Bool_val(init)) old = gsl_set_error_handler(&ml_gsl_error_handler); else gsl_set_error_handler(old); return Val_unit; } ocamlgsl-0.6.0/gsl_ieee.ml0000664000076400007640000000324310600031632014133 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type ieee_type = | NAN | INF | NORMAL | DENORMAL | ZERO type float_rep = { sign : int ; mantissa : string ; exponent : int ; ieee_type : ieee_type ; } external rep_of_float : float -> float_rep = "ml_gsl_ieee_double_to_rep" external env_setup : unit -> unit = "ml_gsl_ieee_env_setup" type precision = | SINGLE | DOUBLE | EXTENDED type rounding = | TO_NEAREST | DOWN | UP | TO_ZERO type exceptions = | MASK_INVALID | MASK_DENORMALIZED | MASK_DIVISION_BY_ZERO | MASK_OVERFLOW | MASK_UNDERFLOW | MASK_ALL | TRAP_INEXACT external set_mode : ?precision:precision -> ?rounding:rounding -> exceptions list -> unit = "ml_gsl_ieee_set_mode" let print f = let rep = rep_of_float f in match rep.ieee_type with | NAN -> "NaN" | INF when rep.sign = 0 -> "Inf" | INF -> "-Inf" | ZERO when rep.sign = 0 -> "0" | ZERO -> "-0" | DENORMAL -> (if rep.sign = 0 then "" else "-") ^ "0." ^ rep.mantissa ^ (if rep.exponent = 0 then "" else string_of_int rep.exponent) | NORMAL -> (if rep.sign = 0 then "" else "-") ^ "1." ^ rep.mantissa ^ (if rep.exponent = 0 then "" else ("*2^" ^ (string_of_int rep.exponent))) type excepts = | FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_ALL_EXCEPT external clear_except : excepts list -> unit = "ml_feclearexcept" external test_except : excepts list -> excepts list = "ml_fetestexcept" ocamlgsl-0.6.0/gsl_ieee.mli0000664000076400007640000000241410600031632014303 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** IEEE floating-point arithmetic *) (** {3 Representation of floating point numbers} *) type ieee_type = | NAN | INF | NORMAL | DENORMAL | ZERO type float_rep = { sign : int; mantissa : string; exponent : int; ieee_type : ieee_type; } external rep_of_float : float -> float_rep = "ml_gsl_ieee_double_to_rep" val print : float -> string (** {3 IEEE environment} *) type precision = | SINGLE | DOUBLE | EXTENDED type rounding = | TO_NEAREST | DOWN | UP | TO_ZERO type exceptions = | MASK_INVALID | MASK_DENORMALIZED | MASK_DIVISION_BY_ZERO | MASK_OVERFLOW | MASK_UNDERFLOW | MASK_ALL | TRAP_INEXACT external set_mode : ?precision:precision -> ?rounding:rounding -> exceptions list -> unit = "ml_gsl_ieee_set_mode" external env_setup : unit -> unit = "ml_gsl_ieee_env_setup" (** {3 FPU status word} *) type excepts = | FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_ALL_EXCEPT external clear_except : excepts list -> unit = "ml_feclearexcept" external test_except : excepts list -> excepts list = "ml_fetestexcept" ocamlgsl-0.6.0/mlgsl_ieee.c0000664000076400007640000000565010600031632014302 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" static value rep_val(const gsl_ieee_double_rep *r) { CAMLparam0(); CAMLlocal2(v, m); m=copy_string(r->mantissa); v=alloc_small(4, 0); Field(v, 0)= Val_int(r->sign); Field(v, 1)= m; Field(v, 2)= Val_int(r->exponent); Field(v, 3)= Val_int(r->type - 1); CAMLreturn(v); } CAMLprim value ml_gsl_ieee_double_to_rep(value x) { double d; gsl_ieee_double_rep r; d = Double_val(x); gsl_ieee_double_to_rep(&d, &r); return rep_val(&r); } CAMLprim value ml_gsl_ieee_env_setup(value unit) { gsl_ieee_env_setup(); return Val_unit; } CAMLprim value ml_gsl_ieee_set_mode(value oprecision, value orounding, value ex_list) { static const int precision_conv [] = { GSL_IEEE_SINGLE_PRECISION, GSL_IEEE_DOUBLE_PRECISION, GSL_IEEE_EXTENDED_PRECISION }; static const int round_conv [] = { GSL_IEEE_ROUND_TO_NEAREST, GSL_IEEE_ROUND_DOWN, GSL_IEEE_ROUND_UP, GSL_IEEE_ROUND_TO_ZERO }; static int mask_conv [] = { GSL_IEEE_MASK_INVALID, GSL_IEEE_MASK_DENORMALIZED, GSL_IEEE_MASK_DENORMALIZED, GSL_IEEE_MASK_OVERFLOW, GSL_IEEE_MASK_UNDERFLOW, GSL_IEEE_MASK_ALL, GSL_IEEE_TRAP_INEXACT } ; int mask = convert_flag_list(ex_list, mask_conv); #define Lookup_precision(v) precision_conv[ Int_val(v) ] #define Lookup_round(v) round_conv[ Int_val(v) ] gsl_ieee_set_mode(Opt_arg(oprecision, Lookup_precision, 0), Opt_arg(orounding, Lookup_round, 0), mask); return Val_unit; } #ifdef HAVE_FENV #include static int except_conv [] = { #ifdef FE_INEXACT FE_INEXACT, #else 0, #endif #ifdef FE_DIVBYZERO FE_DIVBYZERO, #else 0, #endif #ifdef FE_UNDERFLOW FE_UNDERFLOW, #else 0, #endif #ifdef FE_OVERFLOW FE_OVERFLOW, #else 0, #endif #ifdef FE_INVALID FE_INVALID, #else 0, #endif #ifdef FE_ALL_EXCEPT FE_ALL_EXCEPT, #else 0, #endif }; static int conv_excepts(value e) { return convert_flag_list(e, except_conv); } static value rev_conv_excepts(int e) { CAMLparam0(); CAMLlocal2(v, c); int i, tab_size = (sizeof except_conv / sizeof (int)) ; v = Val_emptylist; for(i = tab_size-2; i >= 0 ; i--) if(except_conv[i] & e) { c = alloc_small(2, Tag_cons); Field(c, 0) = Val_int(i); Field(c, 1) = v; v = c; } CAMLreturn(v); } CAMLprim value ml_feclearexcept(value e) { feclearexcept(conv_excepts(e)); return Val_unit; } CAMLprim value ml_fetestexcept(value e) { return rev_conv_excepts(fetestexcept(conv_excepts(e))); } #else /* HAVE_FENV */ CAMLprim value ml_feclearexcept(value e) { return Val_unit; } CAMLprim value ml_fetestexcept(value e) { return Val_emptylist; } #endif /* HAVE_FENV */ ocamlgsl-0.6.0/gsl_math.ml0000664000076400007640000000402210600031632014151 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) let e = 2.71828182845904523536028747135 (* e *) let log2e = 1.44269504088896340735992468100 (* log_2 (e) *) let log10e = 0.43429448190325182765112891892 (* log_10 (e) *) let sqrt2 = 1.41421356237309504880168872421 (* sqrt(2) *) let sqrt1_2 = 0.70710678118654752440084436210 (* sqrt(1/2) *) let sqrt3 = 1.73205080756887729352744634151 (* sqrt(3) *) let pi = 3.14159265358979323846264338328 (* pi *) let pi_2 = 1.57079632679489661923132169164 (* pi/2 *) let pi_4 = 0.78539816339744830966156608458 (* pi/4 *) let sqrtpi = 1.77245385090551602729816748334 (* sqrt(pi) *) let i_2_sqrtpi = 1.12837916709551257389615890312 (* 2/sqrt(pi) *) let i_1_pi = 0.31830988618379067153776752675 (* 1/pi *) let i_2_pi = 0.63661977236758134307553505349 (* 2/pi *) let ln10 = 2.30258509299404568401799145468 (* ln(10) *) let ln2 = 0.69314718055994530941723212146 (* ln(2) *) let lnpi = 1.14472988584940017414342735135 (* ln(pi) *) let euler = 0.57721566490153286060651209008 (* Euler constant *) let rec unsafe_pow_int x = function | 1 -> x | n when n mod 2 = 0 -> unsafe_pow_int (x *. x) (n/2) | n -> x *. (unsafe_pow_int x (pred n)) let pow_int x = function | 0 -> 1. | n when n > 0 -> unsafe_pow_int x n | _ -> invalid_arg "pow_int" external log1p : float -> float = "ml_gsl_log1p" "gsl_log1p" "float" external expm1 : float -> float = "ml_gsl_expm1" "gsl_expm1" "float" external hypot : float -> float -> float = "ml_gsl_hypot" "gsl_hypot" "float" external acosh : float -> float = "ml_gsl_acosh" "gsl_acosh" "float" external asinh : float -> float = "ml_gsl_asinh" "gsl_asinh" "float" external atanh : float -> float = "ml_gsl_atanh" "gsl_atanh" "float" external fcmp : float -> float -> epsilon:float -> int = "ml_gsl_fcmp" ocamlgsl-0.6.0/gsl_math.mli0000664000076400007640000000314110600031632014323 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Mathematical constants and some simple functions *) (** {3 Constants} *) val e : float (** e *) val log2e : float (** log_2 (e) *) val log10e : float (** log_10 (e) *) val sqrt2 : float (** sqrt(2) *) val sqrt1_2 : float (** sqrt(1/2) *) val sqrt3 : float (** sqrt(3) *) val pi : float (** pi *) val pi_2 : float (** pi/2 *) val pi_4 : float (** pi/4 *) val sqrtpi : float (** sqrt(pi) *) val i_2_sqrtpi : float (** 2/sqrt(pi) *) val i_1_pi : float (** 1/pi *) val i_2_pi : float (** 2/pi *) val ln10 : float (** ln(10) *) val ln2 : float (** ln(2) *) val lnpi : float (** ln(pi) *) val euler : float (** Euler constant *) (** {3 Simple Functions} *) val pow_int : float -> int -> float external log1p : float -> float = "ml_gsl_log1p" "gsl_log1p" "float" external expm1 : float -> float = "ml_gsl_expm1" "gsl_expm1" "float" external hypot : float -> float -> float = "ml_gsl_hypot" "gsl_hypot" "float" external acosh : float -> float = "ml_gsl_acosh" "gsl_acosh" "float" external asinh : float -> float = "ml_gsl_asinh" "gsl_asinh" "float" external atanh : float -> float = "ml_gsl_atanh" "gsl_atanh" "float" external fcmp : float -> float -> epsilon:float -> int = "ml_gsl_fcmp" ocamlgsl-0.6.0/mlgsl_math.c0000664000076400007640000000110210600031632014310 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include "wrappers.h" ML1(gsl_log1p, Double_val, copy_double) ML1(gsl_expm1, Double_val, copy_double) ML2(gsl_hypot, Double_val, Double_val, copy_double) ML1(gsl_acosh, Double_val, copy_double) ML1(gsl_asinh, Double_val, copy_double) ML1(gsl_atanh, Double_val, copy_double) ML3(gsl_fcmp, Double_val, Double_val, Double_val, Val_int) ocamlgsl-0.6.0/gsl_complex.ml0000664000076400007640000001115710600031632014676 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005, 2003 - Olivier Andrieu, Paul Pelzl *) (* distributed under the terms of the GPL version 2 *) type complex = Complex.t = { re : float ; im : float } let complex ~re ~im = { re = re ; im = im } type complex_array = float array let set a i c = a.(2*i) <- c.re ; a.(2*i + 1) <- c.im let get a i = { re = a.(2*i); im = a.(2*i+1) } let unpack ca = let len = Array.length ca in if len mod 2 <> 0 then invalid_arg "unpack_complex_array" ; Array.init (len / 2) (get ca) let pack a = let len = Array.length a in let ca = Array.make (2 * len) 0. in for i=0 to pred len do ca.(2*i) <- a.(i).re ; ca.(2*i+1) <- a.(i).im done ; ca let mult a b = if Array.length a mod 2 <> 0 then invalid_arg "mult: not a complex array" ; let len = (Array.length a) / 2 in for i = 0 to pred len do let re = a.(2*i) *. b.(2*i) -. a.(2*i+1) *. b.(2*i+1) in let im = a.(2*i) *. b.(2*i+1) +. a.(2*i+1) *. b.(2*i) in a.(2*i) <- re ; a.(2*i+1) <- im done (* added by Paul Pelzl, 2003/12/25 *) let rect x y = {re = x; im = y} let polar = Complex.polar let arg = Complex.arg let abs = Complex.norm let abs2 = Complex.norm2 external logabs : complex -> float = "ml_gsl_complex_logabs" let add = Complex.add let sub = Complex.sub let mul = Complex.mul let div = Complex.div let add_real a x = {re = a.re +. x; im = a.im} let sub_real a x = {re = a.re -. x; im = a.im} let mul_real a x = {re = a.re *. x; im = a.im *. x} let div_real a x = {re = a.re /. x; im = a.im /. x} let add_imag a y = {re = a.re; im = a.im +. y} let sub_imag a y = {re = a.re; im = a.im -. y} let mul_imag a y = {re = a.im *. (~-. y); im = a.re *. y} let div_imag a y = {re = a.im /. y; im = a.re /. (~-. y)} let conjugate = Complex.conj let inverse = Complex.inv let negative = Complex.neg (* elementary complex functions *) external sqrt : complex -> complex = "ml_gsl_complex_sqrt" external sqrt_real : float -> complex = "ml_gsl_complex_sqrt_real" external pow : complex -> complex -> complex = "ml_gsl_complex_pow" external pow_real : complex -> float -> complex = "ml_gsl_complex_pow_real" external exp : complex -> complex = "ml_gsl_complex_exp" external log : complex -> complex = "ml_gsl_complex_log" external log10 : complex -> complex = "ml_gsl_complex_log10" external log_b : complex -> complex -> complex = "ml_gsl_complex_log_b" (* complex trigonometric functions *) external sin : complex -> complex = "ml_gsl_complex_sin" external cos : complex -> complex = "ml_gsl_complex_cos" external tan : complex -> complex = "ml_gsl_complex_tan" external sec : complex -> complex = "ml_gsl_complex_sec" external csc : complex -> complex = "ml_gsl_complex_csc" external cot : complex -> complex = "ml_gsl_complex_cot" (* inverse complex trigonometric functions *) external arcsin : complex -> complex = "ml_gsl_complex_arcsin" external arcsin_real : float -> complex = "ml_gsl_complex_arcsin_real" external arccos : complex -> complex = "ml_gsl_complex_arccos" external arccos_real : float -> complex = "ml_gsl_complex_arccos_real" external arctan : complex -> complex = "ml_gsl_complex_arctan" external arcsec : complex -> complex = "ml_gsl_complex_arcsec" external arcsec_real : float -> complex = "ml_gsl_complex_arcsec_real" external arccsc : complex -> complex = "ml_gsl_complex_arccsc" external arccsc_real : float -> complex = "ml_gsl_complex_arccsc_real" external arccot : complex -> complex = "ml_gsl_complex_arccot" (* complex hyperbolic functions *) external sinh : complex -> complex = "ml_gsl_complex_sinh" external cosh : complex -> complex = "ml_gsl_complex_cosh" external tanh : complex -> complex = "ml_gsl_complex_tanh" external sech : complex -> complex = "ml_gsl_complex_sech" external csch : complex -> complex = "ml_gsl_complex_csch" external coth : complex -> complex = "ml_gsl_complex_coth" (* inverse complex hyperbolic functions *) external arcsinh : complex -> complex = "ml_gsl_complex_arcsinh" external arccosh : complex -> complex = "ml_gsl_complex_arccosh" external arccosh_real : float -> complex = "ml_gsl_complex_arccosh_real" external arctanh : complex -> complex = "ml_gsl_complex_arctanh" external arctanh_real : float -> complex = "ml_gsl_complex_arctanh_real" external arcsech : complex -> complex = "ml_gsl_complex_arcsech" external arccsch : complex -> complex = "ml_gsl_complex_arccsch" external arccoth : complex -> complex = "ml_gsl_complex_arccoth" ocamlgsl-0.6.0/gsl_complex.mli0000664000076400007640000001047410600031632015050 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005, 2003 - Olivier Andrieu, Paul Pelzl *) (* distributed under the terms of the GPL version 2 *) (** Complex arithmetic and simple functions *) type complex = Complex.t = { re : float ; im : float } val complex : re:float -> im:float -> complex type complex_array = float array val set : complex_array -> int -> complex -> unit val get : complex_array -> int -> complex val unpack : complex_array -> complex array val pack : complex array -> complex_array val mult : complex_array -> complex_array -> unit (* added by Paul Pelzl 2003/12/25 *) val rect : float -> float -> complex val polar : float -> float -> complex (** {4 Properties of complex numbers} *) val arg : complex -> float val abs : complex -> float val abs2 : complex -> float external logabs : complex -> float = "ml_gsl_complex_logabs" (** {4 Complex arithmetic operators} *) val add : complex -> complex -> complex val sub : complex -> complex -> complex val mul : complex -> complex -> complex val div : complex -> complex -> complex val add_real : complex -> float -> complex val sub_real : complex -> float -> complex val mul_real : complex -> float -> complex val div_real : complex -> float -> complex val add_imag : complex -> float -> complex val sub_imag : complex -> float -> complex val mul_imag : complex -> float -> complex val div_imag : complex -> float -> complex val conjugate : complex -> complex val inverse : complex -> complex val negative : complex -> complex (** {4 Elementary complex functions} *) external sqrt : complex -> complex = "ml_gsl_complex_sqrt" external sqrt_real : float -> complex = "ml_gsl_complex_sqrt_real" external pow : complex -> complex -> complex = "ml_gsl_complex_pow" external pow_real : complex -> float -> complex = "ml_gsl_complex_pow_real" external exp : complex -> complex = "ml_gsl_complex_exp" external log : complex -> complex = "ml_gsl_complex_log" external log10 : complex -> complex = "ml_gsl_complex_log10" external log_b : complex -> complex -> complex = "ml_gsl_complex_log_b" (** {4 Complex trigonometric functions} *) external sin : complex -> complex = "ml_gsl_complex_sin" external cos : complex -> complex = "ml_gsl_complex_cos" external tan : complex -> complex = "ml_gsl_complex_tan" external sec : complex -> complex = "ml_gsl_complex_sec" external csc : complex -> complex = "ml_gsl_complex_csc" external cot : complex -> complex = "ml_gsl_complex_cot" (** {4 Inverse complex trigonometric functions} *) external arcsin : complex -> complex = "ml_gsl_complex_arcsin" external arcsin_real : float -> complex = "ml_gsl_complex_arcsin_real" external arccos : complex -> complex = "ml_gsl_complex_arccos" external arccos_real : float -> complex = "ml_gsl_complex_arccos_real" external arctan : complex -> complex = "ml_gsl_complex_arctan" external arcsec : complex -> complex = "ml_gsl_complex_arcsec" external arcsec_real : float -> complex = "ml_gsl_complex_arcsec_real" external arccsc : complex -> complex = "ml_gsl_complex_arccsc" external arccsc_real : float -> complex = "ml_gsl_complex_arccsc_real" external arccot : complex -> complex = "ml_gsl_complex_arccot" (** {4 Complex hyperbolic functions} *) external sinh : complex -> complex = "ml_gsl_complex_sinh" external cosh : complex -> complex = "ml_gsl_complex_cosh" external tanh : complex -> complex = "ml_gsl_complex_tanh" external sech : complex -> complex = "ml_gsl_complex_sech" external csch : complex -> complex = "ml_gsl_complex_csch" external coth : complex -> complex = "ml_gsl_complex_coth" (** {4 Inverse complex hyperbolic functions} *) external arcsinh : complex -> complex = "ml_gsl_complex_arcsinh" external arccosh : complex -> complex = "ml_gsl_complex_arccosh" external arccosh_real : float -> complex = "ml_gsl_complex_arccosh_real" external arctanh : complex -> complex = "ml_gsl_complex_arctanh" external arctanh_real : float -> complex = "ml_gsl_complex_arctanh_real" external arcsech : complex -> complex = "ml_gsl_complex_arcsech" external arccsch : complex -> complex = "ml_gsl_complex_arccsch" external arccoth : complex -> complex = "ml_gsl_complex_arccoth" ocamlgsl-0.6.0/mlgsl_complex.c0000664000076400007640000000443410600031632015041 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2003 - Paul Pelzl */ /* distributed under the terms of the GPL version 2 */ #include #include #include "mlgsl_complex.h" #define _COMPLEX_HANDLER(funct) \ CAMLprim value ml_gsl_complex_##funct(value Z) { \ _DECLARE_COMPLEX2(Z,temp); \ _CONVERT_COMPLEX(Z); \ z_temp = gsl_complex_##funct(z_Z); \ return copy_complex(&z_temp); \ } #define _COMPLEX_HANDLER2(funct) \ CAMLprim value ml_gsl_complex_##funct(value Z, value A) { \ _DECLARE_COMPLEX3(Z, A, temp); \ _CONVERT_COMPLEX2(Z, A); \ z_temp = gsl_complex_##funct(z_Z, z_A); \ return copy_complex(&z_temp); \ } #define _COMPLEX_HANDLER_DOUBLE(funct) \ CAMLprim value ml_gsl_complex_##funct(value X) { \ gsl_complex temp; \ temp = gsl_complex_##funct(Double_val(X)); \ return copy_complex(&temp); \ } /* properties of complex numbers */ CAMLprim value ml_gsl_complex_logabs(value Z) { _DECLARE_COMPLEX(Z); _CONVERT_COMPLEX(Z); return copy_double(gsl_complex_logabs(z_Z)); } _COMPLEX_HANDLER(sqrt) _COMPLEX_HANDLER_DOUBLE(sqrt_real) _COMPLEX_HANDLER2(pow) CAMLprim value ml_gsl_complex_pow_real(value Z, value X) { _DECLARE_COMPLEX2(Z, temp); _CONVERT_COMPLEX(Z); z_temp = gsl_complex_pow_real(z_Z, Double_val(X)); return copy_complex(&z_temp); } _COMPLEX_HANDLER(exp) _COMPLEX_HANDLER(log) _COMPLEX_HANDLER(log10) _COMPLEX_HANDLER2(log_b) _COMPLEX_HANDLER(sin) _COMPLEX_HANDLER(cos) _COMPLEX_HANDLER(tan) _COMPLEX_HANDLER(sec) _COMPLEX_HANDLER(csc) _COMPLEX_HANDLER(cot) _COMPLEX_HANDLER(arcsin) _COMPLEX_HANDLER_DOUBLE(arcsin_real) _COMPLEX_HANDLER(arccos) _COMPLEX_HANDLER_DOUBLE(arccos_real) _COMPLEX_HANDLER(arctan) _COMPLEX_HANDLER(arcsec) _COMPLEX_HANDLER_DOUBLE(arcsec_real) _COMPLEX_HANDLER(arccsc) _COMPLEX_HANDLER_DOUBLE(arccsc_real) _COMPLEX_HANDLER(arccot) _COMPLEX_HANDLER(sinh) _COMPLEX_HANDLER(cosh) _COMPLEX_HANDLER(tanh) _COMPLEX_HANDLER(sech) _COMPLEX_HANDLER(csch) _COMPLEX_HANDLER(coth) _COMPLEX_HANDLER(arcsinh) _COMPLEX_HANDLER(arccosh) _COMPLEX_HANDLER_DOUBLE(arccosh_real) _COMPLEX_HANDLER(arctanh) _COMPLEX_HANDLER_DOUBLE(arctanh_real) _COMPLEX_HANDLER(arcsech) _COMPLEX_HANDLER(arccsch) _COMPLEX_HANDLER(arccoth) ocamlgsl-0.6.0/mlgsl_complex.h0000664000076400007640000000166210600031632015046 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "wrappers.h" static inline value #ifndef FLOAT_COMPLEX copy_complex(gsl_complex * c) #else copy_complex(gsl_complex_float * c) #endif /* FLOAT_COMPLEX */ { return copy_two_double_arr(GSL_COMPLEX_P_REAL(c), GSL_COMPLEX_P_IMAG(c)); } #ifndef FLOAT_COMPLEX #define _DECLARE_COMPLEX(v) gsl_complex z_##v #else #define _DECLARE_COMPLEX(v) gsl_complex_float z_##v #endif /* FLOAT_COMPLEX */ #define _DECLARE_COMPLEX2(v1,v2) _DECLARE_COMPLEX(v1); _DECLARE_COMPLEX(v2) #define _DECLARE_COMPLEX3(v1,v2,v3) _DECLARE_COMPLEX2(v1,v2); _DECLARE_COMPLEX(v3) #define _CONVERT_COMPLEX(v) GSL_SET_COMPLEX(&z_##v,Double_field(v, 0), Double_field(v,1)) #define _CONVERT_COMPLEX2(v1,v2) _CONVERT_COMPLEX(v1); _CONVERT_COMPLEX(v2) ocamlgsl-0.6.0/gsl_vector.ml0000664000076400007640000001013210600031632014521 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Bigarray type double_vector_bigarr = (float, float64_elt, c_layout) Bigarray.Array1.t type vector = double_vector_bigarr let create ?init len = let barr = Array1.create float64 c_layout len in begin match init with | None -> () | Some x -> Array1.fill barr x end ; barr let length = Array1.dim let of_array arr = Array1.of_array float64 c_layout arr let to_array v = Array.init (Array1.dim v) (Array1.get v) let get (v : vector) i = Array1.get v i let set (v : vector) i x = Array1.set v i x let set_all = Array1.fill let set_zero v = set_all v 0. let set_basis v i = set_zero v ; set v i 1. let subvector v ~off ~len = Array1.sub v off len let memcpy ~src:v ~dst:w = if length v <> length w then invalid_arg "Gsl_vector.memcpy" ; Array1.blit v w let copy v = let w = create (length v) in memcpy v w ; w let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = let len = length v in for i=0 to pred (len/2) do swap_element v i (pred len - i) done external add : vector -> vector -> unit = "ml_gsl_vector_add" external sub : vector -> vector -> unit = "ml_gsl_vector_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_mul" external div : vector -> vector -> unit = "ml_gsl_vector_div" external scale : vector -> float -> unit = "ml_gsl_vector_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_add_constant" external is_null : vector -> bool = "ml_gsl_vector_isnull" external max : vector -> float = "ml_gsl_vector_max" external min : vector -> float = "ml_gsl_vector_min" external minmax : vector -> float * float = "ml_gsl_vector_minmax" external max_index : vector -> int = "ml_gsl_vector_maxindex" external min_index : vector -> int = "ml_gsl_vector_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_minmaxindex" module Single = struct type float_vector_bigarr = (float, float32_elt, c_layout) Bigarray.Array1.t type vector = float_vector_bigarr let create ?init len = let barr = Array1.create float32 c_layout len in begin match init with | None -> () | Some x -> Array1.fill barr x end ; barr let length = length let of_array arr = Array1.of_array float32 c_layout arr let to_array = to_array let get (v : vector) i = Array1.get v i let set (v : vector) i x = Array1.set v i x let set_all = set_all let set_zero = set_zero let set_basis v i = set_zero v ; set v i 1. let subvector = subvector let memcpy = memcpy let copy v = let w = create (length v) in memcpy v w ; w let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = let len = length v in for i=0 to pred (len/2) do swap_element v i (pred len - i) done external add : vector -> vector -> unit = "ml_gsl_vector_float_add" external sub : vector -> vector -> unit = "ml_gsl_vector_float_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_float_mul" external div : vector -> vector -> unit = "ml_gsl_vector_float_div" external scale : vector -> float -> unit = "ml_gsl_vector_float_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_float_add_constant" external is_null : vector -> bool = "ml_gsl_vector_float_isnull" external max : vector -> float = "ml_gsl_vector_float_max" external min : vector -> float = "ml_gsl_vector_float_min" external minmax : vector -> float * float = "ml_gsl_vector_float_minmax" external max_index : vector -> int = "ml_gsl_vector_float_maxindex" external min_index : vector -> int = "ml_gsl_vector_float_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_float_minmaxindex" end ocamlgsl-0.6.0/gsl_vector.mli0000664000076400007640000000716710600031632014710 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Vector of floats implemented with [Bigarray] *) (** {3 Double precision} *) type double_vector_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t type vector = double_vector_bigarr (** {4 Operations} *) val create : ?init:float -> int -> vector val of_array : float array -> vector val to_array : vector -> float array val length : vector -> int val get : vector -> int -> float val set : vector -> int -> float -> unit val set_all : vector -> float -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit external add : vector -> vector -> unit = "ml_gsl_vector_add" external sub : vector -> vector -> unit = "ml_gsl_vector_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_mul" external div : vector -> vector -> unit = "ml_gsl_vector_div" external scale : vector -> float -> unit = "ml_gsl_vector_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_add_constant" external is_null : vector -> bool = "ml_gsl_vector_isnull" external max : vector -> float = "ml_gsl_vector_max" external min : vector -> float = "ml_gsl_vector_min" external minmax : vector -> float * float = "ml_gsl_vector_minmax" external max_index : vector -> int = "ml_gsl_vector_maxindex" external min_index : vector -> int = "ml_gsl_vector_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_minmaxindex" (** {4 No-copy operations} *) val subvector : vector -> off:int -> len:int -> vector (** {3 Single precision} *) module Single : sig type float_vector_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t type vector = float_vector_bigarr val create : ?init:float -> int -> vector val of_array : float array -> vector val to_array : vector -> float array val length : vector -> int val get : vector -> int -> float val set : vector -> int -> float -> unit val set_all : vector -> float -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit external add : vector -> vector -> unit = "ml_gsl_vector_float_add" external sub : vector -> vector -> unit = "ml_gsl_vector_float_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_float_mul" external div : vector -> vector -> unit = "ml_gsl_vector_float_div" external scale : vector -> float -> unit = "ml_gsl_vector_float_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_float_add_constant" external is_null : vector -> bool = "ml_gsl_vector_float_isnull" external max : vector -> float = "ml_gsl_vector_float_max" external min : vector -> float = "ml_gsl_vector_float_min" external minmax : vector -> float * float = "ml_gsl_vector_float_minmax" external max_index : vector -> int = "ml_gsl_vector_float_maxindex" external min_index : vector -> int = "ml_gsl_vector_float_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_float_minmaxindex" (** {4 No-copy operations} *) val subvector : vector -> off:int -> len:int -> vector end ocamlgsl-0.6.0/gsl_vector_flat.ml0000664000076400007640000000522410600031632015535 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type double_vector_flat = { data : float array ; off : int ; len : int ; stride : int ; } type vector = double_vector_flat let check v = let size = Array.length v.data in if v.off < 0 || v.len < 0 || v.stride < 1 || v.off + (v.len - 1) * v.stride >= size then failwith "Gsl_vector_flat.check" ; v let create ?(init=0.) len = { data = Array.create len init; off = 0; len = len; stride = 1; } let of_array arr = { data = Array.copy arr; off = 0; len = Array.length arr; stride = 1; } let length { len = len } = len let get v i = v.data.(v.off + i*v.stride) let set v i d = v.data.(v.off + i*v.stride) <- d let set_all v d = for i=0 to pred v.len do set v i d done let set_zero v = set_all v 0. let set_basis v i = set_zero v ; set v i 1. let to_array v = Array.init v.len (get v) let subvector ?(stride=1) v ~off ~len = check { v with off = off * v.stride + v.off ; len = len ; stride = stride * v.stride ; } let view_array ?(stride=1) ?(off=0) ?len arr = let len = match len with | None -> Array.length arr | Some l -> l in check { data = arr ; off = off ; stride = stride ; len = len } let memcpy ~src:v ~dst:w = if v.len <> w.len then invalid_arg "Gsl_vector.memcpy" ; for i=0 to pred v.len do set w i (get v i) done let copy v = { v with data = Array.copy v.data } let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = for i=0 to pred (v.len/2) do swap_element v i (pred v.len - i) done external add : vector -> vector -> unit = "ml_gsl_vector_add" external sub : vector -> vector -> unit = "ml_gsl_vector_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_mul" external div : vector -> vector -> unit = "ml_gsl_vector_div" external scale : vector -> float -> unit = "ml_gsl_vector_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_add_constant" external is_null : vector -> bool = "ml_gsl_vector_isnull" external max : vector -> float = "ml_gsl_vector_max" external min : vector -> float = "ml_gsl_vector_min" external minmax : vector -> float * float = "ml_gsl_vector_minmax" external max_index : vector -> int = "ml_gsl_vector_maxindex" external min_index : vector -> int = "ml_gsl_vector_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_minmaxindex" ocamlgsl-0.6.0/gsl_vector_flat.mli0000664000076400007640000000406110600031632015704 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Vector of floats implemented with a [float array] *) type double_vector_flat = private { data : float array; off : int; len : int; stride : int; } type vector = double_vector_flat val check : vector -> vector (** @raise Failure if [off], [len] or [stride] designate an invalid subvector of [data] *) (** {3 Operations} *) val create : ?init:float -> int -> vector val of_array : float array -> vector val to_array : vector -> float array val length : vector -> int val get : vector -> int -> float val set : vector -> int -> float -> unit val set_all : vector -> float -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit external add : vector -> vector -> unit = "ml_gsl_vector_add" external sub : vector -> vector -> unit = "ml_gsl_vector_sub" external mul : vector -> vector -> unit = "ml_gsl_vector_mul" external div : vector -> vector -> unit = "ml_gsl_vector_div" external scale : vector -> float -> unit = "ml_gsl_vector_scale" external add_constant : vector -> float -> unit = "ml_gsl_vector_add_constant" external is_null : vector -> bool = "ml_gsl_vector_isnull" external max : vector -> float = "ml_gsl_vector_max" external min : vector -> float = "ml_gsl_vector_min" external minmax : vector -> float * float = "ml_gsl_vector_minmax" external max_index : vector -> int = "ml_gsl_vector_maxindex" external min_index : vector -> int = "ml_gsl_vector_minindex" external minmax_index : vector -> int * int = "ml_gsl_vector_minmaxindex" (** {3 No-copy operations} *) val subvector : ?stride:int -> vector -> off:int -> len:int -> vector val view_array : ?stride:int -> ?off:int -> ?len:int -> float array -> vector ocamlgsl-0.6.0/gsl_vector_complex.ml0000664000076400007640000000600210600031632016251 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Bigarray type complex_double_vector_bigarr = (Complex.t, complex64_elt, c_layout) Bigarray.Array1.t type vector = complex_double_vector_bigarr let create ?init len = let barr = Array1.create complex64 c_layout len in begin match init with | None -> () | Some x -> Array1.fill barr x end ; barr let length = Array1.dim let of_array arr = Array1.of_array complex64 c_layout arr let to_array v = Array.init (Array1.dim v) (Array1.get v) let of_complex_array arr = let n = (Array.length arr) / 2 in let barr = create n in for i=0 to pred n do barr.{i} <- Gsl_complex.get arr i done ; barr let to_complex_array barr = let n = Array1.dim barr in let arr = Array.create (2*n) 0. in for i=0 to pred n do Gsl_complex.set arr i barr.{i} done ; arr let get (v : vector) i = Array1.get v i let set (v : vector) i x = Array1.set v i x let set_all = Array1.fill let set_zero v = set_all v Complex.zero let set_basis v i = set_zero v ; set v i Complex.one let subvector v ~off ~len = Array1.sub v off len let memcpy ~src:v ~dst:w = if length v <> length w then invalid_arg "Gsl_vector.memcpy" ; Array1.blit v w let copy v = let w = create (length v) in memcpy v w ; w let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = let len = length v in for i=0 to pred (len/2) do swap_element v i (pred len - i) done module Single = struct type complex_float_vector_bigarr = (Complex.t, complex32_elt, c_layout) Bigarray.Array1.t type vector = complex_float_vector_bigarr let create ?init len = let barr = Array1.create complex32 c_layout len in begin match init with | None -> () | Some x -> Array1.fill barr x end ; barr let length = length let of_array arr = Array1.of_array complex32 c_layout arr let to_array = to_array let of_complex_array arr = let n = (Array.length arr) / 2 in let barr = create n in for i=0 to pred n do barr.{i} <- Gsl_complex.get arr i done ; barr let to_complex_array barr = let n = Array1.dim barr in let arr = Array.create (2*n) 0. in for i=0 to pred n do Gsl_complex.set arr i barr.{i} done ; arr let get (v : vector) i = Array1.get v i let set (v : vector) i x = Array1.set v i x let set_all = set_all let set_zero = set_zero let set_basis v i = set_zero v ; set v i Complex.one let subvector = subvector let memcpy = memcpy let copy v = let w = create (length v) in memcpy v w ; w let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = let len = length v in for i=0 to pred (len/2) do swap_element v i (pred len - i) done end ocamlgsl-0.6.0/gsl_vector_complex.mli0000664000076400007640000000363610600031632016434 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Vector of complex numbers implemented with a [Bigarray] *) open Bigarray open Gsl_complex type complex_double_vector_bigarr = (Complex.t, complex64_elt, c_layout) Array1.t type vector = complex_double_vector_bigarr val create : ?init:complex -> int -> vector val of_array : complex array -> vector val to_array : vector -> complex array val of_complex_array : complex_array -> vector val to_complex_array : vector -> complex_array val length : vector -> int val get : vector -> int -> complex val set : vector -> int -> complex -> unit val set_all : vector -> complex -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit val subvector : vector -> off:int -> len:int -> vector module Single : sig type complex_float_vector_bigarr = (Complex.t, complex32_elt, c_layout) Array1.t type vector = complex_float_vector_bigarr val create : ?init:complex -> int -> vector val of_array : complex array -> vector val to_array : vector -> complex array val of_complex_array : complex_array -> vector val to_complex_array : vector -> complex_array val length : vector -> int val get : vector -> int -> complex val set : vector -> int -> complex -> unit val set_all : vector -> complex -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit val subvector : vector -> off:int -> len:int -> vector end ocamlgsl-0.6.0/gsl_vector_complex_flat.ml0000664000076400007640000000465110600031632017267 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type complex_vector_flat = { data : float array ; off : int ; len : int ; stride : int ; } type vector = complex_vector_flat let create ?(init=Complex.zero) len = let arr = { data = Array.create (2*len) init.Complex.re ; off = 0; len = len; stride = 1; } in if init.Complex.im <> init.Complex.re then for i=0 to pred len do arr.data.(2*i+1) <- init.Complex.im done ; arr let of_array arr = let carr = Gsl_complex.pack arr in { data = carr; off = 0; len = Array.length arr; stride = 1; } let length { len = len } = len let get v i = Gsl_complex.get v.data (v.off + i*v.stride) let set v i d = Gsl_complex.set v.data (v.off + i*v.stride) d let set_all v d = for i=0 to pred v.len do set v i d done let set_zero v = set_all v Complex.zero let set_basis v i = set_zero v ; set v i Complex.one let to_array v = Array.init v.len (get v) let of_complex_array carr = { data = Array.copy carr; off = 0; len = (Array.length carr)/2; stride = 1; } let to_complex_array arr = let carr = Array.create (2*arr.len) 0. in for i=0 to pred arr.len do Gsl_complex.set carr i (get arr i) done ; carr let real carr = Gsl_vector_flat.view_array ~stride:(2 * carr.stride) ~off:(2 * carr.off) ~len:carr.len carr.data let imag carr = Gsl_vector_flat.view_array ~stride:(2 * carr.stride) ~off:(2 * carr.off + 1) ~len:carr.len carr.data let subvector ?(stride=1) v ~off ~len = { v with off = off * v.stride + v.off ; len = len ; stride = stride * v.stride ; } let view_complex_array ?(stride=1) ?(off=0) ?len arr = let alen = Array.length arr in if alen mod 2 <> 0 then invalid_arg "complex_array dim" ; let len = match len with | None -> alen / 2 | Some l -> l in { data = arr ; off = off ; stride = stride ; len = len } let memcpy v w = if v.len <> w.len then invalid_arg "Gsl_vector.memcpy" ; for i=0 to pred v.len do set w i (get v i) done let copy v = { v with data = Array.copy v.data } let swap_element v i j = let d = get v i in let d' = get v j in set v j d ; set v i d' let reverse v = for i=0 to pred (v.len/2) do swap_element v i (pred v.len - i) done ocamlgsl-0.6.0/gsl_vector_complex_flat.mli0000664000076400007640000000246010600031632017434 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Vector of complex numbers implemented with a [float array] *) type complex_vector_flat = private { data : float array ; off : int ; len : int ; stride : int ; } type vector = complex_vector_flat (** {3 Operations} *) open Gsl_complex val create : ?init:complex -> int -> vector val of_array : complex array -> vector val to_array : vector -> complex array val of_complex_array : complex_array -> vector val to_complex_array : vector -> complex_array val length : vector -> int val get : vector -> int -> complex val set : vector -> int -> complex -> unit val set_all : vector -> complex -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : vector -> vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit (** {3 No-copy operations} *) val subvector : ?stride:int -> vector -> off:int -> len:int -> vector val view_complex_array : ?stride:int -> ?off:int -> ?len:int -> complex_array -> vector val real : vector -> Gsl_vector_flat.vector val imag : vector -> Gsl_vector_flat.vector ocamlgsl-0.6.0/mlgsl_vector.h0000664000076400007640000000404710600031632014701 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include "wrappers.h" #ifndef TYPE #error pb with include files #endif static inline void TYPE(mlgsl_vec_of_bigarray)(TYPE(gsl_vector) *cvec, value vvec){ struct caml_bigarray *bigarr = Bigarray_val(vvec); cvec->block = NULL; cvec->owner = 0; cvec->size = bigarr->dim[0]; cvec->stride = 1; cvec->data = bigarr->data; } #ifdef CONV_FLAT static inline void TYPE(mlgsl_vec_of_floatarray)(TYPE(gsl_vector) *cvec, value vvec){ cvec->block = NULL; cvec->owner = 0; cvec->size = Int_val(Field(vvec, 2)); cvec->stride = Int_val(Field(vvec, 3)); cvec->data = (double *)Field(vvec, 0) + Int_val(Field(vvec, 1)); } #endif static inline void TYPE(mlgsl_vec_of_value)(TYPE(gsl_vector) *cvec, value vvec){ if(Tag_val(vvec) == 0 && Wosize_val(vvec) == 2) /* value is a polymorphic variant */ vvec = Field(vvec, 1); if(Tag_val(vvec) == Custom_tag) /* value is a bigarray */ TYPE(mlgsl_vec_of_bigarray)(cvec, vvec); #ifdef CONV_FLAT else /* value is a record wrapping a float array */ TYPE(mlgsl_vec_of_floatarray)(cvec, vvec); #endif } #define _DECLARE_VECTOR(a) TYPE(gsl_vector) v_##a #define _DECLARE_VECTOR2(a,b) _DECLARE_VECTOR(a); _DECLARE_VECTOR(b) #define _DECLARE_VECTOR3(a,b,c) _DECLARE_VECTOR2(a,b); _DECLARE_VECTOR(c) #define _DECLARE_VECTOR4(a,b,c,d) _DECLARE_VECTOR2(a,b); _DECLARE_VECTOR2(c,d) #define _DECLARE_VECTOR5(a,b,c,d,e) _DECLARE_VECTOR4(a,b,c,d); _DECLARE_VECTOR(e) #define _CONVERT_VECTOR(a) TYPE(mlgsl_vec_of_value)(&v_##a, a) #define _CONVERT_VECTOR2(a,b) _CONVERT_VECTOR(a); _CONVERT_VECTOR(b) #define _CONVERT_VECTOR3(a,b,c) _CONVERT_VECTOR2(a,b); _CONVERT_VECTOR(c) #define _CONVERT_VECTOR4(a,b,c,d) _CONVERT_VECTOR2(a,b); _CONVERT_VECTOR2(c,d) #define _CONVERT_VECTOR5(a,b,c,d,e) _CONVERT_VECTOR4(a,b,c,d); _CONVERT_VECTOR(e) ocamlgsl-0.6.0/mlgsl_vector_float.c0000664000076400007640000000007410600031632016055 0ustar olivoliv #include "mlgsl_vector_float.h" #include "mlgsl_vector.c" ocamlgsl-0.6.0/mlgsl_vector_float.h0000664000076400007640000000025710600031632016065 0ustar olivoliv#include "wrappers.h" #define BASE_TYPE float #undef CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_vector.h" ocamlgsl-0.6.0/mlgsl_vector_double.c0000664000076400007640000000007510600031632016223 0ustar olivoliv #include "mlgsl_vector_double.h" #include "mlgsl_vector.c" ocamlgsl-0.6.0/mlgsl_vector_double.h0000664000076400007640000000017510600031632016231 0ustar olivoliv #define BASE_TYPE double #define CONV_FLAT #define TYPE(t) t #define FUNCTION(a,b) a ## _ ## b #include "mlgsl_vector.h" ocamlgsl-0.6.0/mlgsl_vector_complex.h0000664000076400007640000000076410600031632016432 0ustar olivoliv #include "wrappers.h" #define BASE_TYPE complex #define CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_vector.h" #define _DECLARE_COMPLEX_VECTOR(a) gsl_vector_complex v_##a #define _DECLARE_COMPLEX_VECTOR2(a,b) _DECLARE_COMPLEX_VECTOR(a); _DECLARE_COMPLEX_VECTOR(b) #define _CONVERT_COMPLEX_VECTOR(a) mlgsl_vec_of_value_complex(&v_##a, a) #define _CONVERT_COMPLEX_VECTOR2(a,b) _CONVERT_COMPLEX_VECTOR(a); _CONVERT_COMPLEX_VECTOR(b) ocamlgsl-0.6.0/mlgsl_vector_complex_float.h0000664000076400007640000000027010600031632017607 0ustar olivoliv #include "wrappers.h" #define BASE_TYPE complex_float #undef CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_vector.h" ocamlgsl-0.6.0/gsl_matrix.ml0000664000076400007640000001173610600031632014536 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Bigarray type double_mat_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = double_mat_bigarr let create ?init dimx dimy = let barr = Array2.create float64 c_layout dimx dimy in begin match init with | None -> () | Some x -> Array2.fill barr x end ; barr let dims mat = (Array2.dim1 mat, Array2.dim2 mat) let of_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do mat.{i,j} <- arr.(dim2*i+j) done done ; mat let of_arrays arr = Array2.of_array float64 c_layout arr let to_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in Array.init (d1*d2) (fun i -> mat.{i/d2, i mod d2}) let to_arrays (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let a = Array.init d1 (fun _ -> Array.make d2 0.) in for i=0 to pred d1 do for j=0 to pred d2 do a.(i).(j) <- mat.{i,j} done done ; a let get (m : matrix) i j = Array2.get m i j let set (m : matrix) i j x = Array2.set m i j x let set_all = Array2.fill let set_zero m = set_all m 0. let set_id m = set_zero m ; for i=0 to pred (min (Array2.dim1 m) (Array2.dim2 m)) do set m i i 1. done let memcpy ~src ~dst = Array2.blit src dst let copy m = let m' = create (Array2.dim1 m) (Array2.dim2 m) in Array2.blit m m' ; m' external add : matrix -> matrix -> unit = "ml_gsl_matrix_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_transpose" let row = Array2.slice_left module Single = struct type float_mat_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = float_mat_bigarr let create ?init dimx dimy = let barr = Array2.create float32 c_layout dimx dimy in begin match init with | None -> () | Some x -> Array2.fill barr x end ; barr let dims = dims let of_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do mat.{i,j} <- arr.(dim2*i+j) done done ; mat let of_arrays arr = Array2.of_array float32 c_layout arr let to_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in Array.init (d1*d2) (fun i -> mat.{i/d2, i mod d2}) let to_arrays (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let a = Array.init d1 (fun _ -> Array.make d2 0.) in for i=0 to pred d1 do for j=0 to pred d2 do a.(i).(j) <- mat.{i,j} done done ; a let get (m : matrix) i j = Array2.get m i j let set (m : matrix) i j x = Array2.set m i j x let set_all = set_all let set_zero = set_zero let set_id m = set_zero m ; for i=0 to pred (min (Array2.dim1 m) (Array2.dim2 m)) do set m i i 1. done let memcpy = memcpy let copy m = let m' = create (Array2.dim1 m) (Array2.dim2 m) in Array2.blit m m' ; m' let row = row external add : matrix -> matrix -> unit = "ml_gsl_matrix_float_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_float_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_float_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_float_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_float_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_float_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_float_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_float_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_float_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_float_transpose" end ocamlgsl-0.6.0/gsl_matrix.mli0000664000076400007640000000721210600031632014701 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Matrices of floats implemented with [Bigarray] *) type double_mat_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = double_mat_bigarr val create : ?init:float -> int -> int -> matrix val dims : matrix -> int * int val of_array : float array -> int -> int -> matrix val of_arrays : float array array -> matrix val to_array : matrix -> float array val to_arrays : matrix -> float array array val get : matrix -> int -> int -> float val set : matrix -> int -> int -> float -> unit val set_all : matrix -> float -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix val row : matrix -> int -> Gsl_vector.vector external add : matrix -> matrix -> unit = "ml_gsl_matrix_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_transpose" module Single : sig type float_mat_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = float_mat_bigarr val create : ?init:float -> int -> int -> matrix val dims : matrix -> int * int val of_array : float array -> int -> int -> matrix val of_arrays : float array array -> matrix val to_array : matrix -> float array val to_arrays : matrix -> float array array val get : matrix -> int -> int -> float val set : matrix -> int -> int -> float -> unit val set_all : matrix -> float -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix val row : matrix -> int -> Gsl_vector.Single.vector external add : matrix -> matrix -> unit = "ml_gsl_matrix_float_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_float_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_float_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_float_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_float_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_float_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_float_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_float_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_float_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_float_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_float_transpose" end ocamlgsl-0.6.0/gsl_matrix_flat.ml0000664000076400007640000001076010600031632015540 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type double_mat_flat = { data : float array ; off : int ; dim1 : int ; dim2 : int ; tda : int ; } type matrix = double_mat_flat let create ?(init=0.) dim1 dim2 = { data = Array.create (dim1 * dim2) init ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } let dims mat = (mat.dim1, mat.dim2) let of_arrays arr = let dim1 = Array.length arr in if dim1 = 0 then invalid_arg "of_arrays" ; let dim2 = Array.length arr.(0) in let tab = Array.make (dim1 * dim2) 0. in Array.iteri (fun i a -> if Array.length a <> dim2 then invalid_arg "of_arrays" ; Array.blit a 0 tab (i * dim2) dim2) arr ; { data = tab ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } let to_array mat = if mat.tda = mat.dim2 && mat.off = 0 then Array.copy mat.data else begin let arr = Array.make (mat.dim1 * mat.dim2) 0. in for i=0 to pred mat.dim1 do Array.blit mat.data (mat.off + i * mat.tda) arr (i*mat.dim2) mat.dim2 done ; arr end let to_arrays mat = let arr = Array.make_matrix mat.dim1 mat.dim2 0. in for i=0 to pred mat.dim1 do Array.blit mat.data (mat.off + i * mat.tda) arr.(i) 0 mat.dim2 done ; arr let of_array arr dim1 dim2 = let len = Array.length arr in if dim1 * dim2 <> len then invalid_arg "of_array" ; { data = Array.copy arr; off = 0 ; dim1 = dim1 ; dim2 = dim2; tda = dim2 } let get m i j = m.data.(m.off + i*m.tda + j) let set m i j x = m.data.(m.off + i*m.tda + j) <- x let set_all m x = for i=0 to pred m.dim1 do Array.fill m.data (m.off + i*m.tda) m.dim2 x done let set_zero m = set_all m 0. let set_id m = set_zero m ; for i=0 to pred (min m.dim1 m.dim2) do set m i i 1. done let memcpy ~src:m ~dst:m' = if m.dim1 <> m'.dim1 || m.dim2 <> m'.dim2 then invalid_arg "wrong dimensions" ; for i=0 to pred m.dim1 do Array.blit m.data (m.off + i*m.tda) m'.data (m'.off + i*m'.tda) m.dim2 done let copy m = let m' = create m.dim1 m.dim2 in memcpy m m' ; m' let submatrix m ~k1 ~k2 ~n1 ~n2 = { m with off = m.off + (k1*m.tda)+k2 ; dim1 = n1 ; dim2 = n2 ; tda = m.tda ; } let row m i = Gsl_vector_flat.view_array ~off:(m.off + i * m.tda) ~len:m.dim2 m.data let column m j = Gsl_vector_flat.view_array ~stride:m.tda ~off:(m.off + j) ~len:m.dim1 m.data let diagonal m = Gsl_vector_flat.view_array ~stride:(m.tda + 1) ~off:m.off ~len:(min m.dim1 m.dim2) m.data let subdiagonal m k = Gsl_vector_flat.view_array ~stride:(m.tda + 1) ~off:(m.off + k * m.tda) ~len:(min (m.dim1 - k) m.dim2) m.data let superdiagonal m k = Gsl_vector_flat.view_array ~stride:(m.tda + 1) ~off:(m.off + k) ~len:(min m.dim1 (m.dim2 - k)) m.data let view_array arr ?(off=0) dim1 ?tda dim2 = let tda = match tda with | None -> dim2 | Some v -> v in let len = Array.length arr in if dim1 * tda > len - off || dim2 > tda then invalid_arg "view_array" ; { data = arr; off = off; dim1 = dim1; dim2 = dim2; tda = tda } let view_vector v ?(off=0) dim1 ?tda dim2 = let tda = match tda with | None -> dim2 | Some v -> v in let len = Gsl_vector_flat.length v in if dim1 * tda > len - off || dim2 > tda then invalid_arg "view_vector" ; { data = v.Gsl_vector_flat.data; off = v.Gsl_vector_flat.off + off; dim1 = dim1; dim2 = dim2; tda = tda } external add : matrix -> matrix -> unit = "ml_gsl_matrix_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_transpose" ocamlgsl-0.6.0/gsl_matrix_flat.mli0000664000076400007640000000451210600031632015707 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Matrices of floats implemented with [float array] *) type double_mat_flat = private { data : float array ; off : int ; dim1 : int ; dim2 : int ; tda : int ; } type matrix = double_mat_flat val create : ?init:float -> int -> int -> matrix val dims : matrix -> int * int val of_array : float array -> int -> int -> matrix val of_arrays : float array array -> matrix val to_array : matrix -> float array val to_arrays : matrix -> float array array val to_array : matrix -> float array val get : matrix -> int -> int -> float val set : matrix -> int -> int -> float -> unit val set_all : matrix -> float -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix external add : matrix -> matrix -> unit = "ml_gsl_matrix_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_add_constant" external add_diagonal : matrix -> float -> unit = "ml_gsl_matrix_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_transpose" open Gsl_vector_flat val submatrix : matrix -> k1:int -> k2:int -> n1:int -> n2:int -> matrix val row : matrix -> int -> vector val column : matrix -> int -> vector val diagonal : matrix -> vector val subdiagonal : matrix -> int -> vector val superdiagonal : matrix -> int -> vector val view_array : float array -> ?off:int -> int -> ?tda:int -> int -> matrix val view_vector : vector -> ?off:int -> int -> ?tda:int -> int -> matrix ocamlgsl-0.6.0/gsl_matrix_complex.ml0000664000076400007640000001446310600031632016265 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Bigarray open Gsl_complex type complex_mat_bigarr = (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = complex_mat_bigarr let create ?init dimx dimy = let barr = Array2.create complex64 c_layout dimx dimy in begin match init with | None -> () | Some x -> Array2.fill barr x end ; barr let dims mat = (Array2.dim1 mat, Array2.dim2 mat) let of_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do mat.{i,j} <- arr.(dim2*i+j) done done ; mat let of_complex_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do let k = 2 * (dim2*i+j) in mat.{i,j} <- complex arr.(k) arr.(k+1) done done ; mat let of_arrays arr = Array2.of_array complex64 c_layout arr let to_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in Array.init (d1*d2) (fun i -> mat.{i/d2, i mod d2}) let to_complex_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let arr = Array.create (2*d1*d2) 0. in for i=0 to pred (d1*d2) do let { re = re; im = im } = mat.{i/d2, i mod d2} in arr.(2*i) <- re ; arr.(2*i+1) <- im done ; arr let to_arrays (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let a = Array.init d1 (fun _ -> Array.make d2 Complex.zero) in for i=0 to pred d1 do for j=0 to pred d2 do a.(i).(j) <- mat.{i,j} done done ; a let get (m : matrix) i j = Array2.get m i j let set (m : matrix) i j x = Array2.set m i j x let set_all = Array2.fill let set_zero m = set_all m Complex.zero let set_id m = set_zero m ; for i=0 to pred (min (Array2.dim1 m) (Array2.dim2 m)) do set m i i Complex.one done let memcpy ~src ~dst = Array2.blit src dst let copy m = let m' = create (Array2.dim1 m) (Array2.dim2 m) in Array2.blit m m' ; m' let row = Array2.slice_left external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_div" external scale : matrix -> complex -> unit = "ml_gsl_matrix_complex_scale" external add_constant : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_transpose" module Single = struct type complex_float_mat_bigarr = (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout) Bigarray.Array2.t type matrix = complex_float_mat_bigarr let create ?init dimx dimy = let barr = Array2.create complex32 c_layout dimx dimy in begin match init with | None -> () | Some x -> Array2.fill barr x end ; barr let dims = dims let of_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do mat.{i,j} <- arr.(dim2*i+j) done done ; mat let of_complex_array arr dim1 dim2 = let mat = create dim1 dim2 in for i=0 to pred dim1 do for j=0 to pred dim2 do let k = 2 * (dim2*i+j) in mat.{i,j} <- complex arr.(k) arr.(k+1) done done ; mat let of_arrays arr = Array2.of_array complex32 c_layout arr let to_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in Array.init (d1*d2) (fun i -> mat.{i/d2, i mod d2}) let to_complex_array (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let arr = Array.create (2*d1*d2) 0. in for i=0 to pred (d1*d2) do let { re = re; im = im } = mat.{i/d2, i mod d2} in arr.(2*i) <- re ; arr.(2*i+1) <- im done ; arr let to_arrays (mat : matrix) = let d1 = Array2.dim1 mat in let d2 = Array2.dim2 mat in let a = Array.init d1 (fun _ -> Array.make d2 Complex.zero) in for i=0 to pred d1 do for j=0 to pred d2 do a.(i).(j) <- mat.{i,j} done done ; a let get (m : matrix) i j = Array2.get m i j let set (m : matrix) i j x = Array2.set m i j x let set_all = set_all let set_zero = set_zero let set_id m = set_zero m ; for i=0 to pred (min (Array2.dim1 m) (Array2.dim2 m)) do set m i i Complex.one done let memcpy = memcpy let copy m = let m' = create (Array2.dim1 m) (Array2.dim2 m) in Array2.blit m m' ; m' let row = row external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_div" external scale : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_scale" external add_constant : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_float_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_float_transpose" end ocamlgsl-0.6.0/gsl_matrix_complex.mli0000664000076400007640000001020510600031632016424 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Matrices of complex numbers implemented with [Bigarray] *) open Bigarray open Gsl_complex type complex_mat_bigarr = (Complex.t, complex64_elt, c_layout) Array2.t type matrix = complex_mat_bigarr val create : ?init:complex -> int -> int -> matrix val dims : matrix -> int * int val of_array : complex array -> int -> int -> matrix val of_arrays : complex array array -> matrix val to_array : matrix -> complex array val to_arrays : matrix -> complex array array val of_complex_array : complex_array -> int -> int -> matrix val to_complex_array : matrix -> complex_array val get : matrix -> int -> int -> complex val set : matrix -> int -> int -> complex -> unit val set_all : matrix -> complex -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix val row : matrix -> int -> Gsl_vector_complex.vector external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_div" external scale : matrix -> complex -> unit = "ml_gsl_matrix_complex_scale" external add_constant : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_transpose" module Single : sig type complex_float_mat_bigarr = (Complex.t, complex32_elt, c_layout) Array2.t type matrix = complex_float_mat_bigarr val create : ?init:complex -> int -> int -> matrix val dims : matrix -> int * int val of_array : complex array -> int -> int -> matrix val of_arrays : complex array array -> matrix val to_array : matrix -> complex array val to_arrays : matrix -> complex array array val of_complex_array : complex_array -> int -> int -> matrix val to_complex_array : matrix -> complex_array val get : matrix -> int -> int -> complex val set : matrix -> int -> int -> complex -> unit val set_all : matrix -> complex -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix val row : matrix -> int -> Gsl_vector_complex.Single.vector external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_div" external scale : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_scale" external add_constant : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_float_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_float_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_float_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_float_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_float_transpose" end ocamlgsl-0.6.0/gsl_matrix_complex_flat.ml0000664000076400007640000001324110600031632017264 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type complex_mat_flat = { data : float array ; off : int ; dim1 : int ; dim2 : int ; tda : int ; } type matrix = complex_mat_flat open Gsl_complex let create ?(init=Complex.zero) dim1 dim2 = let mat = { data = Array.create (2 * dim1 * dim2) init.Complex.re ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } in if init.Complex.im <> init.Complex.re then for i=0 to pred (dim1*dim2) do mat.data.(2*i+1) <- init.Complex.im done ; mat let dims mat = (mat.dim1, mat.dim2) let get m i j = let k = 2 * (m.off + i*m.tda + j) in complex m.data.(k) m.data.(k+1) let set m i j c = let k = 2 * (m.off + i*m.tda + j) in m.data.(k) <- c.re ; m.data.(k+1) <- c.im let of_arrays arr = let dim1 = Array.length arr in if dim1 = 0 then invalid_arg "of_arrays" ; let dim2 = Array.length arr.(0) in let tab = Array.make (2 * dim1 * dim2) 0. in let mat = { data = tab ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } in for i=0 to pred dim1 do let a = arr.(i) in for j=0 to pred dim2 do set mat i j a.(j) done done ; mat let to_arrays mat = let arr = Array.make_matrix mat.dim1 mat.dim2 Complex.zero in for i=0 to pred mat.dim1 do let a = arr.(i) in for j=0 to pred mat.dim2 do a.(j) <- get mat i j done done ; arr let of_array arr dim1 dim2 = let len = Array.length arr in if dim1 * dim2 <> len then invalid_arg "of_array" ; let tab = Array.make (2 * dim1 * dim2) 0. in let mat = { data = tab ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } in for i=0 to pred dim1 do for j=0 to pred dim2 do set mat i j arr.(i*dim2+j) done done ; mat let to_array mat = let arr = Array.make (mat.dim1 * mat.dim2) Complex.zero in for i=0 to pred mat.dim1 do for j=0 to pred mat.dim2 do arr.(i*mat.dim2+j) <- get mat i j done done ; arr let of_complex_array arr dim1 dim2 = let len = Array.length arr in if 2 * dim1 * dim2 <> len then invalid_arg "of_array" ; { data = Array.copy arr ; off = 0 ; dim1 = dim1 ; dim2 = dim2 ; tda = dim2 } let to_complex_array mat = if mat.tda = mat.dim2 && mat.off = 0 then Array.copy mat.data else begin let tab = Array.create (2*mat.dim1*mat.dim2) 0. in for i=0 to pred mat.dim1 do for j=0 to pred mat.dim2 do Gsl_complex.set tab (i*mat.dim2 + j) (get mat i j) done done ; tab end let set_all m c = for i=0 to pred m.dim1 do for j=0 to pred m.dim2 do set m i j c done done let set_zero m = set_all m Complex.zero let set_id m = set_zero m ; for i=0 to pred (min m.dim1 m.dim2) do set m i i Complex.one done let memcpy ~src:m ~dst:m' = if m.dim1 <> m'.dim1 || m.dim2 <> m'.dim2 then invalid_arg "wrong dimensions" ; for i=0 to pred m.dim1 do Array.blit m.data (2 * (m.off + i*m.tda)) m'.data (2 * (m'.off + i*m'.tda)) (2 * m.dim2) done let copy m = let m' = create m.dim1 m.dim2 in memcpy m m' ; m' let submatrix m ~k1 ~k2 ~n1 ~n2 = { m with off = m.off + (k1*m.tda)+k2 ; dim1 = n1 ; dim2 = n2 ; tda = m.tda ; } let view_complex_array arr ?(off=0) dim1 ?tda dim2 = let tda = match tda with | None -> dim2 | Some v -> v in let len = Array.length arr in if dim1 * tda > len/2 - off || dim2 > tda then invalid_arg "view_array" ; { data = arr; off = off; dim1 = dim1; dim2 = dim2; tda = tda } external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_complex_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_complex_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_transpose" let row m i = Gsl_vector_complex_flat.view_complex_array ~off:(m.off + i * m.tda) ~len:m.dim2 m.data let column m j = Gsl_vector_complex_flat.view_complex_array ~stride:m.tda ~off:(m.off + j) ~len:m.dim1 m.data let diagonal m = Gsl_vector_complex_flat.view_complex_array ~stride:(m.tda + 1) ~off:m.off ~len:(min m.dim1 m.dim2) m.data let subdiagonal m k = Gsl_vector_complex_flat.view_complex_array ~stride:(m.tda + 1) ~off:(m.off + k * m.tda) ~len:(min (m.dim1 - k) m.dim2) m.data let superdiagonal m k = Gsl_vector_complex_flat.view_complex_array ~stride:(m.tda + 1) ~off:(m.off + k) ~len:(min m.dim1 (m.dim2 - k)) m.data let view_vector v ?(off=0) dim1 ?tda dim2 = let tda = match tda with | None -> dim2 | Some v -> v in let len = Gsl_vector_complex_flat.length v in if dim1 * tda > len - off || dim2 > tda then invalid_arg "view_vector" ; { data = v.Gsl_vector_complex_flat.data; off = v.Gsl_vector_complex_flat.off + off; dim1 = dim1; dim2 = dim2; tda = tda } ocamlgsl-0.6.0/gsl_matrix_complex_flat.mli0000664000076400007640000000505410600031632017440 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Matrices of complex number simplemented with [float array] *) type complex_mat_flat = private { data : float array; off : int; dim1 : int; dim2 : int; tda : int; } type matrix = complex_mat_flat open Gsl_complex val create : ?init:complex -> int -> int -> matrix val dims : matrix -> int * int val of_arrays : complex array array -> matrix val of_array : complex array -> int -> int -> matrix val to_arrays : matrix -> complex array array val to_array : matrix -> complex array val of_complex_array : float array -> int -> int -> matrix val to_complex_array : matrix -> complex_array val get : matrix -> int -> int -> complex val set : matrix -> int -> int -> complex -> unit val set_all : matrix -> complex -> unit val set_zero : matrix -> unit val set_id : matrix -> unit val memcpy : src:matrix -> dst:matrix -> unit val copy : matrix -> matrix external add : matrix -> matrix -> unit = "ml_gsl_matrix_complex_add" external sub : matrix -> matrix -> unit = "ml_gsl_matrix_complex_sub" external mul_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_mul" external div_elements : matrix -> matrix -> unit = "ml_gsl_matrix_complex_div" external scale : matrix -> float -> unit = "ml_gsl_matrix_complex_scale" external add_constant : matrix -> float -> unit = "ml_gsl_matrix_complex_add_constant" external add_diagonal : matrix -> complex -> unit = "ml_gsl_matrix_complex_add_diagonal" external is_null : matrix -> bool = "ml_gsl_matrix_complex_isnull" external swap_rows : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rows" external swap_columns : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_columns" external swap_rowcol : matrix -> int -> int -> unit = "ml_gsl_matrix_complex_swap_rowcol" external transpose : matrix -> matrix -> unit = "ml_gsl_matrix_complex_transpose_memcpy" external transpose_in_place : matrix -> unit = "ml_gsl_matrix_complex_transpose" open Gsl_vector_complex_flat val submatrix : matrix -> k1:int -> k2:int -> n1:int -> n2:int -> matrix val row : matrix -> int -> vector val column : matrix -> int -> vector val diagonal : matrix -> vector val subdiagonal : matrix -> int -> vector val superdiagonal : matrix -> int -> vector val view_complex_array : complex_array -> ?off:int -> int -> ?tda:int -> int -> matrix val view_vector : vector -> ?off:int -> int -> ?tda:int -> int -> matrix ocamlgsl-0.6.0/mlgsl_matrix.h0000664000076400007640000000347210600031632014704 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include "wrappers.h" #ifndef TYPE #error pb with include files #endif static inline void TYPE(mlgsl_mat_of_bigarray)(TYPE(gsl_matrix) *cmat, value vmat){ struct caml_bigarray *bigarr = Bigarray_val(vmat); cmat->block = NULL; cmat->owner = 0; cmat->size1 = bigarr->dim[0]; cmat->size2 = bigarr->dim[1]; cmat->tda = bigarr->dim[1]; cmat->data = bigarr->data; } #ifdef CONV_FLAT static inline void TYPE(mlgsl_mat_of_floatarray)(TYPE(gsl_matrix) *cmat, value vmat){ cmat->block = NULL; cmat->owner = 0; cmat->size1 = Int_val(Field(vmat, 2)); cmat->size2 = Int_val(Field(vmat, 3)); cmat->tda = Int_val(Field(vmat, 4)); cmat->data = (double *) Field(vmat, 0) + Int_val(Field(vmat, 1)); } #endif static inline void TYPE(mlgsl_mat_of_value)(TYPE(gsl_matrix) *cmat, value vmat){ if(Tag_val(vmat) == 0 && Wosize_val(vmat) == 2) /* value is a polymorphic variant */ vmat = Field(vmat, 1); if(Tag_val(vmat) == Custom_tag) /* value is a bigarray */ TYPE(mlgsl_mat_of_bigarray)(cmat, vmat); #ifdef CONV_FLAT else /* value is a record wrapping a float array */ TYPE(mlgsl_mat_of_floatarray)(cmat, vmat); #endif } #define _DECLARE_MATRIX(a) TYPE(gsl_matrix) m_##a #define _DECLARE_MATRIX2(a,b) _DECLARE_MATRIX(a); _DECLARE_MATRIX(b) #define _DECLARE_MATRIX3(a,b,c) _DECLARE_MATRIX2(a,b); _DECLARE_MATRIX(c) #define _CONVERT_MATRIX(a) TYPE(mlgsl_mat_of_value)(&m_##a, a) #define _CONVERT_MATRIX2(a,b) _CONVERT_MATRIX(a); _CONVERT_MATRIX(b) #define _CONVERT_MATRIX3(a,b,c) _CONVERT_MATRIX2(a,b); _CONVERT_MATRIX(c) ocamlgsl-0.6.0/mlgsl_matrix_float.c0000664000076400007640000000007410600031632016057 0ustar olivoliv #include "mlgsl_matrix_float.h" #include "mlgsl_matrix.c" ocamlgsl-0.6.0/mlgsl_matrix_float.h0000664000076400007640000000042510600031632016064 0ustar olivoliv #include "wrappers.h" #define BASE_TYPE float #undef CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define _DECLARE_BASE_TYPE(v) double conv_##v #define _CONVERT_BASE_TYPE(v) conv_##v = Double_val(v) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_matrix.h" ocamlgsl-0.6.0/mlgsl_matrix_double.c0000664000076400007640000000007510600031632016225 0ustar olivoliv #include "mlgsl_matrix_double.h" #include "mlgsl_matrix.c" ocamlgsl-0.6.0/mlgsl_matrix_double.h0000664000076400007640000000034210600031632016227 0ustar olivoliv #define BASE_TYPE double #define CONV_FLAT #define TYPE(t) t #define _DECLARE_BASE_TYPE(v) double conv_##v #define _CONVERT_BASE_TYPE(v) conv_##v = Double_val(v) #define FUNCTION(a,b) a ## _ ## b #include "mlgsl_matrix.h" ocamlgsl-0.6.0/mlgsl_matrix_complex.c0000664000076400007640000000007610600031632016423 0ustar olivoliv #include "mlgsl_matrix_complex.h" #include "mlgsl_matrix.c" ocamlgsl-0.6.0/mlgsl_matrix_complex.h0000664000076400007640000000120610600031632016424 0ustar olivoliv #include "wrappers.h" #define BASE_TYPE complex #define CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define _DECLARE_BASE_TYPE(v) gsl_complex conv_##v #define _CONVERT_BASE_TYPE(v) GSL_SET_COMPLEX(&conv_##v,Double_field(v, 0), Double_field(v,1)) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_matrix.h" #define _DECLARE_COMPLEX_MATRIX(a) gsl_matrix_complex m_##a #define _DECLARE_COMPLEX_MATRIX2(a,b) _DECLARE_COMPLEX_MATRIX(a); _DECLARE_COMPLEX_MATRIX(b) #define _CONVERT_COMPLEX_MATRIX(a) mlgsl_mat_of_value_complex(&m_##a, a) #define _CONVERT_COMPLEX_MATRIX2(a,b) _CONVERT_COMPLEX_MATRIX(a); _CONVERT_COMPLEX_MATRIX(b) ocamlgsl-0.6.0/mlgsl_matrix_complex_float.c0000664000076400007640000000010410600031632017600 0ustar olivoliv #include "mlgsl_matrix_complex_float.h" #include "mlgsl_matrix.c" ocamlgsl-0.6.0/mlgsl_matrix_complex_float.h0000664000076400007640000000052010600031632017607 0ustar olivoliv #include "wrappers.h" #define BASE_TYPE complex_float #undef CONV_FLAT #define TYPE(t) CONCAT2(t,BASE_TYPE) #define _DECLARE_BASE_TYPE(v) gsl_complex_float conv_##v #define _CONVERT_BASE_TYPE(v) GSL_SET_COMPLEX(&conv_##v,Double_field(v, 0), Double_field(v,1)) #define FUNCTION(a,b) CONCAT3(a,BASE_TYPE,b) #include "mlgsl_matrix.h" ocamlgsl-0.6.0/gsl_vectmat.ml0000664000076400007640000001317310600031632014672 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type vec = [ | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] let vec_convert ?(protect=false) = function | `A arr when protect -> `VF (Gsl_vector_flat.of_array arr) | `A arr -> `VF (Gsl_vector_flat.view_array arr) | `VF vec when protect -> `VF (Gsl_vector_flat.copy vec) | `VF vec as v -> v | `V vec when protect -> `V (Gsl_vector.copy vec) | `V vec as v -> v type mat = [ | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] let mat_convert ?(protect=false) = function | `M mat when protect -> `M (Gsl_matrix.copy mat) | `M mat as m -> m | `MF mat when protect -> `MF (Gsl_matrix_flat.copy mat) | `MF mat as m -> m | `A (arr, d1, d2) when protect -> `MF (Gsl_matrix_flat.of_array arr d1 d2) | `A (arr, d1, d2) -> `MF (Gsl_matrix_flat.view_array arr d1 d2) | `AA arr -> `MF (Gsl_matrix_flat.of_arrays arr) let mat_flat ?(protect=false) = function | `M mat -> let (d1, d2) = Gsl_matrix.dims mat in let arr = Gsl_matrix.to_array mat in Gsl_matrix_flat.view_array arr d1 d2 | `MF mat when protect -> Gsl_matrix_flat.copy mat | `MF mat -> mat | `A (arr, d1, d2) when protect -> Gsl_matrix_flat.of_array arr d1 d2 | `A (arr, d1, d2) -> Gsl_matrix_flat.view_array arr d1 d2 | `AA arr -> Gsl_matrix_flat.of_arrays arr (* Complex values *) type cvec = [ | `CV of Gsl_vector_complex.vector | `CVF of Gsl_vector_complex_flat.vector ] type cmat = [ | `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] let cmat_convert ?(protect=false) = function | `CM mat when protect -> `CM (Gsl_matrix_complex.copy mat) | `CM mat as m -> m | `CMF mat when protect -> `CMF (Gsl_matrix_complex_flat.copy mat) | `CMF mat as m -> m | `CA (arr, d1, d2) when protect -> `CMF (Gsl_matrix_complex_flat.of_complex_array arr d1 d2) | `CA (arr, d1, d2) -> `CMF (Gsl_matrix_complex_flat.view_complex_array arr d1 d2) (* Generic vector operations *) let length = function | `VF v -> Gsl_vector_flat.length v | `V v -> Gsl_vector.length v | `CV v -> Gsl_vector_complex.length v | `CVF v -> Gsl_vector_complex_flat.length v let to_array = function | `VF v -> Gsl_vector_flat.to_array v | `V v -> Gsl_vector.to_array v let v_copy = function | `VF v -> `VF (Gsl_vector_flat.copy v) | `V v -> `V (Gsl_vector.copy v) let subvector v ~off ~len = match v with | `VF v -> `VF (Gsl_vector_flat.subvector v ~off ~len) | `V v -> `V (Gsl_vector.subvector v ~off ~len) external v_memcpy : [< vec]-> [< vec]-> unit = "ml_gsl_vector_memcpy" external v_add : [< vec]-> [< vec]-> unit = "ml_gsl_vector_add" external v_sub : [< vec]-> [< vec]-> unit = "ml_gsl_vector_sub" external v_mul : [< vec]-> [< vec]-> unit = "ml_gsl_vector_mul" external v_div : [< vec]-> [< vec]-> unit = "ml_gsl_vector_div" external v_scale : [< vec]-> float -> unit = "ml_gsl_vector_scale" external v_add_constant : [< vec]-> float -> unit = "ml_gsl_vector_add_constant" external v_is_null : [< vec]-> bool = "ml_gsl_vector_isnull" external v_max : [< vec]-> float = "ml_gsl_vector_max" external v_min : [< vec]-> float = "ml_gsl_vector_min" external v_minmax : [< vec]-> float * float = "ml_gsl_vector_minmax" external v_max_index : [< vec]-> int = "ml_gsl_vector_maxindex" external v_min_index : [< vec]-> int = "ml_gsl_vector_minindex" external v_minmax_index : [< vec]-> int * int = "ml_gsl_vector_minmaxindex" (* Generic matrix operations *) let dims = function | `MF v -> Gsl_matrix_flat.dims v | `M v -> Gsl_matrix.dims v | `CM m -> Gsl_matrix_complex.dims m | `CMF m -> Gsl_matrix_complex_flat.dims m let to_arrays = function | `M mat -> Gsl_matrix.to_arrays mat | `MF mat -> Gsl_matrix_flat.to_arrays mat let tmp mat = let (d1, d2) = dims mat in `M (Gsl_matrix.create d1 d2) let m_copy = function | `MF v -> `MF (Gsl_matrix_flat.copy v) | `M v -> `M (Gsl_matrix.copy v) external m_memcpy : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_memcpy" external m_add : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_add" external m_sub : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_sub" external m_mul : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_mul" external m_div : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_div" external m_scale : [< mat] -> float -> unit = "ml_gsl_matrix_scale" external m_add_constant : [< mat] -> float -> unit = "ml_gsl_matrix_add_constant" external m_add_diagonal : [< mat] -> float -> unit = "ml_gsl_matrix_add_diagonal" external m_is_null : [< mat] -> bool = "ml_gsl_matrix_isnull" external swap_rows : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : [< mat] -> unit = "ml_gsl_matrix_transpose" let is_null x = match x with | `VF _ | `V _ as v -> v_is_null v | `MF _ | `M _ as m -> m_is_null m let scale x c = match x with | `VF _ | `V _ as v -> v_scale v c | `MF _ | `M _ as m -> m_scale m c let add_constant x c = match x with | `VF _ | `V _ as v -> v_add_constant v c | `MF _ | `M _ as m -> m_add_constant m c ocamlgsl-0.6.0/gsl_vectmat.mli0000664000076400007640000000703510600031632015043 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Generic variant types for vectors and matrices *) (** {3 Real values} *) type vec = [ | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] val vec_convert : ?protect:bool -> [< `A of float array | `VF of Gsl_vector_flat.vector | `V of Gsl_vector.vector] -> [> vec] type mat = [ | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] val mat_convert : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> [> mat] val mat_flat : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> Gsl_matrix_flat.matrix (** {3 Complex values} *) type cvec = [ | `CV of Gsl_vector_complex.vector | `CVF of Gsl_vector_complex_flat.vector ] type cmat = [ | `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] val cmat_convert : ?protect:bool -> [< `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix | `CA of Gsl_complex.complex_array * int * int ] -> [> cmat] (** {3 Generic vector operations} *) val length : [< vec| cvec] -> int val to_array : [< vec] -> float array val v_copy : [< vec] -> [> vec] val subvector : [< vec] -> off:int -> len:int -> [> vec] external v_memcpy : [< vec] -> [< vec] -> unit = "ml_gsl_vector_memcpy" external v_add : [< vec] -> [< vec] -> unit = "ml_gsl_vector_add" external v_sub : [< vec] -> [< vec] -> unit = "ml_gsl_vector_sub" external v_mul : [< vec] -> [< vec] -> unit = "ml_gsl_vector_mul" external v_div : [< vec] -> [< vec] -> unit = "ml_gsl_vector_div" external v_max : [< vec] -> float = "ml_gsl_vector_max" external v_min : [< vec] -> float = "ml_gsl_vector_min" external v_minmax : [< vec] -> float * float = "ml_gsl_vector_minmax" external v_max_index : [< vec] -> int = "ml_gsl_vector_maxindex" external v_min_index : [< vec] -> int = "ml_gsl_vector_minindex" external v_minmax_index : [< vec] -> int * int = "ml_gsl_vector_minmaxindex" (** {3 Generic matrix operations} *) val dims : [< mat| cmat] -> int * int val tmp : [< mat] -> [> `M of Gsl_matrix.matrix] val to_arrays : [< mat] -> float array array val m_copy : [< mat] -> [> mat] external m_memcpy : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_memcpy" external m_add : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_add" external m_sub : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_sub" external m_mul : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_mul" external m_div : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_div" external m_add_diagonal : [< mat] -> float -> unit = "ml_gsl_matrix_add_diagonal" external swap_rows : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_rows" external swap_columns : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_columns" external swap_rowcol : [< mat] -> int -> int -> unit = "ml_gsl_matrix_swap_rowcol" external transpose : [< mat] -> [< mat] -> unit = "ml_gsl_matrix_transpose_memcpy" external transpose_in_place : [< mat] -> unit = "ml_gsl_matrix_transpose" (** {3 Other generic operations} *) val is_null : [< vec | mat] -> bool val scale : [< vec | mat] -> float -> unit val add_constant : [< vec | mat] -> float -> unit ocamlgsl-0.6.0/gsl_blas.ml0000664000076400007640000002706710600031632014157 0ustar olivoliv (** BLAS support *) type order = | RowMajor | ColMajor type transpose = | NoTrans | Trans | ConjTrans type uplo = | Upper | Lower type diag = | NonUnit | Unit type side = | Left | Right open Gsl_matrix open Gsl_vector (** {3 LEVEL 1} *) external dot : vector -> vector -> float = "ml_gsl_blas_ddot" external nrm2 : vector -> float = "ml_gsl_blas_dnrm2" external asum : vector -> float = "ml_gsl_blas_dasum" external iamax : vector -> int = "ml_gsl_blas_idamax" external swap : vector -> vector -> unit = "ml_gsl_blas_dswap" external copy : vector -> vector -> unit = "ml_gsl_blas_dcopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_daxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> vector -> unit = "ml_gsl_blas_dscal" (** {3 LEVEL 2} *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr2" (** {3 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" (** {3 Single precision} *) open Gsl_vector.Single open Gsl_matrix.Single module Single = struct (** {4 LEVEL 1} *) external sdsdot : alpha:float -> vector -> vector -> float = "ml_gsl_blas_sdsdot" external dsdot : vector -> vector -> float = "ml_gsl_blas_dsdot" external dot : vector -> vector -> float = "ml_gsl_blas_sdot" external nrm2 : vector -> float = "ml_gsl_blas_snrm2" external asum : vector -> float = "ml_gsl_blas_sasum" external iamax : vector -> int = "ml_gsl_blas_isamax" external swap : vector -> vector -> unit = "ml_gsl_blas_sswap" external copy : vector -> vector -> unit = "ml_gsl_blas_scopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_saxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_srot" external scal : float -> vector -> unit = "ml_gsl_blas_sscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_sgemv_bc" "ml_gsl_blas_sgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_strmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_strsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_ssymv_bc" "ml_gsl_blas_ssymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_sger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_ssyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_ssyr2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_sgemm_bc" "ml_gsl_blas_sgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssymm_bc" "ml_gsl_blas_ssymm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssyrk_bc" "ml_gsl_blas_ssyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssyr2k_bc" "ml_gsl_blas_ssyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_strmm_bc" "ml_gsl_blas_strmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_strsm_bc" "ml_gsl_blas_strsm" end (** {3 Complex} *) open Gsl_vector_complex open Gsl_matrix_complex open Gsl_complex module Complex = struct (** {4 LEVEL 1} *) external dotu : vector -> vector -> complex = "ml_gsl_blas_zdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_zdotc" external nrm2 : vector -> float = "ml_gsl_blas_znrm2" external asum : vector -> float = "ml_gsl_blas_zasum" external iamax : vector -> int = "ml_gsl_blas_izamax" external swap : vector -> vector -> unit = "ml_gsl_blas_zswap" external copy : vector -> vector -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_zscal" external zdscal : float -> vector -> unit = "ml_gsl_blas_zdscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zher2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end (** {3 Complex single precision} *) open Gsl_vector_complex.Single open Gsl_matrix_complex.Single open Gsl_complex module Complex_Single = struct (** {4 LEVEL 1} *) external dotu : vector -> vector -> complex = "ml_gsl_blas_cdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_cdotc" external nrm2 : vector -> float = "ml_gsl_blas_scnrm2" external asum : vector -> float = "ml_gsl_blas_scasum" external iamax : vector -> int = "ml_gsl_blas_icamax" external swap : vector -> vector -> unit = "ml_gsl_blas_cswap" external copy : vector -> vector -> unit = "ml_gsl_blas_ccopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_caxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_cscal" external csscal : float -> vector -> unit = "ml_gsl_blas_csscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_cgemv_bc" "ml_gsl_blas_cgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ctrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ctrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_chemv_bc" "ml_gsl_blas_chemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_cher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cher2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_cgemm_bc" "ml_gsl_blas_cgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csymm_bc" "ml_gsl_blas_csymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csyrk_bc" "ml_gsl_blas_csyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csyr2k_bc" "ml_gsl_blas_csyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ctrmm_bc" "ml_gsl_blas_ctrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ctrsm_bc" "ml_gsl_blas_ctrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_chemm_bc" "ml_gsl_blas_chemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_cherk_bc" "ml_gsl_blas_cherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_cher2k_bc" "ml_gsl_blas_cher2k" end ocamlgsl-0.6.0/gsl_blas_flat.ml0000664000076400007640000001365010600031632015156 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type order = Gsl_blas.order = | RowMajor | ColMajor type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans type uplo = Gsl_blas.uplo = | Upper | Lower type diag = Gsl_blas.diag = | NonUnit | Unit type side = Gsl_blas.side = | Left | Right open Gsl_matrix_flat open Gsl_vector_flat (* LEVEL 1 *) external dot : vector -> vector -> float = "ml_gsl_blas_ddot" external nrm2 : vector -> float = "ml_gsl_blas_dnrm2" external asum : vector -> float = "ml_gsl_blas_dasum" external iamax : vector -> int = "ml_gsl_blas_idamax" external swap : vector -> vector -> unit = "ml_gsl_blas_dswap" external copy : vector -> vector -> unit = "ml_gsl_blas_dcopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_daxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> vector -> unit = "ml_gsl_blas_dscal" (* LEVEL 2 *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" open Gsl_vector_complex_flat open Gsl_matrix_complex_flat open Gsl_complex module Complex = struct (* LEVEL 1 *) external dotu : vector -> vector -> complex = "ml_gsl_blas_zdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_zdotc" external nrm2 : vector -> float = "ml_gsl_blas_znrm2" external asum : vector -> float = "ml_gsl_blas_zasum" external iamax : vector -> int = "ml_gsl_blas_izamax" external swap : vector -> vector -> unit = "ml_gsl_blas_zswap" external copy : vector -> vector -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_zscal" external zdscal : float -> vector -> unit = "ml_gsl_blas_zdscal" (* LEVEL 2 *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zher2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end ocamlgsl-0.6.0/gsl_blas_gen.ml0000664000076400007640000001377210600031632015006 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type order = Gsl_blas.order = | RowMajor | ColMajor type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans type uplo = Gsl_blas.uplo = | Upper | Lower type diag = Gsl_blas.diag = | NonUnit | Unit type side = Gsl_blas.side = | Left | Right open Gsl_vectmat (* LEVEL 1 *) external dot : [< vec] -> [< vec] -> float = "ml_gsl_blas_ddot" external nrm2 : [< vec] -> float = "ml_gsl_blas_dnrm2" external asum : [< vec] -> float = "ml_gsl_blas_dasum" external iamax : [< vec] -> int = "ml_gsl_blas_idamax" external swap : [< vec] -> [< vec] -> unit = "ml_gsl_blas_dswap" external copy : [< vec] -> [< vec] -> unit = "ml_gsl_blas_dcopy" external axpy : float -> [< vec] -> [< vec] -> unit = "ml_gsl_blas_daxpy" external rot : [< vec] -> [< vec] -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> [< vec] -> unit = "ml_gsl_blas_dscal" (* LEVEL 2 *) external gemv : transpose -> alpha:float -> a:[< mat] -> x:[< vec] -> beta:float -> y:[< vec] -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:[< mat] -> x:[< vec] -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:[< mat] -> x:[< vec] -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:[< mat] -> x:[< vec] -> beta:float -> y:[< vec] -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:[< vec] -> y:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:[< vec] -> y:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dsyr2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< mat] -> b:[< mat] -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< mat] -> b:[< mat] -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" open Gsl_complex module Complex = struct (* LEVEL 1 *) external dotu : [< cvec] -> [< cvec] -> complex = "ml_gsl_blas_zdotu" external dotc : [< cvec] -> [< cvec] -> complex = "ml_gsl_blas_zdotc" external nrm2 : [< cvec] -> float = "ml_gsl_blas_znrm2" external asum : [< cvec] -> float = "ml_gsl_blas_zasum" external iamax : [< cvec] -> int = "ml_gsl_blas_izamax" external swap : [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zswap" external copy : [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> [< cvec] -> unit = "ml_gsl_blas_zscal" external zdscal : float -> [< cvec] -> unit = "ml_gsl_blas_zdscal" (* LEVEL 2 *) external gemv : transpose -> alpha:complex -> a:[< cmat] -> x:[< cvec] -> beta:complex -> y:[< cvec] -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:[< cmat] -> x:[< cvec] -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:[< cmat] -> x:[< cvec] -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:[< cmat] -> x:[< cvec] -> beta:complex -> y:[< cvec] -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zher2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:[< cmat] -> beta:float -> c:[< cmat] -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:float -> c:[< cmat] -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end ocamlgsl-0.6.0/gsl_blas.mli0000664000076400007640000002705610600031632014326 0ustar olivoliv (** BLAS support *) type order = | RowMajor | ColMajor type transpose = | NoTrans | Trans | ConjTrans type uplo = | Upper | Lower type diag = | NonUnit | Unit type side = | Left | Right open Gsl_matrix open Gsl_vector (** {3 LEVEL 1} *) external dot : vector -> vector -> float = "ml_gsl_blas_ddot" external nrm2 : vector -> float = "ml_gsl_blas_dnrm2" external asum : vector -> float = "ml_gsl_blas_dasum" external iamax : vector -> int = "ml_gsl_blas_idamax" external swap : vector -> vector -> unit = "ml_gsl_blas_dswap" external copy : vector -> vector -> unit = "ml_gsl_blas_dcopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_daxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> vector -> unit = "ml_gsl_blas_dscal" (** {3 LEVEL 2} *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr2" (** {3 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" (** {3 Single precision} *) open Gsl_vector.Single open Gsl_matrix.Single module Single : sig (** {4 LEVEL 1} *) external sdsdot : alpha:float -> vector -> vector -> float = "ml_gsl_blas_sdsdot" external dsdot : vector -> vector -> float = "ml_gsl_blas_dsdot" external dot : vector -> vector -> float = "ml_gsl_blas_sdot" external nrm2 : vector -> float = "ml_gsl_blas_snrm2" external asum : vector -> float = "ml_gsl_blas_sasum" external iamax : vector -> int = "ml_gsl_blas_isamax" external swap : vector -> vector -> unit = "ml_gsl_blas_sswap" external copy : vector -> vector -> unit = "ml_gsl_blas_scopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_saxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_srot" external scal : float -> vector -> unit = "ml_gsl_blas_sscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_sgemv_bc" "ml_gsl_blas_sgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_strmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_strsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_ssymv_bc" "ml_gsl_blas_ssymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_sger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_ssyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_ssyr2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_sgemm_bc" "ml_gsl_blas_sgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssymm_bc" "ml_gsl_blas_ssymm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssyrk_bc" "ml_gsl_blas_ssyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_ssyr2k_bc" "ml_gsl_blas_ssyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_strmm_bc" "ml_gsl_blas_strmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_strsm_bc" "ml_gsl_blas_strsm" end (** {3 Complex} *) open Gsl_vector_complex open Gsl_matrix_complex open Gsl_complex module Complex : sig (** {4 LEVEL 1} *) external dotu : vector -> vector -> complex = "ml_gsl_blas_zdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_zdotc" external nrm2 : vector -> float = "ml_gsl_blas_znrm2" external asum : vector -> float = "ml_gsl_blas_zasum" external iamax : vector -> int = "ml_gsl_blas_izamax" external swap : vector -> vector -> unit = "ml_gsl_blas_zswap" external copy : vector -> vector -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_zscal" external zdscal : float -> vector -> unit = "ml_gsl_blas_zdscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zher2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end (** {3 Complex single precision} *) open Gsl_vector_complex.Single open Gsl_matrix_complex.Single open Gsl_complex module Complex_Single : sig (** {4 LEVEL 1} *) external dotu : vector -> vector -> complex = "ml_gsl_blas_cdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_cdotc" external nrm2 : vector -> float = "ml_gsl_blas_scnrm2" external asum : vector -> float = "ml_gsl_blas_scasum" external iamax : vector -> int = "ml_gsl_blas_icamax" external swap : vector -> vector -> unit = "ml_gsl_blas_cswap" external copy : vector -> vector -> unit = "ml_gsl_blas_ccopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_caxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_cscal" external csscal : float -> vector -> unit = "ml_gsl_blas_csscal" (** {4 LEVEL 2} *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_cgemv_bc" "ml_gsl_blas_cgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ctrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ctrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_chemv_bc" "ml_gsl_blas_chemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_cher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_cher2" (** {4 LEVEL 3} *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_cgemm_bc" "ml_gsl_blas_cgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csymm_bc" "ml_gsl_blas_csymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csyrk_bc" "ml_gsl_blas_csyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_csyr2k_bc" "ml_gsl_blas_csyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ctrmm_bc" "ml_gsl_blas_ctrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ctrsm_bc" "ml_gsl_blas_ctrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_chemm_bc" "ml_gsl_blas_chemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_cherk_bc" "ml_gsl_blas_cherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_cher2k_bc" "ml_gsl_blas_cher2k" end ocamlgsl-0.6.0/gsl_blas_flat.mli0000664000076400007640000001364510600031632015333 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type order = Gsl_blas.order = | RowMajor | ColMajor type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans type uplo = Gsl_blas.uplo = | Upper | Lower type diag = Gsl_blas.diag = | NonUnit | Unit type side = Gsl_blas.side = | Left | Right open Gsl_matrix_flat open Gsl_vector_flat (* LEVEL 1 *) external dot : vector -> vector -> float = "ml_gsl_blas_ddot" external nrm2 : vector -> float = "ml_gsl_blas_dnrm2" external asum : vector -> float = "ml_gsl_blas_dasum" external iamax : vector -> int = "ml_gsl_blas_idamax" external swap : vector -> vector -> unit = "ml_gsl_blas_dswap" external copy : vector -> vector -> unit = "ml_gsl_blas_dcopy" external axpy : float -> vector -> vector -> unit = "ml_gsl_blas_daxpy" external rot : vector -> vector -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> vector -> unit = "ml_gsl_blas_dscal" (* LEVEL 2 *) external gemv : transpose -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:matrix -> x:vector -> beta:float -> y:vector -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_dsyr2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" open Gsl_vector_complex_flat open Gsl_matrix_complex_flat open Gsl_complex module Complex : sig (* LEVEL 1 *) external dotu : vector -> vector -> complex = "ml_gsl_blas_zdotu" external dotc : vector -> vector -> complex = "ml_gsl_blas_zdotc" external nrm2 : vector -> float = "ml_gsl_blas_znrm2" external asum : vector -> float = "ml_gsl_blas_zasum" external iamax : vector -> int = "ml_gsl_blas_izamax" external swap : vector -> vector -> unit = "ml_gsl_blas_zswap" external copy : vector -> vector -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> vector -> vector -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> vector -> unit = "ml_gsl_blas_zscal" external zdscal : float -> vector -> unit = "ml_gsl_blas_zdscal" (* LEVEL 2 *) external gemv : transpose -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:matrix -> x:vector -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:matrix -> x:vector -> beta:complex -> y:vector -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:vector -> a:matrix -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:vector -> y:vector -> a:matrix -> unit = "ml_gsl_blas_zher2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:matrix -> b:matrix -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:matrix -> b:matrix -> beta:complex -> c:matrix -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:matrix -> b:matrix -> beta:float -> c:matrix -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end ocamlgsl-0.6.0/gsl_blas_gen.mli0000664000076400007640000001376710600031632015163 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type order = Gsl_blas.order = | RowMajor | ColMajor type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans type uplo = Gsl_blas.uplo = | Upper | Lower type diag = Gsl_blas.diag = | NonUnit | Unit type side = Gsl_blas.side = | Left | Right open Gsl_vectmat (* LEVEL 1 *) external dot : [< vec] -> [< vec] -> float = "ml_gsl_blas_ddot" external nrm2 : [< vec] -> float = "ml_gsl_blas_dnrm2" external asum : [< vec] -> float = "ml_gsl_blas_dasum" external iamax : [< vec] -> int = "ml_gsl_blas_idamax" external swap : [< vec] -> [< vec] -> unit = "ml_gsl_blas_dswap" external copy : [< vec] -> [< vec] -> unit = "ml_gsl_blas_dcopy" external axpy : float -> [< vec] -> [< vec] -> unit = "ml_gsl_blas_daxpy" external rot : [< vec] -> [< vec] -> float -> float -> unit = "ml_gsl_blas_drot" external scal : float -> [< vec] -> unit = "ml_gsl_blas_dscal" (* LEVEL 2 *) external gemv : transpose -> alpha:float -> a:[< mat] -> x:[< vec] -> beta:float -> y:[< vec] -> unit = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv" external trmv : uplo -> transpose -> diag -> a:[< mat] -> x:[< vec] -> unit = "ml_gsl_blas_dtrmv" external trsv : uplo -> transpose -> diag -> a:[< mat] -> x:[< vec] -> unit = "ml_gsl_blas_dtrsv" external symv : uplo -> alpha:float -> a:[< mat] -> x:[< vec] -> beta:float -> y:[< vec] -> unit = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv" external dger : alpha:float -> x:[< vec] -> y:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dger" external syr : uplo -> alpha:float -> x:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dsyr" external syr2 : uplo -> alpha:float -> x:[< vec] -> y:[< vec] -> a:[< mat] -> unit = "ml_gsl_blas_dsyr2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm" external symm : side -> uplo -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm" external trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< mat] -> b:[< mat] -> unit = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< mat] -> b:[< mat] -> unit = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm" external syrk : uplo -> transpose -> alpha:float -> a:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk" external syr2k : uplo -> transpose -> alpha:float -> a:[< mat] -> b:[< mat] -> beta:float -> c:[< mat] -> unit = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k" open Gsl_complex module Complex : sig (* LEVEL 1 *) external dotu : [< cvec] -> [< cvec] -> complex = "ml_gsl_blas_zdotu" external dotc : [< cvec] -> [< cvec] -> complex = "ml_gsl_blas_zdotc" external nrm2 : [< cvec] -> float = "ml_gsl_blas_znrm2" external asum : [< cvec] -> float = "ml_gsl_blas_zasum" external iamax : [< cvec] -> int = "ml_gsl_blas_izamax" external swap : [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zswap" external copy : [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zcopy" external axpy : complex -> [< cvec] -> [< cvec] -> unit = "ml_gsl_blas_zaxpy" external scal : complex -> [< cvec] -> unit = "ml_gsl_blas_zscal" external zdscal : float -> [< cvec] -> unit = "ml_gsl_blas_zdscal" (* LEVEL 2 *) external gemv : transpose -> alpha:complex -> a:[< cmat] -> x:[< cvec] -> beta:complex -> y:[< cvec] -> unit = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv" external trmv : uplo -> transpose -> diag -> a:[< cmat] -> x:[< cvec] -> unit = "ml_gsl_blas_ztrmv" external trsv : uplo -> transpose -> diag -> a:[< cmat] -> x:[< cvec] -> unit = "ml_gsl_blas_ztrsv" external hemv : uplo -> alpha:complex -> a:[< cmat] -> x:[< cvec] -> beta:complex -> y:[< cvec] -> unit = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv" external geru : alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zgeru" external gerc : alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zgerc" external her : uplo -> alpha:float -> x:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zher" external her2 : uplo -> alpha:complex -> x:[< cvec] -> y:[< cvec] -> a:[< cmat] -> unit = "ml_gsl_blas_zher2" (* LEVEL 3 *) external gemm : ta:transpose -> tb:transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm" external symm : side -> uplo -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm" external syrk : uplo -> transpose -> alpha:complex -> a:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk" external syr2k : uplo -> transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k" external trmm : side -> uplo -> transpose -> diag -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> unit = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm" external trsm : side -> uplo -> transpose -> diag -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> unit = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm" external hemm : side -> uplo -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:complex -> c:[< cmat] -> unit = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm" external herk : uplo -> transpose -> alpha:float -> a:[< cmat] -> beta:float -> c:[< cmat] -> unit = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk" external her2k : uplo -> transpose -> alpha:complex -> a:[< cmat] -> b:[< cmat] -> beta:float -> c:[< cmat] -> unit = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k" end ocamlgsl-0.6.0/mlgsl_blas.h0000664000076400007640000000156310600031632014320 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ static inline CBLAS_ORDER_t CBLAS_ORDER_val(v) { CBLAS_ORDER_t conv[] = { CblasRowMajor, CblasColMajor }; return conv[ Int_val(v) ]; } static inline CBLAS_TRANSPOSE_t CBLAS_TRANS_val(v) { CBLAS_TRANSPOSE_t conv[] = { CblasNoTrans, CblasTrans, CblasConjTrans }; return conv[ Int_val(v) ]; } static inline CBLAS_UPLO_t CBLAS_UPLO_val(v) { CBLAS_UPLO_t conv[] = { CblasUpper, CblasLower }; return conv[ Int_val(v) ]; } static inline CBLAS_DIAG_t CBLAS_DIAG_val(v) { CBLAS_DIAG_t conv[] = { CblasNonUnit, CblasUnit }; return conv[ Int_val(v) ]; } static inline CBLAS_SIDE_t CBLAS_SIDE_val(v) { CBLAS_SIDE_t conv[] = { CblasLeft, CblasRight }; return conv[ Int_val(v) ]; } ocamlgsl-0.6.0/mlgsl_blas.c0000664000076400007640000001577410600031632014324 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "mlgsl_vector_double.h" #include "mlgsl_matrix_double.h" #include "mlgsl_blas.h" /* LEVEL1 double */ CAMLprim value ml_gsl_blas_ddot(value X, value Y) { double r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_ddot(&v_X, &v_Y, &r); return copy_double(r); } CAMLprim value ml_gsl_blas_dnrm2(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_dnrm2(&v_X)); } CAMLprim value ml_gsl_blas_dasum(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_dasum(&v_X)); } CAMLprim value ml_gsl_blas_idamax(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return Val_int(gsl_blas_idamax(&v_X)); } CAMLprim value ml_gsl_blas_dswap(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_dswap(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_dcopy(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_dcopy(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_daxpy(value alpha, value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_daxpy(Double_val(alpha), &v_X, &v_Y); return Val_unit; } /* FIXME: drotg drotmg drotm */ CAMLprim value ml_gsl_blas_drot(value X, value Y, value c, value s) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_drot(&v_X, &v_Y, Double_val(c), Double_val(s)); return Val_unit; } CAMLprim value ml_gsl_blas_dscal(value alpha, value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); gsl_blas_dscal(Double_val(alpha), &v_X); return Val_unit; } /* LEVEL2 double */ CAMLprim value ml_gsl_blas_dgemv(value transa, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_dgemv(CBLAS_TRANS_val(transa), Double_val(alpha), &m_A, &v_X, Double_val(beta), &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_dgemv_bc(value *argv, int argc) { return ml_gsl_blas_dgemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_dtrmv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_dtrmv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_dtrsv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_dtrsv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_dsymv(value uplo, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_dsymv(CBLAS_UPLO_val(uplo), Double_val(alpha), &m_A, &v_X, Double_val(beta), &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_dsymv_bc(value *argv, int argc) { return ml_gsl_blas_dsymv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_dger(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_dger(Double_val(alpha), &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_dsyr(value uplo ,value alpha, value X, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_dsyr(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_dsyr2(value uplo ,value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_dsyr2(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &v_Y, &m_A); return Val_unit; } /* LEVEL3 double */ CAMLprim value ml_gsl_blas_dgemm(value transa, value transb, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_dgemm(CBLAS_TRANS_val(transa), CBLAS_TRANS_val(transb), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_dgemm_bc(value *argv, int argc) { return ml_gsl_blas_dgemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_dsymm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_dsymm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_dsymm_bc(value *argv, int argc) { return ml_gsl_blas_dsymm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_dtrmm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _CONVERT_MATRIX2(A, B); gsl_blas_dtrmm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), Double_val(alpha), &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_dtrmm_bc(value *argv, int argc) { return ml_gsl_blas_dtrmm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_dtrsm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _CONVERT_MATRIX2(A, B); gsl_blas_dtrsm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), Double_val(alpha), &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_dtrsm_bc(value *argv, int argc) { return ml_gsl_blas_dtrsm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_dsyrk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _CONVERT_MATRIX2(A, C); gsl_blas_dsyrk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_dsyrk_bc(value *argv, int argc) { return ml_gsl_blas_dsyrk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_dsyr2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_dsyr2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_dsyr2k_bc(value *argv, int argc) { return ml_gsl_blas_dsyr2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } ocamlgsl-0.6.0/mlgsl_blas_float.c0000664000076400007640000001653510600031632015505 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "mlgsl_vector_float.h" #include "mlgsl_matrix_float.h" #include "mlgsl_blas.h" /* LEVEL1 float */ CAMLprim value ml_gsl_blas_sdsdot(value alpha, value X, value Y) { float r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_sdsdot(Double_val(alpha), &v_X, &v_Y, &r); return copy_double(r); } CAMLprim value ml_gsl_blas_dsdot(value X, value Y) { double r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_dsdot(&v_X, &v_Y, &r); return copy_double(r); } CAMLprim value ml_gsl_blas_sdot(value X, value Y) { float r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_sdot(&v_X, &v_Y, &r); return copy_double(r); } CAMLprim value ml_gsl_blas_snrm2(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_snrm2(&v_X)); } CAMLprim value ml_gsl_blas_sasum(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_sasum(&v_X)); } CAMLprim value ml_gsl_blas_isamax(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return Val_int(gsl_blas_isamax(&v_X)); } CAMLprim value ml_gsl_blas_sswap(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_sswap(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_scopy(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_scopy(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_saxpy(value alpha, value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_saxpy(Double_val(alpha), &v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_srot(value X, value Y, value c, value s) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_srot(&v_X, &v_Y, Double_val(c), Double_val(s)); return Val_unit; } CAMLprim value ml_gsl_blas_sscal(value alpha, value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); gsl_blas_sscal(Double_val(alpha), &v_X); return Val_unit; } /* LEVEL2 float */ CAMLprim value ml_gsl_blas_sgemv(value transa, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_sgemv(CBLAS_TRANS_val(transa), Double_val(alpha), &m_A, &v_X, Double_val(beta), &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_sgemv_bc(value *argv, int argc) { return ml_gsl_blas_sgemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_strmv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_strmv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_strsv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_strsv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_ssymv(value uplo, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_ssymv(CBLAS_UPLO_val(uplo), Double_val(alpha), &m_A, &v_X, Double_val(beta), &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_ssymv_bc(value *argv, int argc) { return ml_gsl_blas_ssymv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_sger(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_sger(Double_val(alpha), &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_ssyr(value uplo ,value alpha, value X, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_ssyr(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_ssyr2(value uplo ,value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X, Y); gsl_blas_ssyr2(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &v_Y, &m_A); return Val_unit; } /* LEVEL3 float */ CAMLprim value ml_gsl_blas_sgemm(value transa, value transb, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_sgemm(CBLAS_TRANS_val(transa), CBLAS_TRANS_val(transb), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_sgemm_bc(value *argv, int argc) { return ml_gsl_blas_sgemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ssymm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_ssymm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_ssymm_bc(value *argv, int argc) { return ml_gsl_blas_ssymm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ssyrk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _CONVERT_MATRIX2(A, C); gsl_blas_ssyrk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_ssyrk_bc(value *argv, int argc) { return ml_gsl_blas_ssyrk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_ssyr2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_blas_ssyr2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_ssyr2k_bc(value *argv, int argc) { return ml_gsl_blas_ssyr2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_strmm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _CONVERT_MATRIX2(A, B); gsl_blas_strmm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), Double_val(alpha), &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_strmm_bc(value *argv, int argc) { return ml_gsl_blas_strmm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_strsm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _CONVERT_MATRIX2(A, B); gsl_blas_strsm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), Double_val(alpha), &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_strsm_bc(value *argv, int argc) { return ml_gsl_blas_strsm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } ocamlgsl-0.6.0/mlgsl_blas_complex.c0000664000076400007640000002272610600031632016046 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "mlgsl_complex.h" #include "mlgsl_vector_complex.h" #include "mlgsl_matrix_complex.h" #include "mlgsl_blas.h" /* LEVEL1 complex */ CAMLprim value ml_gsl_blas_zdotu(value X, value Y) { gsl_complex r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_zdotu(&v_X, &v_Y, &r); return copy_complex(&r); } CAMLprim value ml_gsl_blas_zdotc(value X, value Y) { gsl_complex r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_zdotc(&v_X, &v_Y, &r); return copy_complex(&r); } CAMLprim value ml_gsl_blas_znrm2(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_dznrm2(&v_X)); } CAMLprim value ml_gsl_blas_zasum(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_dzasum(&v_X)); } CAMLprim value ml_gsl_blas_izamax(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return Val_int(gsl_blas_izamax(&v_X)); } CAMLprim value ml_gsl_blas_zswap(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_zswap(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_zcopy(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_zcopy(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_zaxpy(value alpha, value X, value Y) { _DECLARE_VECTOR2(X, Y); _DECLARE_COMPLEX(alpha); _CONVERT_VECTOR2(X, Y); _CONVERT_COMPLEX(alpha); gsl_blas_zaxpy(z_alpha, &v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_zscal(value alpha, value X) { _DECLARE_VECTOR(X); _DECLARE_COMPLEX(alpha); _CONVERT_VECTOR(X); _CONVERT_COMPLEX(alpha); gsl_blas_zscal(z_alpha, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_zdscal(value alpha, value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); gsl_blas_zdscal(Double_val(alpha), &v_X); return Val_unit; } /* LEVEL2 complex */ CAMLprim value ml_gsl_blas_zgemv(value transa, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX2(alpha, beta); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_COMPLEX2(alpha, beta); _CONVERT_VECTOR2(X, Y); gsl_blas_zgemv(CBLAS_TRANS_val(transa), z_alpha, &m_A, &v_X, z_beta, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_zgemv_bc(value *argv, int argc) { return ml_gsl_blas_zgemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_ztrmv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_ztrmv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_ztrsv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_ztrsv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_zhemv(value uplo, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX2(alpha, beta); _DECLARE_VECTOR2(X,Y); _CONVERT_MATRIX(A); _CONVERT_COMPLEX2(alpha, beta); _CONVERT_VECTOR2(X,Y); gsl_blas_zhemv(CBLAS_UPLO_val(uplo), z_alpha, &m_A, &v_X, z_beta, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_zhemv_bc(value *argv, int argc) { return ml_gsl_blas_zhemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_zgeru(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_zgeru(z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_zgerc(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_zgerc(z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_zher(value uplo, value alpha, value X, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_zher(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_zher2(value uplo, value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_zher2(CBLAS_UPLO_val(uplo), z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } /* LEVEL3 complex */ CAMLprim value ml_gsl_blas_zgemm(value transa, value transb, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_zgemm(CBLAS_TRANS_val(transa), CBLAS_TRANS_val(transb), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zgemm_bc(value *argv, int argc) { return ml_gsl_blas_zgemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_zsymm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_zsymm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zsymm_bc(value *argv, int argc) { return ml_gsl_blas_zsymm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_zsyrk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX2(A, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_zsyrk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zsyrk_bc(value *argv, int argc) { return ml_gsl_blas_zsyrk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_zsyr2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_zsyr2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zsyr2k_bc(value *argv, int argc) { return ml_gsl_blas_zsyr2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ztrmm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX2(A, B); _CONVERT_COMPLEX(alpha); gsl_blas_ztrmm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), z_alpha, &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_ztrmm_bc(value *argv, int argc) { return ml_gsl_blas_ztrmm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ztrsm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX2(A, B); _CONVERT_COMPLEX(alpha); gsl_blas_ztrsm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), z_alpha, &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_ztrsm_bc(value *argv, int argc) { return ml_gsl_blas_ztrsm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_zhemm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_zhemm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zhemm_bc(value *argv, int argc) { return ml_gsl_blas_zhemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_zherk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _CONVERT_MATRIX2(A, C); gsl_blas_zherk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zherk_bc(value *argv, int argc) { return ml_gsl_blas_zherk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_zher2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX(alpha); gsl_blas_zher2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_zher2k_bc(value *argv, int argc) { return ml_gsl_blas_zher2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } ocamlgsl-0.6.0/mlgsl_blas_complex_float.c0000664000076400007640000002303110600031632017221 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #define FLOAT_COMPLEX #include "mlgsl_complex.h" #include "mlgsl_vector_complex_float.h" #include "mlgsl_matrix_complex_float.h" #include "mlgsl_blas.h" /* LEVEL1 complex float */ CAMLprim value ml_gsl_blas_cdotu(value X, value Y) { gsl_complex_float r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_cdotu(&v_X, &v_Y, &r); return copy_complex(&r); } CAMLprim value ml_gsl_blas_cdotc(value X, value Y) { gsl_complex_float r; _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_cdotc(&v_X, &v_Y, &r); return copy_complex(&r); } CAMLprim value ml_gsl_blas_scnrm2(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_scnrm2(&v_X)); } CAMLprim value ml_gsl_blas_scasum(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return copy_double(gsl_blas_scasum(&v_X)); } CAMLprim value ml_gsl_blas_icamax(value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); return Val_int(gsl_blas_icamax(&v_X)); } CAMLprim value ml_gsl_blas_cswap(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_cswap(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_ccopy(value X, value Y) { _DECLARE_VECTOR2(X, Y); _CONVERT_VECTOR2(X, Y); gsl_blas_ccopy(&v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_caxpy(value alpha, value X, value Y) { _DECLARE_VECTOR2(X, Y); _DECLARE_COMPLEX(alpha); _CONVERT_VECTOR2(X, Y); _CONVERT_COMPLEX(alpha); gsl_blas_caxpy(z_alpha, &v_X, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_cscal(value alpha, value X) { _DECLARE_VECTOR(X); _DECLARE_COMPLEX(alpha); _CONVERT_VECTOR(X); _CONVERT_COMPLEX(alpha); gsl_blas_cscal(z_alpha, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_csscal(value alpha, value X) { _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); gsl_blas_csscal(Double_val(alpha), &v_X); return Val_unit; } /* LEVEL2 complex float */ CAMLprim value ml_gsl_blas_cgemv(value transa, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX2(alpha, beta); _DECLARE_VECTOR2(X, Y); _CONVERT_MATRIX(A); _CONVERT_COMPLEX2(alpha, beta); _CONVERT_VECTOR2(X, Y); gsl_blas_cgemv(CBLAS_TRANS_val(transa), z_alpha, &m_A, &v_X, z_beta, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_cgemv_bc(value *argv, int argc) { return ml_gsl_blas_cgemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_ctrmv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_ctrmv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_ctrsv(value uplo, value transa, value diag, value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_ctrsv(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), &m_A, &v_X); return Val_unit; } CAMLprim value ml_gsl_blas_chemv(value uplo, value alpha, value A, value X, value beta, value Y) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX2(alpha, beta); _DECLARE_VECTOR2(X,Y); _CONVERT_MATRIX(A); _CONVERT_COMPLEX2(alpha, beta); _CONVERT_VECTOR2(X,Y); gsl_blas_chemv(CBLAS_UPLO_val(uplo), z_alpha, &m_A, &v_X, z_beta, &v_Y); return Val_unit; } CAMLprim value ml_gsl_blas_chemv_bc(value *argv, int argc) { return ml_gsl_blas_chemv(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_cgeru(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_cgeru(z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_cgerc(value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_cgerc(z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_cher(value uplo, value alpha, value X, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_blas_cher(CBLAS_UPLO_val(uplo), Double_val(alpha), &v_X, &m_A); return Val_unit; } CAMLprim value ml_gsl_blas_cher2(value uplo, value alpha, value X, value Y, value A) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(X,Y); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(X,Y); _CONVERT_COMPLEX(alpha); gsl_blas_cher2(CBLAS_UPLO_val(uplo), z_alpha, &v_X, &v_Y, &m_A); return Val_unit; } /* LEVEL3 complex float */ CAMLprim value ml_gsl_blas_cgemm(value transa, value transb, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_cgemm(CBLAS_TRANS_val(transa), CBLAS_TRANS_val(transb), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_cgemm_bc(value *argv, int argc) { return ml_gsl_blas_cgemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_csymm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_csymm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_csymm_bc(value *argv, int argc) { return ml_gsl_blas_csymm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_csyrk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX2(A, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_csyrk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_csyrk_bc(value *argv, int argc) { return ml_gsl_blas_csyrk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_csyr2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_csyr2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_csyr2k_bc(value *argv, int argc) { return ml_gsl_blas_csyr2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ctrmm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX2(A, B); _CONVERT_COMPLEX(alpha); gsl_blas_ctrmm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), z_alpha, &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_ctrmm_bc(value *argv, int argc) { return ml_gsl_blas_ctrmm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_ctrsm(value side, value uplo, value transa, value diag, value alpha, value A, value B) { _DECLARE_MATRIX2(A, B); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX2(A, B); _CONVERT_COMPLEX(alpha); gsl_blas_ctrsm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(transa), CBLAS_DIAG_val(diag), z_alpha, &m_A, &m_B); return Val_unit; } CAMLprim value ml_gsl_blas_ctrsm_bc(value *argv, int argc) { return ml_gsl_blas_ctrsm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_chemm(value side, value uplo, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX2(alpha, beta); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX2(alpha, beta); gsl_blas_chemm(CBLAS_SIDE_val(side), CBLAS_UPLO_val(uplo), z_alpha, &m_A, &m_B, z_beta, &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_chemm_bc(value *argv, int argc) { return ml_gsl_blas_chemm(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_blas_cherk(value uplo, value trans, value alpha, value A, value beta, value C) { _DECLARE_MATRIX2(A, C); _CONVERT_MATRIX2(A, C); gsl_blas_cherk(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), Double_val(alpha), &m_A, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_cherk_bc(value *argv, int argc) { return ml_gsl_blas_cherk(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_blas_cher2k(value uplo, value trans, value alpha, value A, value B, value beta, value C) { _DECLARE_MATRIX3(A, B, C); _DECLARE_COMPLEX(alpha); _CONVERT_MATRIX3(A, B, C); _CONVERT_COMPLEX(alpha); gsl_blas_cher2k(CBLAS_UPLO_val(uplo), CBLAS_TRANS_val(trans), z_alpha, &m_A, &m_B, Double_val(beta), &m_C); return Val_unit; } CAMLprim value ml_gsl_blas_cher2k_bc(value *argv, int argc) { return ml_gsl_blas_cher2k(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } ocamlgsl-0.6.0/gsl_fun.ml0000664000076400007640000000212310600031632014010 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type result = { res : float ; err : float ; } type result_e10 = { res_e10 : float ; err_e10 : float ; e10 : int ; } type mode = | DOUBLE | SIMPLE | APPROX external smash : result_e10 -> result = "ml_gsl_sf_result_smash_e" 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 ; } ocamlgsl-0.6.0/gsl_fun.mli0000664000076400007640000000320610600031632014164 0ustar olivoliv(* 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 ; } ocamlgsl-0.6.0/mlgsl_fun.c0000664000076400007640000002603310600031632014161 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" /* CALLBACKS */ double gslfun_callback(double x, void *params) { struct callback_params *p=params; value res; value v_x = copy_double(x); res=callback_exn(p->closure, v_x); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } double gslfun_callback_indir(double x, void *params) { value res; value v_x = copy_double(x); value *closure = params; res=callback_exn(*closure, v_x); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } /* FDF CALLBACKS */ double gslfun_callback_f(double x, void *params) { struct callback_params *p=params; value res; value v_x=copy_double(x); res=callback_exn(Field(p->closure, 0), v_x); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } double gslfun_callback_df(double x, void *params) { struct callback_params *p=params; value res; value v_x=copy_double(x); res=callback_exn(Field(p->closure, 1), v_x); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } void gslfun_callback_fdf(double x, void *params, double *f, double *df) { struct callback_params *p=params; value res; value v_x=copy_double(x); res=callback_exn(Field(p->closure, 2), v_x); if(Is_exception_result(res)){ *f=GSL_NAN; *df=GSL_NAN; return; } *f =Double_val(Field(res, 0)); *df=Double_val(Field(res, 1)); } /* MONTE CALLBACKS */ double gsl_monte_callback(double *x_arr, size_t dim, void *params) { struct callback_params *p=params; value res; memcpy(Double_array_val(p->dbl), x_arr, dim*sizeof(double)); res=callback_exn(p->closure, p->dbl); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } double gsl_monte_callback_fast(double *x_arr, size_t dim, void *params) { struct callback_params *p=params; value res; res=callback_exn(p->closure, (value)x_arr); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } /* MULTIROOT CALLBACKS */ int gsl_multiroot_callback(const gsl_vector *x, void *params, gsl_vector *F) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, f_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, f_arr, len); gsl_vector_view x_v, f_v; value res; x_v = gsl_vector_view_array(x_arr, len); f_v = gsl_vector_view_array(f_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); f_barr = alloc_bigarray_dims(barr_flags, 1, f_arr, len); res=callback2_exn(p->closure, x_barr, f_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_vector_memcpy(F, &f_v.vector); return GSL_SUCCESS; } int gsl_multiroot_callback_f(const gsl_vector *x, void *params, gsl_vector *F) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, f_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, f_arr, len); gsl_vector_view x_v, f_v; value res; x_v = gsl_vector_view_array(x_arr, len); f_v = gsl_vector_view_array(f_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); f_barr = alloc_bigarray_dims(barr_flags, 1, f_arr, len); res=callback2_exn(Field(p->closure, 0), x_barr, f_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_vector_memcpy(F, &f_v.vector); return GSL_SUCCESS; } int gsl_multiroot_callback_df(const gsl_vector *x, void *params, gsl_matrix *J) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, j_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, j_arr, len*len); gsl_vector_view x_v; gsl_matrix_view j_v; value res; x_v = gsl_vector_view_array(x_arr, len); j_v = gsl_matrix_view_array(j_arr, len, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); j_barr = alloc_bigarray_dims(barr_flags, 2, j_arr, len, len); res=callback2_exn(Field(p->closure, 1), x_barr, j_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_matrix_memcpy(J, &j_v.matrix); return GSL_SUCCESS; } int gsl_multiroot_callback_fdf(const gsl_vector *x, void *params, gsl_vector *F, gsl_matrix *J) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, f_barr, j_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, f_arr, len); LOCALARRAY(double, j_arr, len*len); gsl_vector_view x_v, f_v; gsl_matrix_view j_v; value res; x_v = gsl_vector_view_array(x_arr, len); f_v = gsl_vector_view_array(f_arr, len); j_v = gsl_matrix_view_array(j_arr, len, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); f_barr = alloc_bigarray_dims(barr_flags, 1, f_arr, len); j_barr = alloc_bigarray_dims(barr_flags, 2, j_arr, len, len); res=callback3_exn(Field(p->closure, 2), x_barr, f_barr, j_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_vector_memcpy(F, &f_v.vector); gsl_matrix_memcpy(J, &j_v.matrix); return GSL_SUCCESS; } /* MULTIMIN CALLBACKS */ double gsl_multimin_callback(const gsl_vector *x, void *params) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr; int len = x->size; LOCALARRAY(double, x_arr, len); gsl_vector_view x_v; value res; x_v = gsl_vector_view_array(x_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); res=callback_exn(p->closure, x_barr); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } double gsl_multimin_callback_f(const gsl_vector *x, void *params) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr; int len = x->size; LOCALARRAY(double, x_arr, len); gsl_vector_view x_v; value res; x_v = gsl_vector_view_array(x_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); res=callback_exn(Field(p->closure, 0), x_barr); if(Is_exception_result(res)) return GSL_NAN; return Double_val(res); } void gsl_multimin_callback_df(const gsl_vector *x, void *params, gsl_vector *G) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, g_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, g_arr, len); gsl_vector_view x_v, g_v; value res; x_v = gsl_vector_view_array(x_arr, len); g_v = gsl_vector_view_array(g_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); g_barr = alloc_bigarray_dims(barr_flags, 1, g_arr, len); res=callback2_exn(Field(p->closure, 1), x_barr, g_barr); if(Is_exception_result(res)){ /* the caml functions raised an exception but there's no way we can indicate this to GSL since the return type is void. So we set the out param G to NaN. */ gsl_vector_set_all(G, GSL_NAN); return; } gsl_vector_memcpy(G, &g_v.vector); } void gsl_multimin_callback_fdf(const gsl_vector *x, void *params, double *f, gsl_vector *G) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *p=params; value x_barr, g_barr; int len = x->size; LOCALARRAY(double, x_arr, len); LOCALARRAY(double, g_arr, len); gsl_vector_view x_v, g_v; value res; x_v = gsl_vector_view_array(x_arr, len); g_v = gsl_vector_view_array(g_arr, len); gsl_vector_memcpy(&x_v.vector, x); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, len); g_barr = alloc_bigarray_dims(barr_flags, 1, g_arr, len); res=callback2_exn(Field(p->closure, 2), x_barr, g_barr); if(Is_exception_result(res)){ *f=GSL_NAN; return; } gsl_vector_memcpy(G, &g_v.vector); *f=Double_val(res); } /* MULTIFIT CALLBACKS */ int gsl_multifit_callback_f(const gsl_vector *X, void *params, gsl_vector *F) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *parms=params; value x_barr, f_barr; size_t p = X->size; size_t n = F->size; LOCALARRAY(double, x_arr, p); LOCALARRAY(double, f_arr, n); gsl_vector_view x_v, f_v; value res; x_v = gsl_vector_view_array(x_arr, p); f_v = gsl_vector_view_array(f_arr, n); gsl_vector_memcpy(&x_v.vector, X); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, p); f_barr = alloc_bigarray_dims(barr_flags, 1, f_arr, n); res=callback2_exn(Field(parms->closure, 0), x_barr, f_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_vector_memcpy(F, &f_v.vector); return GSL_SUCCESS; } int gsl_multifit_callback_df(const gsl_vector *X, void *params, gsl_matrix *J) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *parms=params; value x_barr, j_barr; size_t p = X->size; size_t n = J->size1; LOCALARRAY(double, x_arr, p); LOCALARRAY(double, j_arr, n*p); gsl_vector_view x_v; gsl_matrix_view j_v; value res; x_v = gsl_vector_view_array(x_arr, p); j_v = gsl_matrix_view_array(j_arr, n, p); gsl_vector_memcpy(&x_v.vector, X); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, p); j_barr = alloc_bigarray_dims(barr_flags, 2, j_arr, n, p); res=callback2_exn(Field(parms->closure, 1), x_barr, j_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_matrix_memcpy(J, &j_v.matrix); return GSL_SUCCESS; } int gsl_multifit_callback_fdf(const gsl_vector *X, void *params, gsl_vector *F, gsl_matrix *J) { int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct callback_params *parms=params; value x_barr, f_barr, j_barr; size_t p = X->size; size_t n = F->size; LOCALARRAY(double, x_arr, p); LOCALARRAY(double, f_arr, n); LOCALARRAY(double, j_arr, n*p); gsl_vector_view x_v, f_v; gsl_matrix_view j_v; value res; x_v = gsl_vector_view_array(x_arr, p); f_v = gsl_vector_view_array(f_arr, n); j_v = gsl_matrix_view_array(j_arr, n, p); gsl_vector_memcpy(&x_v.vector, X); x_barr = alloc_bigarray_dims(barr_flags, 1, x_arr, p); f_barr = alloc_bigarray_dims(barr_flags, 1, f_arr, n); j_barr = alloc_bigarray_dims(barr_flags, 2, j_arr, n, p); res=callback3_exn(Field(parms->closure, 2), x_barr, f_barr, j_barr); if(Is_exception_result(res)) return GSL_FAILURE; gsl_vector_memcpy(F, &f_v.vector); gsl_matrix_memcpy(J, &j_v.matrix); return GSL_SUCCESS; } ocamlgsl-0.6.0/mlgsl_fun.h0000664000076400007640000000435210600031632014166 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include struct callback_params { value closure ; /* the closure(s) for the caml callback */ value dbl; /* a preallocated caml float array for monte callbacks */ union { gsl_function gf; gsl_function_fdf gfdf; gsl_monte_function mf; gsl_multiroot_function mrf; gsl_multiroot_function_fdf mrfdf; gsl_multimin_function mmf; gsl_multimin_function_fdf mmfdf; gsl_multifit_function_fdf mffdf; } gslfun ; }; extern double gslfun_callback(double, void *); extern double gslfun_callback_indir(double, void *); extern double gslfun_callback_f(double, void *); extern double gslfun_callback_df(double, void *); extern void gslfun_callback_fdf(double, void *, double *, double*); extern double gsl_monte_callback(double *, size_t , void *); extern double gsl_monte_callback_fast(double *, size_t , void *); extern int gsl_multiroot_callback(const gsl_vector *, void *, gsl_vector *); extern int gsl_multiroot_callback_f(const gsl_vector *, void *, gsl_vector *); extern int gsl_multiroot_callback_df(const gsl_vector *, void *, gsl_matrix *); extern int gsl_multiroot_callback_fdf(const gsl_vector *, void *, gsl_vector *, gsl_matrix *); extern double gsl_multimin_callback(const gsl_vector *, void *); extern double gsl_multimin_callback_f(const gsl_vector *, void *); extern void gsl_multimin_callback_df(const gsl_vector *, void *, gsl_vector *); extern void gsl_multimin_callback_fdf(const gsl_vector *, void *, double *, gsl_vector *); extern int gsl_multifit_callback_f(const gsl_vector *, void *, gsl_vector *); extern int gsl_multifit_callback_df(const gsl_vector *, void *, gsl_matrix *); extern int gsl_multifit_callback_fdf(const gsl_vector *, void *, gsl_vector *, gsl_matrix *); #define GSLFUN_CLOSURE(gf,v) \ gsl_function gf = { \ /*.function =*/ &gslfun_callback_indir, \ /*.params =*/ &v } ocamlgsl-0.6.0/gsl_permut.ml0000664000076400007640000000341610600031632014542 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Bigarray type permut = (int, int_elt, c_layout) Array1.t let of_array arr = Array1.of_array int c_layout arr let to_array perm = let len = Array1.dim perm in Array.init len (Array1.get perm) external init : permut -> unit = "ml_gsl_permutation_init" let create len = Array1.create int c_layout len let make len = let p = create len in init p ; p let swap p i j = let tmp_i = p.{i} in let tmp_j = p.{j} in p.{i} <- tmp_j ; p.{j} <- tmp_i let size = Array1.dim external _valid : permut -> bool = "ml_gsl_permutation_valid" let valid p = try _valid p with Gsl_error.Gsl_exn (Gsl_error.FAILURE, _) -> false external reverse : permut -> unit = "ml_gsl_permutation_reverse" external _inverse : src:permut -> dst:permut -> unit = "ml_gsl_permutation_inverse" let inverse p = let i = create (size p) in _inverse p i ; i external next : permut -> unit = "ml_gsl_permutation_next" external prev : permut -> unit = "ml_gsl_permutation_prev" external permute : permut -> 'a array -> unit = "ml_gsl_permute" external permute_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit = "ml_gsl_permute_barr" external permute_complex : permut -> Gsl_complex.complex_array -> unit = "ml_gsl_permute_complex" external permute_inverse : permut -> 'a array -> unit = "ml_gsl_permute_inverse" external permute_inverse_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit = "ml_gsl_permute_inverse_barr" external permute_inverse_complex : permut -> Gsl_complex.complex_array -> unit = "ml_gsl_permute_inverse_complex" ocamlgsl-0.6.0/gsl_permut.mli0000664000076400007640000000216110600031632014707 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Permutations *) type permut = (int, Bigarray.int_elt, Bigarray.c_layout) Bigarray.Array1.t val of_array : int array -> permut val to_array : permut -> int array val init : permut -> unit val create : int -> permut val make : int -> permut val swap : permut -> int -> int -> unit val size : permut -> int val valid : permut -> bool external reverse : permut -> unit = "ml_gsl_permutation_reverse" val inverse : permut -> permut external next : permut -> unit = "ml_gsl_permutation_next" external prev : permut -> unit = "ml_gsl_permutation_prev" external permute : permut -> 'a array -> unit = "ml_gsl_permute" external permute_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit = "ml_gsl_permute_barr" external permute_inverse : permut -> 'a array -> unit = "ml_gsl_permute_inverse" external permute_inverse_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit = "ml_gsl_permute_inverse_barr" ocamlgsl-0.6.0/mlgsl_permut.c0000664000076400007640000001152210600031632014702 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include "wrappers.h" #include "mlgsl_permut.h" CAMLprim value ml_gsl_permutation_init(value p) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permutation_init(&perm_p); return Val_unit; } CAMLprim value ml_gsl_permutation_valid(value p) { int r; GSL_PERMUT_OF_BIGARRAY(p); r = gsl_permutation_valid(&perm_p); return Val_negbool(r); } CAMLprim value ml_gsl_permutation_reverse(value p) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permutation_reverse(&perm_p); return Val_unit; } CAMLprim value ml_gsl_permutation_inverse(value src, value dst) { GSL_PERMUT_OF_BIGARRAY(src); GSL_PERMUT_OF_BIGARRAY(dst); gsl_permutation_inverse(&perm_dst, &perm_src); return Val_unit; } CAMLprim value ml_gsl_permutation_next(value p) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permutation_next(&perm_p); return Val_unit; } CAMLprim value ml_gsl_permutation_prev(value p) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permutation_prev(&perm_p); return Val_unit; } CAMLprim value ml_gsl_permute(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); if(Tag_val(arr) == Double_array_tag) gsl_permute(perm_p.data, Double_array_val(arr), 1, Double_array_length(arr)); else gsl_permute_long(perm_p.data, (value *)arr, 1, Array_length(arr)); return Val_unit; } CAMLprim value ml_gsl_permute_barr(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); struct caml_bigarray *barr = Bigarray_val(arr); enum caml_bigarray_kind kind = (barr->flags) & BIGARRAY_KIND_MASK ; switch(kind){ case BIGARRAY_FLOAT32: gsl_permute_float(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_FLOAT64: gsl_permute(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_SINT8: gsl_permute_char(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_UINT8: gsl_permute_uchar(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_SINT16: gsl_permute_short(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_UINT16: gsl_permute_ushort(perm_p.data, barr->data, 1, barr->dim[0]); break; #ifdef ARCH_SIXTYFOUR case BIGARRAY_INT64: #else case BIGARRAY_INT32: #endif case BIGARRAY_CAML_INT: case BIGARRAY_NATIVE_INT: gsl_permute_long(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_COMPLEX32: gsl_permute_complex_float(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_COMPLEX64: gsl_permute_complex(perm_p.data, barr->data, 1, barr->dim[0]); break; default: GSL_ERROR("data type not supported", GSL_EUNIMPL); } return Val_unit; } CAMLprim value ml_gsl_permute_complex(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permute_complex(perm_p.data, Double_array_val(arr), 1, Double_array_length(arr)/2); return Val_unit; } CAMLprim value ml_gsl_permute_inverse(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); if(Tag_val(arr) == Double_array_tag) gsl_permute_inverse(perm_p.data, Double_array_val(arr), 1, Double_array_length(arr)); else gsl_permute_long_inverse(perm_p.data, (value *)arr, 1, Array_length(arr)); return Val_unit; } CAMLprim value ml_gsl_permute_inverse_barr(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); struct caml_bigarray *barr = Bigarray_val(arr); enum caml_bigarray_kind kind = (barr->flags) & BIGARRAY_KIND_MASK ; switch(kind){ case BIGARRAY_FLOAT32: gsl_permute_float_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_FLOAT64: gsl_permute_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_SINT8: gsl_permute_char_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_UINT8: gsl_permute_uchar_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_SINT16: gsl_permute_short_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_UINT16: gsl_permute_ushort_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; #ifdef ARCH_SIXTYFOUR case BIGARRAY_INT64: #else case BIGARRAY_INT32: #endif case BIGARRAY_CAML_INT: case BIGARRAY_NATIVE_INT: gsl_permute_long_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_COMPLEX32: gsl_permute_complex_float_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; case BIGARRAY_COMPLEX64: gsl_permute_complex_inverse(perm_p.data, barr->data, 1, barr->dim[0]); break; default: GSL_ERROR("data type not supported", GSL_EUNIMPL); } return Val_unit; } CAMLprim value ml_gsl_permute_inverse_complex(value p, value arr) { GSL_PERMUT_OF_BIGARRAY(p); gsl_permute_complex_inverse(perm_p.data, Double_array_val(arr), 1, Double_array_length(arr)/2); return Val_unit; } ocamlgsl-0.6.0/mlgsl_permut.h0000664000076400007640000000066310600031632014713 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #define GSL_PERMUT_OF_BIGARRAY(arr) \ struct caml_bigarray *bigarr_##arr = Bigarray_val(arr); \ gsl_permutation perm_##arr = { \ /*.size =*/ bigarr_##arr->dim[0], \ /*.data =*/ bigarr_##arr->data } ocamlgsl-0.6.0/gsl_sort.ml0000664000076400007640000000437710600031632014224 0ustar olivoliv external vector : Gsl_vector.vector -> unit = "ml_gsl_sort_vector" external _vector_index : Gsl_permut.permut -> Gsl_vector.vector -> unit = "ml_gsl_sort_vector_index" let vector_index v = let p = Gsl_permut.create (Gsl_vector.length v) in _vector_index p v ; p external _vector_smallest : float array -> Gsl_vector.vector -> unit = "ml_gsl_sort_vector_smallest" external _vector_largest : float array -> Gsl_vector.vector -> unit = "ml_gsl_sort_vector_largest" let vector_smallest k v = let dest = Array.make k 0. in _vector_smallest dest v ; dest let vector_largest k v = let dest = Array.make k 0. in _vector_largest dest v ; dest external _vector_smallest_index : Gsl_permut.permut -> Gsl_vector.vector -> unit = "ml_gsl_sort_vector_smallest_index" external _vector_largest_index : Gsl_permut.permut -> Gsl_vector.vector -> unit = "ml_gsl_sort_vector_largest_index" let vector_smallest_index k v = let p = Gsl_permut.create k in _vector_smallest_index p v ; p let vector_largest_index k v = let p = Gsl_permut.create k in _vector_largest_index p v ; p external vector_flat : Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector" external _vector_flat_index : Gsl_permut.permut -> Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector_index" let vector_flat_index v = let p = Gsl_permut.create (Gsl_vector_flat.length v) in _vector_flat_index p v ; p external _vector_flat_smallest : float array -> Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector_smallest" external _vector_flat_largest : float array -> Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector_largest" let vector_flat_smallest k v = let dest = Array.make k 0. in _vector_flat_smallest dest v ; dest let vector_flat_largest k v = let dest = Array.make k 0. in _vector_flat_largest dest v ; dest external _vector_flat_smallest_index : Gsl_permut.permut -> Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector_smallest_index" external _vector_flat_largest_index : Gsl_permut.permut -> Gsl_vector_flat.vector -> unit = "ml_gsl_sort_vector_largest_index" let vector_flat_smallest_index k v = let p = Gsl_permut.create k in _vector_flat_smallest_index p v ; p let vector_flat_largest_index k v = let p = Gsl_permut.create k in _vector_flat_largest_index p v ; p ocamlgsl-0.6.0/gsl_sort.mli0000664000076400007640000000157010600031632014365 0ustar olivoliv(** Sorting *) val vector : Gsl_vector.vector -> unit val vector_index : Gsl_vector.vector -> Gsl_permut.permut val vector_smallest : int -> Gsl_vector.vector -> float array val vector_largest : int -> Gsl_vector.vector -> float array val vector_smallest_index : int -> Gsl_vector.vector -> Gsl_permut.permut val vector_largest_index : int -> Gsl_vector.vector -> Gsl_permut.permut val vector_flat : Gsl_vector_flat.vector -> unit val vector_flat_index : Gsl_vector_flat.vector -> Gsl_permut.permut val vector_flat_smallest : int -> Gsl_vector_flat.vector -> float array val vector_flat_largest : int -> Gsl_vector_flat.vector -> float array val vector_flat_smallest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut val vector_flat_largest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut ocamlgsl-0.6.0/mlgsl_sort.c0000664000076400007640000000315610600031632014361 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" #include "mlgsl_vector_double.h" #include "mlgsl_permut.h" CAMLprim value ml_gsl_sort_vector (value v) { _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector (&v_v); return Val_unit; } CAMLprim value ml_gsl_sort_vector_index (value p, value v) { GSL_PERMUT_OF_BIGARRAY(p); _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector_index (&perm_p, &v_v); return Val_unit; } CAMLprim value ml_gsl_sort_vector_smallest (value dest, value v) { _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector_smallest (Double_array_val (dest), Double_array_length (dest), &v_v); return Val_unit; } CAMLprim value ml_gsl_sort_vector_largest (value dest, value v) { _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector_largest (Double_array_val (dest), Double_array_length (dest), &v_v); return Val_unit; } CAMLprim value ml_gsl_sort_vector_smallest_index (value p, value v) { GSL_PERMUT_OF_BIGARRAY(p); _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector_smallest_index (perm_p.data, perm_p.size, &v_v); return Val_unit; } CAMLprim value ml_gsl_sort_vector_largest_index (value p, value v) { GSL_PERMUT_OF_BIGARRAY(p); _DECLARE_VECTOR(v); _CONVERT_VECTOR(v); gsl_sort_vector_largest_index (perm_p.data, perm_p.size, &v_v); return Val_unit; } ocamlgsl-0.6.0/gsl_linalg.ml0000664000076400007640000002472010600031632014475 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_vectmat open Gsl_complex (* Simple matrix multiplication *) external matmult : a:mat -> ?transpa:bool -> b:mat -> ?transpb:bool -> mat -> unit = "ml_gsl_linalg_matmult_mod" (* LU decomposition *) (* Low-level functions *) external _LU_decomp : mat -> Gsl_permut.permut -> int = "ml_gsl_linalg_LU_decomp" external _LU_solve : mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LU_solve" external _LU_svx : mat -> Gsl_permut.permut -> vec -> unit = "ml_gsl_linalg_LU_svx" external _LU_refine : a:mat -> lu:mat -> Gsl_permut.permut -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_LU_refine_bc" "ml_gsl_linalg_LU_refine" external _LU_invert : mat -> Gsl_permut.permut -> mat -> unit = "ml_gsl_linalg_LU_invert" external _LU_det : mat -> int -> float = "ml_gsl_linalg_LU_det" external _LU_lndet : mat -> float = "ml_gsl_linalg_LU_lndet" external _LU_sgndet : mat -> int -> int = "ml_gsl_linalg_LU_sgndet" (* Higher-level functions *) (* With these, the arguments are protected (copied) and necessary intermediate datastructures are allocated; *) let decomp_LU ?(protect=true) mat = let mA = mat_convert ~protect mat in let (len, _) = Gsl_vectmat.dims mA in let p = Gsl_permut.create len in let sign = _LU_decomp mA p in (mA, p, sign) let solve_LU ?(protect=true) mat b = let mA = mat_convert ~protect mat in let vB = vec_convert b in let (len, _) = Gsl_vectmat.dims mA in let p = Gsl_permut.create len in let _ = _LU_decomp mA p in let x = Gsl_vector_flat.create len in _LU_solve mA p vB (`VF x) ; x.Gsl_vector_flat.data let det_LU ?(protect=true) mat = let (lu, _, sign) = decomp_LU ~protect mat in _LU_det lu sign let invert_LU ?(protect=true) ?result mat = let (lu, lu_p, _) = decomp_LU ~protect mat in let result = match result with | Some r -> r | None -> Gsl_vectmat.tmp lu in _LU_invert lu lu_p result ; result (* Complex LU decomposition *) external complex_LU_decomp : cmat -> Gsl_permut.permut -> int = "ml_gsl_linalg_complex_LU_decomp" external complex_LU_solve : cmat -> Gsl_permut.permut -> b:cvec -> x:cvec -> unit = "ml_gsl_linalg_complex_LU_solve" external complex_LU_svx : cmat -> Gsl_permut.permut -> cvec -> unit = "ml_gsl_linalg_complex_LU_svx" external complex_LU_refine : a:cmat -> lu:cmat -> Gsl_permut.permut -> b:cvec -> x:cvec -> res:cvec -> unit = "ml_gsl_linalg_complex_LU_refine_bc" "ml_gsl_linalg_complex_LU_refine" external complex_LU_invert : cmat -> Gsl_permut.permut -> cmat -> unit = "ml_gsl_linalg_complex_LU_invert" external complex_LU_det : cmat -> int -> complex = "ml_gsl_linalg_complex_LU_det" external complex_LU_lndet : cmat -> float = "ml_gsl_linalg_complex_LU_lndet" external complex_LU_sgndet : cmat -> int -> complex = "ml_gsl_linalg_complex_LU_sgndet" (* QR decomposition *) external _QR_decomp : mat -> vec -> unit = "ml_gsl_linalg_QR_decomp" external _QR_solve : mat -> vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_solve" external _QR_svx : mat -> vec -> x:vec -> unit = "ml_gsl_linalg_QR_svx" external _QR_lssolve : mat -> vec -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_QR_lssolve" external _QR_QTvec : mat -> vec -> v:vec -> unit = "ml_gsl_linalg_QR_QTvec" external _QR_Qvec : mat -> vec -> v:vec -> unit = "ml_gsl_linalg_QR_Qvec" external _QR_Rsolve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_Rsolve" external _QR_Rsvx : mat -> x:vec -> unit = "ml_gsl_linalg_QR_Rsvx" external _QR_unpack : mat -> tau:vec -> q:mat -> r:mat -> unit = "ml_gsl_linalg_QR_unpack" external _QR_QRsolve : mat -> r:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_QRsolve" external _QR_update : mat -> r:mat -> w:vec -> v:vec -> unit = "ml_gsl_linalg_QR_update" external _R_solve : r:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_R_solve" (* external _R_svx : r:mat -> x:vec -> unit*) (* = "ml_gsl_linalg_R_svx"*) (* QR Decomposition with Column Pivoting *) external _QRPT_decomp : a:mat -> tau:vec -> p:Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_QRPT_decomp" external _QRPT_decomp2 : a:mat -> q:mat -> r:mat -> tau:vec -> p:Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_QRPT_decomp2_bc" "ml_gsl_linalg_QRPT_decomp2" external _QRPT_solve : qr:mat -> tau:vec -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_solve" external _QRPT_svx : qr:mat -> tau:vec -> p:Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_QRPT_svx" external _QRPT_QRsolve : q:mat -> r:mat -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_QRsolve" external _QRPT_update : q:mat -> r:mat -> p:Gsl_permut.permut -> u:vec -> v:vec -> unit = "ml_gsl_linalg_QRPT_update" external _QRPT_Rsolve : qr:mat -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_Rsolve" external _QRPT_Rsvx : qr:mat -> p:Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_QRPT_Rsolve" (* Singular Value Decomposition *) external _SV_decomp : a:mat -> v:mat -> s:vec -> work:vec -> unit = "ml_gsl_linalg_SV_decomp" external _SV_decomp_mod : a:mat -> x:mat -> v:mat -> s:vec -> work:vec -> unit = "ml_gsl_linalg_SV_decomp_mod" external _SV_decomp_jacobi : a:mat -> v:mat -> s:vec -> unit = "ml_gsl_linalg_SV_decomp_jacobi" external _SV_solve : u:mat -> v:mat -> s:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_SV_solve" (* LQ decomposition *) external _LQ_decomp : a:mat -> tau:vec -> unit = "ml_gsl_linalg_LQ_decomp" external _LQ_solve_T : lq:mat -> tau:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_solve_T" external _LQ_svx_T : lq:mat -> tau:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_svx_T" external _LQ_lssolve_T : lq:mat -> tau:vec -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_LQ_lssolve_T" external _LQ_Lsolve_T : lq:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_Lsolve_T" external _LQ_Lsvx_T : lq:mat -> x:vec -> unit = "ml_gsl_linalg_LQ_Lsvx_T" external _L_solve_T : l:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_L_solve_T" external _LQ_vecQ : lq:mat -> tau:vec -> v:vec -> unit = "ml_gsl_linalg_LQ_vecQ" external _LQ_vecQT : lq:mat -> tau:vec -> v:vec -> unit = "ml_gsl_linalg_LQ_vecQT" external _LQ_unpack : lq:mat -> tau:vec -> q:mat -> l:mat -> unit = "ml_gsl_linalg_LQ_unpack" external _LQ_update : q:mat -> r:mat -> v:vec -> w:vec -> unit = "ml_gsl_linalg_LQ_update" external _LQ_LQsolve : q:mat -> l:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_LQsolve" (* P^T L Q decomposition *) external _PTLQ_decomp : a:mat -> tau:vec -> Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_PTLQ_decomp" external _PTLQ_decomp2 : a:mat -> q:mat -> r:mat -> tau:vec -> Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_PTLQ_decomp2_bc" "ml_gsl_linalg_PTLQ_decomp2" external _PTLQ_solve_T : qr:mat -> tau:vec -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_solve_T" external _PTLQ_svx_T : lq:mat -> tau:vec -> Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_PTLQ_svx_T" external _PTLQ_LQsolve_T : q:mat -> l:mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_LQsolve_T" external _PTLQ_Lsolve_T : lq:mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_Lsolve_T" external _PTLQ_Lsvx_T : lq:mat -> Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_PTLQ_Lsvx_T" external _PTLQ_update : q:mat -> l:mat -> Gsl_permut.permut -> v:vec -> w:vec -> unit = "ml_gsl_linalg_PTLQ_update" (* Cholesky decomposition *) external cho_decomp : mat -> unit = "ml_gsl_linalg_cholesky_decomp" external cho_solve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_cholesky_solve" external cho_svx : mat -> vec -> unit = "ml_gsl_linalg_cholesky_svx" external cho_decomp_unit : mat -> vec -> unit = "ml_gsl_linalg_cholesky_decomp_unit" (* Tridiagonal Decomposition of Real Symmetric Matrices *) external symmtd_decomp : a:mat -> tau:vec -> unit = "ml_gsl_linalg_symmtd_decomp" external symmtd_unpack : a:mat -> tau:vec -> q:mat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_symmtd_unpack" external symmtd_unpack_T : a:mat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_symmtd_unpack_T" (* Tridiagonal Decomposition of Hermitian Matrices *) external hermtd_decomp : a:cmat -> tau:cvec -> unit = "ml_gsl_linalg_hermtd_decomp" external hermtd_unpack : a:cmat -> tau:cvec -> q:cmat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_hermtd_unpack" external hermtd_unpack_T : a:cmat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_hermtd_unpack_T" (* Bidiagonalization *) external bidiag_decomp : a:mat -> tau_u:vec -> tau_v:vec -> unit = "ml_gsl_linalg_bidiag_decomp" external bidiag_unpack : a:mat -> tau_u:vec -> u:mat -> tau_v:vec -> v:mat -> diag:vec -> superdiag:vec -> unit = "ml_gsl_linalg_bidiag_unpack_bc" "ml_gsl_linalg_bidiag_unpack" external bidiag_unpack2 : a:mat -> tau_u:vec -> tau_v:vec -> v:mat -> unit = "ml_gsl_linalg_bidiag_unpack2" external bidiag_unpack_B : a:mat -> diag:vec -> superdiag:vec -> unit = "ml_gsl_linalg_bidiag_unpack_B" (* Householder solver *) external _HH_solve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_HH_solve" external _HH_svx : mat -> vec -> unit = "ml_gsl_linalg_HH_svx" let solve_HH ?(protect=true) mat b = let mA = mat_convert ~protect mat in let vB = vec_convert b in let vX = Gsl_vector_flat.create (Gsl_vectmat.length vB) in _HH_solve mA vB (`VF vX) ; vX.Gsl_vector_flat.data (* Tridiagonal Systems *) external solve_symm_tridiag : diag:vec -> offdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_symm_tridiag" external solve_tridiag : diag:vec -> abovediag:vec -> belowdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_tridiag" external solve_symm_cyc_tridiag : diag:vec -> offdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_symm_cyc_tridiag" external solve_cyc_tridiag : diag:vec -> abovediag:vec -> belowdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_cyc_tridiag" (* exponential *) external _exponential : mat -> mat -> Gsl_fun.mode -> unit = "ml_gsl_linalg_exponential_ss" let exponential ?(mode=Gsl_fun.DOUBLE) mat = let mA = Gsl_vectmat.mat_convert mat in let eA = Gsl_vectmat.tmp mA in _exponential mA (eA : [`M of Gsl_matrix.matrix] :> mat) mode ; eA ocamlgsl-0.6.0/gsl_linalg.mli0000664000076400007640000002561110600031632014646 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Simple linear algebra operations *) open Gsl_vectmat open Gsl_complex (** {3 Simple matrix multiplication} *) (** [matmult a ~transpa b ~transpb c] stores in matrix [c] the product of matrices [a] and [b]. [transpa] or [transpb] allow transposition of either matrix, so it can compute a.b or Trans(a).b or a.Trans(b) or Trans(a).Trans(b) . See also {!Gsl_blas.gemm}. *) external matmult : a:mat -> ?transpa:bool -> b:mat -> ?transpb:bool -> mat -> unit = "ml_gsl_linalg_matmult_mod" (** {3 LU decomposition} *) (** {4 Low-level functions } *) external _LU_decomp : mat -> Gsl_permut.permut -> int = "ml_gsl_linalg_LU_decomp" external _LU_solve : mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LU_solve" external _LU_svx : mat -> Gsl_permut.permut -> vec -> unit = "ml_gsl_linalg_LU_svx" external _LU_refine : a:mat -> lu:mat -> Gsl_permut.permut -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_LU_refine_bc" "ml_gsl_linalg_LU_refine" external _LU_invert : mat -> Gsl_permut.permut -> mat -> unit = "ml_gsl_linalg_LU_invert" external _LU_det : mat -> int -> float = "ml_gsl_linalg_LU_det" external _LU_lndet : mat -> float = "ml_gsl_linalg_LU_lndet" external _LU_sgndet : mat -> int -> int = "ml_gsl_linalg_LU_sgndet" (** {4 Higher-level functions} *) (** With these, the arguments are protected (copied) and necessary intermediate datastructures are allocated; *) val decomp_LU : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> mat * Gsl_permut.permut * int val solve_LU : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> [< `A of float array | `VF of Gsl_vector_flat.vector | `V of Gsl_vector.vector] -> float array val det_LU : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> float val invert_LU : ?protect:bool -> ?result:mat -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> mat (** {3 Complex LU decomposition} *) external complex_LU_decomp : cmat -> Gsl_permut.permut -> int = "ml_gsl_linalg_complex_LU_decomp" external complex_LU_solve : cmat -> Gsl_permut.permut -> b:cvec -> x:cvec -> unit = "ml_gsl_linalg_complex_LU_solve" external complex_LU_svx : cmat -> Gsl_permut.permut -> cvec -> unit = "ml_gsl_linalg_complex_LU_svx" external complex_LU_refine : a:cmat -> lu:cmat -> Gsl_permut.permut -> b:cvec -> x:cvec -> res:cvec -> unit = "ml_gsl_linalg_complex_LU_refine_bc" "ml_gsl_linalg_complex_LU_refine" external complex_LU_invert : cmat -> Gsl_permut.permut -> cmat -> unit = "ml_gsl_linalg_complex_LU_invert" external complex_LU_det : cmat -> int -> complex = "ml_gsl_linalg_complex_LU_det" external complex_LU_lndet : cmat -> float = "ml_gsl_linalg_complex_LU_lndet" external complex_LU_sgndet : cmat -> int -> complex = "ml_gsl_linalg_complex_LU_sgndet" (** {3 QR decomposition} *) external _QR_decomp : mat -> vec -> unit = "ml_gsl_linalg_QR_decomp" external _QR_solve : mat -> vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_solve" external _QR_svx : mat -> vec -> x:vec -> unit = "ml_gsl_linalg_QR_svx" external _QR_lssolve : mat -> vec -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_QR_lssolve" external _QR_QTvec : mat -> vec -> v:vec -> unit = "ml_gsl_linalg_QR_QTvec" external _QR_Qvec : mat -> vec -> v:vec -> unit = "ml_gsl_linalg_QR_Qvec" external _QR_Rsolve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_Rsolve" external _QR_Rsvx : mat -> x:vec -> unit = "ml_gsl_linalg_QR_Rsvx" external _QR_unpack : mat -> tau:vec -> q:mat -> r:mat -> unit = "ml_gsl_linalg_QR_unpack" external _QR_QRsolve : mat -> r:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QR_QRsolve" external _QR_update : mat -> r:mat -> w:vec -> v:vec -> unit = "ml_gsl_linalg_QR_update" external _R_solve : r:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_R_solve" (* external _R_svx : r:mat -> x:vec -> unit*) (* = "ml_gsl_linalg_R_svx"*) (** {3 QR Decomposition with Column Pivoting} *) external _QRPT_decomp : a:mat -> tau:vec -> p:Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_QRPT_decomp" external _QRPT_decomp2 : a:mat -> q:mat -> r:mat -> tau:vec -> p:Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_QRPT_decomp2_bc" "ml_gsl_linalg_QRPT_decomp2" external _QRPT_solve : qr:mat -> tau:vec -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_solve" external _QRPT_svx : qr:mat -> tau:vec -> p:Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_QRPT_svx" external _QRPT_QRsolve : q:mat -> r:mat -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_QRsolve" external _QRPT_update : q:mat -> r:mat -> p:Gsl_permut.permut -> u:vec -> v:vec -> unit = "ml_gsl_linalg_QRPT_update" external _QRPT_Rsolve : qr:mat -> p:Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_QRPT_Rsolve" external _QRPT_Rsvx : qr:mat -> p:Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_QRPT_Rsolve" (** {3 Singular Value Decomposition} *) external _SV_decomp : a:mat -> v:mat -> s:vec -> work:vec -> unit = "ml_gsl_linalg_SV_decomp" external _SV_decomp_mod : a:mat -> x:mat -> v:mat -> s:vec -> work:vec -> unit = "ml_gsl_linalg_SV_decomp_mod" external _SV_decomp_jacobi : a:mat -> v:mat -> s:vec -> unit = "ml_gsl_linalg_SV_decomp_jacobi" external _SV_solve : u:mat -> v:mat -> s:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_SV_solve" (** {3 LQ decomposition} *) external _LQ_decomp : a:mat -> tau:vec -> unit = "ml_gsl_linalg_LQ_decomp" external _LQ_solve_T : lq:mat -> tau:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_solve_T" external _LQ_svx_T : lq:mat -> tau:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_svx_T" external _LQ_lssolve_T : lq:mat -> tau:vec -> b:vec -> x:vec -> res:vec -> unit = "ml_gsl_linalg_LQ_lssolve_T" external _LQ_Lsolve_T : lq:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_Lsolve_T" external _LQ_Lsvx_T : lq:mat -> x:vec -> unit = "ml_gsl_linalg_LQ_Lsvx_T" external _L_solve_T : l:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_L_solve_T" external _LQ_vecQ : lq:mat -> tau:vec -> v:vec -> unit = "ml_gsl_linalg_LQ_vecQ" external _LQ_vecQT : lq:mat -> tau:vec -> v:vec -> unit = "ml_gsl_linalg_LQ_vecQT" external _LQ_unpack : lq:mat -> tau:vec -> q:mat -> l:mat -> unit = "ml_gsl_linalg_LQ_unpack" external _LQ_update : q:mat -> r:mat -> v:vec -> w:vec -> unit = "ml_gsl_linalg_LQ_update" external _LQ_LQsolve : q:mat -> l:mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_LQ_LQsolve" (** {3 P^T L Q decomposition} *) external _PTLQ_decomp : a:mat -> tau:vec -> Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_PTLQ_decomp" external _PTLQ_decomp2 : a:mat -> q:mat -> r:mat -> tau:vec -> Gsl_permut.permut -> norm:vec -> int = "ml_gsl_linalg_PTLQ_decomp2_bc" "ml_gsl_linalg_PTLQ_decomp2" external _PTLQ_solve_T : qr:mat -> tau:vec -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_solve_T" external _PTLQ_svx_T : lq:mat -> tau:vec -> Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_PTLQ_svx_T" external _PTLQ_LQsolve_T : q:mat -> l:mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_LQsolve_T" external _PTLQ_Lsolve_T : lq:mat -> Gsl_permut.permut -> b:vec -> x:vec -> unit = "ml_gsl_linalg_PTLQ_Lsolve_T" external _PTLQ_Lsvx_T : lq:mat -> Gsl_permut.permut -> x:vec -> unit = "ml_gsl_linalg_PTLQ_Lsvx_T" external _PTLQ_update : q:mat -> l:mat -> Gsl_permut.permut -> v:vec -> w:vec -> unit = "ml_gsl_linalg_PTLQ_update" (** {3 Cholesky decomposition} *) external cho_decomp : mat -> unit = "ml_gsl_linalg_cholesky_decomp" external cho_solve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_cholesky_solve" external cho_svx : mat -> vec -> unit = "ml_gsl_linalg_cholesky_svx" external cho_decomp_unit : mat -> vec -> unit = "ml_gsl_linalg_cholesky_decomp_unit" (** {3 Tridiagonal Decomposition of Real Symmetric Matrices} *) external symmtd_decomp : a:mat -> tau:vec -> unit = "ml_gsl_linalg_symmtd_decomp" external symmtd_unpack : a:mat -> tau:vec -> q:mat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_symmtd_unpack" external symmtd_unpack_T : a:mat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_symmtd_unpack_T" (** {3 Tridiagonal Decomposition of Hermitian Matrices} *) external hermtd_decomp : a:cmat -> tau:cvec -> unit = "ml_gsl_linalg_hermtd_decomp" external hermtd_unpack : a:cmat -> tau:cvec -> q:cmat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_hermtd_unpack" external hermtd_unpack_T : a:cmat -> diag:vec -> subdiag:vec -> unit = "ml_gsl_linalg_hermtd_unpack_T" (** {3 Bidiagonalization} *) external bidiag_decomp : a:mat -> tau_u:vec -> tau_v:vec -> unit = "ml_gsl_linalg_bidiag_decomp" external bidiag_unpack : a:mat -> tau_u:vec -> u:mat -> tau_v:vec -> v:mat -> diag:vec -> superdiag:vec -> unit = "ml_gsl_linalg_bidiag_unpack_bc" "ml_gsl_linalg_bidiag_unpack" external bidiag_unpack2 : a:mat -> tau_u:vec -> tau_v:vec -> v:mat -> unit = "ml_gsl_linalg_bidiag_unpack2" external bidiag_unpack_B : a:mat -> diag:vec -> superdiag:vec -> unit = "ml_gsl_linalg_bidiag_unpack_B" (** {3 Householder solver} *) external _HH_solve : mat -> b:vec -> x:vec -> unit = "ml_gsl_linalg_HH_solve" external _HH_svx : mat -> vec -> unit = "ml_gsl_linalg_HH_svx" val solve_HH : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> [< `A of float array | `VF of Gsl_vector_flat.vector | `V of Gsl_vector.vector] -> float array (** {3 Tridiagonal Systems} *) external solve_symm_tridiag : diag:vec -> offdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_symm_tridiag" external solve_tridiag : diag:vec -> abovediag:vec -> belowdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_tridiag" external solve_symm_cyc_tridiag : diag:vec -> offdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_symm_cyc_tridiag" external solve_cyc_tridiag : diag:vec -> abovediag:vec -> belowdiag:vec -> b:vec -> x:vec -> unit = "ml_gsl_linalg_solve_cyc_tridiag" (** {3 Exponential} *) external _exponential : mat -> mat -> Gsl_fun.mode -> unit = "ml_gsl_linalg_exponential_ss" val exponential : ?mode:Gsl_fun.mode -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int] -> [ `M of Gsl_matrix.matrix] ocamlgsl-0.6.0/mlgsl_linalg.c0000664000076400007640000004774310600031632014652 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "mlgsl_matrix_double.h" #include "mlgsl_vector_double.h" #include "mlgsl_permut.h" /* simple matrix operations */ CAMLprim value ml_gsl_linalg_matmult_mod(value A, value omodA, value B, value omodB, value C) { gsl_linalg_matrix_mod_t modA = Opt_arg(omodA, Int_val, GSL_LINALG_MOD_NONE); gsl_linalg_matrix_mod_t modB = Opt_arg(omodB, Int_val, GSL_LINALG_MOD_NONE); _DECLARE_MATRIX3(A, B, C); _CONVERT_MATRIX3(A, B, C); gsl_linalg_matmult_mod(&m_A, modA, &m_B, modB, &m_C); return Val_unit; } /* LU decomposition */ CAMLprim value ml_gsl_linalg_LU_decomp(value A, value P) { int sign; GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); gsl_linalg_LU_decomp(&m_A, &perm_P, &sign); return Val_int(sign); } CAMLprim value ml_gsl_linalg_LU_solve(value LU, value P, value B, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(LU); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(LU); _CONVERT_VECTOR2(B,X); gsl_linalg_LU_solve(&m_LU, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LU_svx(value LU, value P, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(LU); _DECLARE_VECTOR(X); _CONVERT_MATRIX(LU); _CONVERT_VECTOR(X); gsl_linalg_LU_svx(&m_LU, &perm_P, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LU_refine(value A, value LU, value P, value B, value X, value RES) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(A, LU); _DECLARE_VECTOR3(B, X, RES); _CONVERT_MATRIX2(A, LU); _CONVERT_VECTOR3(B, X, RES); gsl_linalg_LU_refine(&m_A, &m_LU, &perm_P, &v_B, &v_X, &v_RES); return Val_unit; } CAMLprim value ml_gsl_linalg_LU_refine_bc(value *argv, int argc) { return ml_gsl_linalg_LU_refine(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_linalg_LU_invert(value LU, value P, value INV) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(LU, INV); _CONVERT_MATRIX2(LU, INV); gsl_linalg_LU_invert(&m_LU, &perm_P, &m_INV); return Val_unit; } CAMLprim value ml_gsl_linalg_LU_det(value LU, value sig) { _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); return copy_double(gsl_linalg_LU_det(&m_LU, Int_val(sig))); } CAMLprim value ml_gsl_linalg_LU_lndet(value LU) { _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); return copy_double(gsl_linalg_LU_lndet(&m_LU)); } CAMLprim value ml_gsl_linalg_LU_sgndet(value LU, value sig) { _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); return Val_int(gsl_linalg_LU_sgndet(&m_LU, Int_val(sig))); } /* QR decomposition */ CAMLprim value ml_gsl_linalg_QR_decomp(value A, value TAU) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(TAU); _CONVERT_MATRIX(A); _CONVERT_VECTOR(TAU); gsl_linalg_QR_decomp(&m_A, &v_TAU); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_solve(value QR, value TAU, value B, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR3(B,X,TAU); _CONVERT_MATRIX(QR); _CONVERT_VECTOR3(B,X,TAU); gsl_linalg_QR_solve(&m_QR, &v_TAU, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_svx(value QR, value TAU, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(TAU, X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(TAU, X); gsl_linalg_QR_svx(&m_QR, &v_TAU, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_lssolve(value QR, value TAU, value B, value X, value RES) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR4(TAU, RES, B, X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR4(TAU, RES, B, X); gsl_linalg_QR_lssolve(&m_QR, &v_TAU, &v_B, &v_X, &v_RES); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_QTvec(value QR, value TAU, value V) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(TAU, V); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(TAU, V); gsl_linalg_QR_QTvec(&m_QR, &v_TAU, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_Qvec(value QR, value TAU, value V) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(TAU, V); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(TAU, V); gsl_linalg_QR_Qvec(&m_QR, &v_TAU, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_Rsolve(value QR, value B, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(B,X); gsl_linalg_QR_Rsolve(&m_QR, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_Rsvx(value QR, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR(X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR(X); gsl_linalg_QR_Rsvx(&m_QR, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_unpack(value QR, value TAU, value Q, value R) { _DECLARE_MATRIX3(QR, Q, R); _DECLARE_VECTOR(TAU); _CONVERT_MATRIX3(QR, Q, R); _CONVERT_VECTOR(TAU); gsl_linalg_QR_unpack(&m_QR, &v_TAU, &m_Q, &m_R); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_QRsolve(value Q, value R, value B, value X) { _DECLARE_MATRIX2(Q, R); _DECLARE_VECTOR2(B, X); _CONVERT_MATRIX2(Q, R); _CONVERT_VECTOR2(B, X); gsl_linalg_QR_QRsolve(&m_Q, &m_R, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QR_update(value Q, value R, value W, value V) { _DECLARE_MATRIX2(Q, R); _DECLARE_VECTOR2(W, V); _CONVERT_MATRIX2(Q, R); _CONVERT_VECTOR2(W, V); gsl_linalg_QR_update(&m_Q, &m_R, &v_W, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_R_solve(value R, value B, value X) { _DECLARE_MATRIX(R); _DECLARE_VECTOR2(B, X); _CONVERT_MATRIX(R); _CONVERT_VECTOR2(B, X); gsl_linalg_R_solve(&m_R, &v_B, &v_X); return Val_unit; } /* missing ? */ /* value ml_gsl_linalg_R_svx(value R, value X) */ /* { */ /* DECLARE_MATRIX(R); */ /* DECLARE_VECTOR(X); */ /* gsl_linalg_R_svx(&m_R, &v_X); */ /* return Val_unit; */ /* } */ /* QR Decomposition with Column Pivoting */ CAMLprim value ml_gsl_linalg_QRPT_decomp(value A, value TAU, value P, value NORM) { int signum; GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(A); _DECLARE_VECTOR2(TAU, NORM); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(TAU, NORM); gsl_linalg_QRPT_decomp(&m_A, &v_TAU, &perm_P, &signum, &v_NORM); return Val_int(signum); } CAMLprim value ml_gsl_linalg_QRPT_decomp2(value A, value Q, value R, value TAU, value P, value NORM) { int signum; GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX3(A, Q, R); _DECLARE_VECTOR2(TAU, NORM); _CONVERT_MATRIX3(A, Q, R); _CONVERT_VECTOR2(TAU, NORM); gsl_linalg_QRPT_decomp2(&m_A, &m_Q, &m_R, &v_TAU, &perm_P, &signum, &v_NORM); return Val_int(signum); } CAMLprim value ml_gsl_linalg_QRPT_decomp2_bc(value *argv, int argc) { return ml_gsl_linalg_QRPT_decomp2(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_linalg_QRPT_solve(value QR, value TAU, value P, value B, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(QR); _DECLARE_VECTOR3(TAU, B, X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR3(TAU, B, X); gsl_linalg_QRPT_solve(&m_QR, &v_TAU, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QRPT_svx(value QR, value TAU, value P, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(TAU, X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(TAU, X); gsl_linalg_QRPT_svx(&m_QR, &v_TAU, &perm_P, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QRPT_QRsolve(value Q, value R, value P, value B, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(Q, R); _DECLARE_VECTOR2(B, X); _CONVERT_MATRIX2(Q, R); _CONVERT_VECTOR2(B, X); gsl_linalg_QRPT_QRsolve(&m_Q, &m_R, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QRPT_update(value Q, value R, value P, value U, value V) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(Q, R); _DECLARE_VECTOR2(U, V); _CONVERT_MATRIX2(Q, R); _CONVERT_VECTOR2(U, V); gsl_linalg_QRPT_update(&m_Q, &m_R, &perm_P, &v_U, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_QRPT_Rsolve(value QR, value P, value B, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(B, X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(B, X); gsl_linalg_QRPT_Rsolve(&m_QR, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_QRPT_Rsvx(value QR, value P, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(QR); _DECLARE_VECTOR(X); _CONVERT_MATRIX(QR); _CONVERT_VECTOR(X); gsl_linalg_QRPT_Rsvx(&m_QR, &perm_P, &v_X); return Val_unit; } /* Singular Value Decomposition */ CAMLprim value ml_gsl_linalg_SV_decomp(value A, value V, value S, value WORK) { _DECLARE_MATRIX2(A, V); _DECLARE_VECTOR2(S, WORK); _CONVERT_MATRIX2(A, V); _CONVERT_VECTOR2(S, WORK); gsl_linalg_SV_decomp(&m_A, &m_V, &v_S, &v_WORK); return Val_unit; } CAMLprim value ml_gsl_linalg_SV_decomp_mod(value A, value X, value V, value S, value WORK) { _DECLARE_MATRIX3(A, V, X); _DECLARE_VECTOR2(S, WORK); _CONVERT_MATRIX3(A, V, X); _CONVERT_VECTOR2(S, WORK); gsl_linalg_SV_decomp_mod(&m_A, &m_X, &m_V, &v_S, &v_WORK); return Val_unit; } CAMLprim value ml_gsl_linalg_SV_decomp_jacobi(value A, value V, value S) { _DECLARE_MATRIX2(A, V); _DECLARE_VECTOR(S); _CONVERT_MATRIX2(A, V); _CONVERT_VECTOR(S); gsl_linalg_SV_decomp_jacobi(&m_A, &m_V, &v_S); return Val_unit; } CAMLprim value ml_gsl_linalg_SV_solve(value U, value V, value S, value B, value X) { _DECLARE_MATRIX2(U, V); _DECLARE_VECTOR3(S, B, X); _CONVERT_MATRIX2(U, V); _CONVERT_VECTOR3(S, B, X); gsl_linalg_SV_solve(&m_U, &m_V, &v_S, &v_B, &v_X); return Val_unit; } /* LQ decomposition */ CAMLprim value ml_gsl_linalg_LQ_decomp(value A, value TAU) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(TAU); _CONVERT_MATRIX(A); _CONVERT_VECTOR(TAU); gsl_linalg_LQ_decomp(&m_A, &v_TAU); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_solve_T(value LQ, value TAU, value B, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR3(B,X,TAU); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR3(B,X,TAU); gsl_linalg_LQ_solve_T(&m_LQ, &v_TAU, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_svx_T(value LQ, value TAU, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR2(TAU, X); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR2(TAU, X); gsl_linalg_LQ_svx_T(&m_LQ, &v_TAU, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_lssolve_T(value LQ, value TAU, value B, value X, value RES) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR4(TAU, RES, B, X); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR4(TAU, RES, B, X); gsl_linalg_LQ_lssolve_T(&m_LQ, &v_TAU, &v_B, &v_X, &v_RES); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_Lsolve_T(value LQ, value B, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR2(B,X); gsl_linalg_LQ_Lsolve_T(&m_LQ, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_Lsvx_T(value LQ, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR(X); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR(X); gsl_linalg_LQ_Lsvx_T(&m_LQ, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_L_solve_T(value L, value B, value X) { _DECLARE_MATRIX(L); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(L); _CONVERT_VECTOR2(B,X); gsl_linalg_L_solve_T(&m_L, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_vecQ(value LQ, value TAU, value V) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR2(V,TAU); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR2(V,TAU); gsl_linalg_LQ_vecQ(&m_LQ, &v_TAU, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_vecQT(value LQ, value TAU, value V) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR2(V,TAU); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR2(V,TAU); gsl_linalg_LQ_vecQT(&m_LQ, &v_TAU, &v_V); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_unpack(value LQ, value TAU, value Q, value L) { _DECLARE_MATRIX3(LQ,Q,L); _DECLARE_VECTOR(TAU); _CONVERT_MATRIX3(LQ,Q,L); _CONVERT_VECTOR(TAU); gsl_linalg_LQ_unpack(&m_LQ, &v_TAU, &m_Q, &m_L); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_update(value LQ, value R, value V, value W) { _DECLARE_MATRIX2(LQ,R); _DECLARE_VECTOR2(V,W); _CONVERT_MATRIX2(LQ,R); _CONVERT_VECTOR2(V,W); gsl_linalg_LQ_update(&m_LQ, &m_R, &v_V, &v_W); return Val_unit; } CAMLprim value ml_gsl_linalg_LQ_LQsolve(value Q, value L, value B, value X) { _DECLARE_MATRIX2(Q,L); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX2(Q,L); _CONVERT_VECTOR2(B,X); gsl_linalg_LQ_LQsolve(&m_Q, &m_L, &v_B, &v_X); return Val_unit; } /* P^T L Q decomposition */ CAMLprim value ml_gsl_linalg_PTLQ_decomp (value A, value TAU, value P, value NORM) { int signum; _DECLARE_MATRIX(A); _DECLARE_VECTOR2(TAU,NORM); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(TAU,NORM); gsl_linalg_PTLQ_decomp (&m_A, &v_TAU, &perm_P, &signum, &v_NORM); return Val_int (signum); } CAMLprim value ml_gsl_linalg_PTLQ_decomp2 (value A, value Q, value R, value TAU, value P, value NORM) { int signum; _DECLARE_MATRIX3(A,Q,R); _DECLARE_VECTOR2(TAU,NORM); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX3(A,Q,R); _CONVERT_VECTOR2(TAU,NORM); gsl_linalg_PTLQ_decomp2 (&m_A, &m_Q, &m_R, &v_TAU, &perm_P, &signum, &v_NORM); return Val_int (signum); } CAMLprim value ml_gsl_linalg_PTLQ_decomp2_bc (value *argv, int argc) { return ml_gsl_linalg_PTLQ_decomp2 (argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_linalg_PTLQ_solve_T (value QR, value TAU, value P, value B, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR3(TAU,B,X); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX(QR); _CONVERT_VECTOR3(TAU,B,X); gsl_linalg_PTLQ_solve_T (&m_QR, &v_TAU, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_PTLQ_svx_T (value QR, value TAU, value P, value X) { _DECLARE_MATRIX(QR); _DECLARE_VECTOR2(TAU,X); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX(QR); _CONVERT_VECTOR2(TAU,X); gsl_linalg_PTLQ_svx_T (&m_QR, &v_TAU, &perm_P, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_PTLQ_LQsolve_T (value Q, value L, value P, value B, value X) { _DECLARE_MATRIX2(Q,L); _DECLARE_VECTOR2(B,X); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX2(Q,L); _CONVERT_VECTOR2(B,X); gsl_linalg_PTLQ_LQsolve_T (&m_Q, &m_L, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_PTLQ_Lsolve_T (value LQ, value P, value B, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR2(B,X); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR2(B,X); gsl_linalg_PTLQ_Lsolve_T (&m_LQ, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_PTLQ_Lsvx_T (value LQ, value P, value X) { _DECLARE_MATRIX(LQ); _DECLARE_VECTOR(X); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX(LQ); _CONVERT_VECTOR(X); gsl_linalg_PTLQ_Lsvx_T (&m_LQ, &perm_P, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_PTLQ_update (value Q, value L, value P, value V, value W) { _DECLARE_MATRIX2(Q,L); _DECLARE_VECTOR2(V,W); GSL_PERMUT_OF_BIGARRAY(P); _CONVERT_MATRIX2(Q,L); _CONVERT_VECTOR2(V,W); gsl_linalg_PTLQ_update (&m_Q, &m_L, &perm_P, &v_V, &v_W); return Val_unit; } /* Cholesky decomposition */ CAMLprim value ml_gsl_linalg_cholesky_decomp(value A) { _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); gsl_linalg_cholesky_decomp(&m_A); return Val_unit; } CAMLprim value ml_gsl_linalg_cholesky_solve(value CHO, value B, value X) { _DECLARE_MATRIX(CHO); _DECLARE_VECTOR2(B, X); _CONVERT_MATRIX(CHO); _CONVERT_VECTOR2(B, X); gsl_linalg_cholesky_solve(&m_CHO, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_cholesky_svx(value CHO, value X) { _DECLARE_MATRIX(CHO); _DECLARE_VECTOR(X); _CONVERT_MATRIX(CHO); _CONVERT_VECTOR(X); gsl_linalg_cholesky_svx(&m_CHO, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_cholesky_decomp_unit(value CHO, value D) { _DECLARE_MATRIX(CHO); _DECLARE_VECTOR(D); _CONVERT_MATRIX(CHO); _CONVERT_VECTOR(D); gsl_linalg_cholesky_decomp_unit(&m_CHO, &v_D); return Val_unit; } /* Tridiagonal Decomposition of Real Symmetric Matrices */ CAMLprim value ml_gsl_linalg_symmtd_decomp(value A, value TAU) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(TAU); _CONVERT_MATRIX(A); _CONVERT_VECTOR(TAU); gsl_linalg_symmtd_decomp(&m_A, &v_TAU); return Val_unit; } CAMLprim value ml_gsl_linalg_symmtd_unpack(value A, value TAU, value Q, value DIAG, value SUBDIAG) { _DECLARE_MATRIX2(A, Q); _DECLARE_VECTOR3(TAU, DIAG, SUBDIAG); _CONVERT_MATRIX2(A, Q); _CONVERT_VECTOR3(TAU, DIAG, SUBDIAG); gsl_linalg_symmtd_unpack(&m_A, &v_TAU, &m_Q, &v_DIAG, &v_SUBDIAG); return Val_unit; } CAMLprim value ml_gsl_linalg_symmtd_unpack_T(value A, value DIAG, value SUBDIAG) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(DIAG, SUBDIAG); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(DIAG, SUBDIAG); gsl_linalg_symmtd_unpack_T(&m_A, &v_DIAG, &v_SUBDIAG); return Val_unit; } /* Tridiagonal Decomposition of Hermitian Matrices */ /* Bidiagonalization */ CAMLprim value ml_gsl_linalg_bidiag_decomp(value A, value TAU_U, value TAU_V) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(TAU_U, TAU_V); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(TAU_U, TAU_V); gsl_linalg_bidiag_decomp(&m_A, &v_TAU_U, &v_TAU_V); return Val_unit; } CAMLprim value ml_gsl_linalg_bidiag_unpack(value A, value TAU_U, value U, value TAU_V, value V, value DIAG, value SUPERDIAG) { _DECLARE_MATRIX3(A, U, V); _DECLARE_VECTOR4(TAU_U, TAU_V, DIAG, SUPERDIAG); _CONVERT_MATRIX3(A, U, V); _CONVERT_VECTOR4(TAU_U, TAU_V, DIAG, SUPERDIAG); gsl_linalg_bidiag_unpack(&m_A, &v_TAU_U, &m_U, &v_TAU_V, &m_V, &v_DIAG, &v_SUPERDIAG); return Val_unit; } CAMLprim value ml_gsl_linalg_bidiag_unpack_bc(value *argv, int argc) { return ml_gsl_linalg_bidiag_unpack(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); } CAMLprim value ml_gsl_linalg_bidiag_unpack2(value A, value TAU_U, value TAU_V, value V) { _DECLARE_MATRIX2(A, V); _DECLARE_VECTOR2(TAU_U, TAU_V); _CONVERT_MATRIX2(A, V); _CONVERT_VECTOR2(TAU_U, TAU_V); gsl_linalg_bidiag_unpack2(&m_A, &v_TAU_U, &v_TAU_V, &m_V); return Val_unit; } CAMLprim value ml_gsl_linalg_bidiag_unpack_B(value A, value DIAG, value SUPERDIAG) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(DIAG, SUPERDIAG); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(DIAG, SUPERDIAG); gsl_linalg_bidiag_unpack_B(&m_A, &v_DIAG, &v_SUPERDIAG); return Val_unit; } /* Householder solver */ CAMLprim value ml_gsl_linalg_HH_solve(value A, value B, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(A); _CONVERT_VECTOR2(B,X); gsl_linalg_HH_solve(&m_A, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_HH_svx(value A, value X) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(X); _CONVERT_MATRIX(A); _CONVERT_VECTOR(X); gsl_linalg_HH_svx(&m_A, &v_X); return Val_unit; } /* Tridiagonal Systems */ CAMLprim value ml_gsl_linalg_solve_symm_tridiag(value DIAG, value E, value B, value X) { _DECLARE_VECTOR4(DIAG, E, B, X); _CONVERT_VECTOR4(DIAG, E, B, X); gsl_linalg_solve_symm_tridiag(&v_DIAG, &v_E, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_solve_tridiag(value DIAG, value ABOVE, value BELOW, value B, value X) { _DECLARE_VECTOR5(DIAG, ABOVE, BELOW, B, X); _CONVERT_VECTOR5(DIAG, ABOVE, BELOW, B, X); gsl_linalg_solve_tridiag(&v_DIAG, &v_ABOVE, &v_BELOW, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_solve_symm_cyc_tridiag(value DIAG, value E, value B, value X) { _DECLARE_VECTOR4(DIAG, E, B, X); _CONVERT_VECTOR4(DIAG, E, B, X); gsl_linalg_solve_symm_cyc_tridiag(&v_DIAG, &v_E, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_solve_cyc_tridiag(value DIAG, value ABOVE, value BELOW, value B, value X) { _DECLARE_VECTOR5(DIAG, ABOVE, BELOW, B, X); _CONVERT_VECTOR5(DIAG, ABOVE, BELOW, B, X); gsl_linalg_solve_cyc_tridiag(&v_DIAG, &v_ABOVE, &v_BELOW, &v_B, &v_X); return Val_unit; } /* exponential */ #define GSL_MODE_val Int_val CAMLprim value ml_gsl_linalg_exponential_ss(value A, value eA, value mode) { _DECLARE_MATRIX2(A, eA); _CONVERT_MATRIX2(A, eA); gsl_linalg_exponential_ss(&m_A, &m_eA, GSL_MODE_val(mode)); return Val_unit; } ocamlgsl-0.6.0/mlgsl_linalg_complex.c0000664000076400007640000000734210600031632016370 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "mlgsl_matrix_complex.h" #include "mlgsl_vector_complex.h" #include "mlgsl_permut.h" #include "mlgsl_complex.h" /* Complex LU decomposition */ CAMLprim value ml_gsl_linalg_complex_LU_decomp(value A, value P) { int sign; GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); gsl_linalg_complex_LU_decomp(&m_A, &perm_P, &sign); return Val_int(sign); } CAMLprim value ml_gsl_linalg_complex_LU_solve(value LU, value P, value B, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(LU); _DECLARE_VECTOR2(B,X); _CONVERT_MATRIX(LU); _CONVERT_VECTOR2(B,X); gsl_linalg_complex_LU_solve(&m_LU, &perm_P, &v_B, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_complex_LU_svx(value LU, value P, value X) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX(LU); _DECLARE_VECTOR(X); _CONVERT_MATRIX(LU); _CONVERT_VECTOR(X); gsl_linalg_complex_LU_svx(&m_LU, &perm_P, &v_X); return Val_unit; } CAMLprim value ml_gsl_linalg_complex_LU_refine(value A, value LU, value P, value B, value X, value RES) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(A, LU); _DECLARE_VECTOR3(B, X, RES); _CONVERT_MATRIX2(A, LU); _CONVERT_VECTOR3(B, X, RES); gsl_linalg_complex_LU_refine(&m_A, &m_LU, &perm_P, &v_B, &v_X, &v_RES); return Val_unit; } CAMLprim value ml_gsl_linalg_complex_LU_refine_bc(value *argv, int argc) { return ml_gsl_linalg_complex_LU_refine(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_linalg_complex_LU_invert(value LU, value P, value INV) { GSL_PERMUT_OF_BIGARRAY(P); _DECLARE_MATRIX2(LU, INV); _CONVERT_MATRIX2(LU, INV); gsl_linalg_complex_LU_invert(&m_LU, &perm_P, &m_INV); return Val_unit; } CAMLprim value ml_gsl_linalg_complex_LU_det(value LU, value sig) { gsl_complex z; _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); z = gsl_linalg_complex_LU_det(&m_LU, Int_val(sig)); return copy_complex(&z); } CAMLprim value ml_gsl_linalg_complex_LU_lndet(value LU) { _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); return copy_double(gsl_linalg_complex_LU_lndet(&m_LU)); } CAMLprim value ml_gsl_linalg_complex_LU_sgndet(value LU, value sig) { gsl_complex z; _DECLARE_MATRIX(LU); _CONVERT_MATRIX(LU); z = gsl_linalg_complex_LU_sgndet(&m_LU, Int_val(sig)) ; return copy_complex(&z); } /* Hermitian to symmetric tridiagonal decomposition */ /* Those are tricky 'coz they mix real & complex matrices ... */ #undef BASE_TYPE #undef TYPE #undef _DECLARE_BASE_TYPE #undef _CONVERT_BASE_TYPE #undef DECLARE_BASE_TYPE #undef FUNCTION #include "mlgsl_matrix_double.h" #include "mlgsl_vector_double.h" CAMLprim value ml_gsl_linalg_hermtd_decomp (value A, value tau) { _DECLARE_COMPLEX_MATRIX(A); _DECLARE_COMPLEX_VECTOR(tau); _CONVERT_COMPLEX_MATRIX(A); _CONVERT_COMPLEX_VECTOR(tau); gsl_linalg_hermtd_decomp(&m_A, &v_tau); return Val_unit; } CAMLprim value ml_gsl_linalg_hermtd_unpack (value A, value tau, value Q, value diag, value subdiag) { _DECLARE_COMPLEX_VECTOR(tau); _DECLARE_VECTOR2(diag,subdiag); _DECLARE_COMPLEX_MATRIX2(A,Q); _CONVERT_COMPLEX_VECTOR(tau); _CONVERT_VECTOR2(diag,subdiag); _CONVERT_COMPLEX_MATRIX2(A,Q); gsl_linalg_hermtd_unpack(&m_A, &v_tau, &m_Q, &v_diag, &v_subdiag); return Val_unit; } CAMLprim value ml_gsl_linalg_hermtd_unpack_T (value A, value diag, value subdiag) { _DECLARE_COMPLEX_MATRIX(A); _DECLARE_VECTOR2(diag,subdiag); _CONVERT_COMPLEX_MATRIX(A); _CONVERT_VECTOR2(diag,subdiag); gsl_linalg_hermtd_unpack_T(&m_A, &v_diag, &v_subdiag); return Val_unit; } ocamlgsl-0.6.0/gsl_eigen.ml0000664000076400007640000001141210607755005014326 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_vectmat type symm_ws external _symm_alloc : int -> symm_ws = "ml_gsl_eigen_symm_alloc" external _symm_free : symm_ws -> unit = "ml_gsl_eigen_symm_free" let make_symm_ws s = let ws = _symm_alloc s in Gc.finalise _symm_free ws ; ws external _symm : mat -> vec -> symm_ws -> unit = "ml_gsl_eigen_symm" let symm ?protect a = let a' = Gsl_vectmat.mat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector.create n in let ws = _symm_alloc n in begin try _symm a' (`V v) ws with exn -> _symm_free ws ; raise exn end ; _symm_free ws ; v type symmv_ws external _symmv_alloc_v : int -> symmv_ws = "ml_gsl_eigen_symmv_alloc" external _symmv_free_v : symmv_ws -> unit = "ml_gsl_eigen_symmv_free" let make_symmv_ws s = let ws = _symmv_alloc_v s in Gc.finalise _symmv_free_v ws ; ws external _symmv : mat -> vec -> mat -> symmv_ws -> unit = "ml_gsl_eigen_symmv" let symmv ?protect a = let a' = Gsl_vectmat.mat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector.create n in let evec = Gsl_matrix.create n n in let ws = _symmv_alloc_v n in begin try _symmv a' (`V v) (`M evec) ws with exn -> _symmv_free_v ws ; raise exn end ; _symmv_free_v ws ; (v, evec) type sort = | VAL_ASC | VAL_DESC | ABS_ASC | ABS_DESC external symmv_sort : Gsl_vector.vector * Gsl_matrix.matrix -> sort -> unit = "ml_gsl_eigen_symmv_sort" (* Complex Hermitian Matrices *) type herm_ws external _herm_alloc : int -> herm_ws = "ml_gsl_eigen_herm_alloc" external _herm_free : herm_ws -> unit = "ml_gsl_eigen_herm_free" let make_herm_ws s = let ws = _herm_alloc s in Gc.finalise _herm_free ws ; ws external _herm : cmat -> vec -> herm_ws -> unit = "ml_gsl_eigen_herm" let herm ?protect a = let a' = Gsl_vectmat.cmat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector.create n in let ws = _herm_alloc n in begin try _herm a' (`V v) ws with exn -> _herm_free ws ; raise exn end ; _herm_free ws ; v type hermv_ws external _hermv_alloc_v : int -> hermv_ws = "ml_gsl_eigen_hermv_alloc" external _hermv_free_v : hermv_ws -> unit = "ml_gsl_eigen_hermv_free" let make_hermv_ws s = let ws = _hermv_alloc_v s in Gc.finalise _hermv_free_v ws ; ws external _hermv : cmat -> vec -> cmat -> hermv_ws -> unit = "ml_gsl_eigen_hermv" let hermv ?protect a = let a' = Gsl_vectmat.cmat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector.create n in let evec = Gsl_matrix_complex.create n n in let ws = _hermv_alloc_v n in begin try _hermv a' (`V v) (`CM evec) ws with exn -> _hermv_free_v ws ; raise exn end ; _hermv_free_v ws ; (v, evec) external hermv_sort : Gsl_vector.vector * Gsl_matrix_complex.matrix -> sort -> unit = "ml_gsl_eigen_hermv_sort" (** Real Nonsymmetric Matrices *) type nonsymm_ws external _nonsymm_alloc : int -> nonsymm_ws = "ml_gsl_eigen_nonsymm_alloc" external _nonsymm_free : nonsymm_ws -> unit = "ml_gsl_eigen_nonsymm_free" let make_nonsymm_ws s = let ws = _nonsymm_alloc s in Gc.finalise _nonsymm_free ws ; ws external _nonsymm : mat -> cvec -> nonsymm_ws -> unit = "ml_gsl_eigen_nonsymm" external _nonsymm_Z : mat -> cvec -> mat -> nonsymm_ws -> unit = "ml_gsl_eigen_nonsymm_Z" let nonsymm ?protect a = let a' = Gsl_vectmat.mat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector_complex.create n in let ws = _nonsymm_alloc n in begin try _nonsymm a' (`CV v) ws with exn -> _nonsymm_free ws ; raise exn end ; _nonsymm_free ws ; v type nonsymmv_ws external _nonsymmv_alloc_v : int -> nonsymmv_ws = "ml_gsl_eigen_nonsymmv_alloc" external _nonsymmv_free_v : nonsymmv_ws -> unit = "ml_gsl_eigen_nonsymmv_free" let make_nonsymmv_ws s = let ws = _nonsymmv_alloc_v s in Gc.finalise _nonsymmv_free_v ws ; ws external _nonsymmv : mat -> cvec -> cmat -> nonsymmv_ws -> unit = "ml_gsl_eigen_nonsymmv" external _nonsymmv_Z : mat -> cvec -> cmat -> mat -> nonsymmv_ws -> unit = "ml_gsl_eigen_nonsymmv_Z" let nonsymmv ?protect a = let a' = Gsl_vectmat.mat_convert ?protect a in let (n, _) = Gsl_vectmat.dims a' in let v = Gsl_vector_complex.create n in let evec = Gsl_matrix_complex.create n n in let ws = _nonsymmv_alloc_v n in begin try _nonsymmv a' (`CV v) (`CM evec) ws with exn -> _nonsymmv_free_v ws ; raise exn end ; _nonsymmv_free_v ws ; (v, evec) external nonsymmv_sort : Gsl_vector_complex.vector * Gsl_matrix_complex.matrix -> sort -> unit = "ml_gsl_eigen_nonsymmv_sort" ocamlgsl-0.6.0/gsl_eigen.mli0000664000076400007640000000570210607755005014504 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Eigensystems *) open Gsl_vectmat (** {3 Real Symmetric Matrices} *) type symm_ws val make_symm_ws : int -> symm_ws external _symm : mat -> vec -> symm_ws -> unit = "ml_gsl_eigen_symm" val symm : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> Gsl_vector.vector type symmv_ws val make_symmv_ws : int -> symmv_ws external _symmv : mat -> vec -> mat -> symmv_ws -> unit = "ml_gsl_eigen_symmv" val symmv : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> Gsl_vector.vector * Gsl_matrix.matrix type sort = | VAL_ASC | VAL_DESC | ABS_ASC | ABS_DESC external symmv_sort : Gsl_vector.vector * Gsl_matrix.matrix -> sort -> unit = "ml_gsl_eigen_symmv_sort" (** {3 Complex Hermitian Matrices} *) type herm_ws val make_herm_ws : int -> herm_ws external _herm : cmat -> vec -> herm_ws -> unit = "ml_gsl_eigen_herm" val herm : ?protect:bool -> [< `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix | `CA of Gsl_complex.complex_array * int * int ] -> Gsl_vector.vector type hermv_ws val make_hermv_ws : int -> hermv_ws external _hermv : cmat -> vec -> cmat -> hermv_ws -> unit = "ml_gsl_eigen_hermv" val hermv : ?protect:bool -> [< `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix | `CA of Gsl_complex.complex_array * int * int ] -> Gsl_vector.vector * Gsl_matrix_complex.matrix external hermv_sort : Gsl_vector.vector * Gsl_matrix_complex.matrix -> sort -> unit = "ml_gsl_eigen_hermv_sort" (** {3 Real Nonsymmetric Matrices} *) type nonsymm_ws val make_nonsymm_ws : int -> nonsymm_ws external _nonsymm : mat -> cvec -> nonsymm_ws -> unit = "ml_gsl_eigen_nonsymm" external _nonsymm_Z : mat -> cvec -> mat -> nonsymm_ws -> unit = "ml_gsl_eigen_nonsymm_Z" val nonsymm : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> Gsl_vector_complex.vector type nonsymmv_ws val make_nonsymmv_ws : int -> nonsymmv_ws external _nonsymmv : mat -> cvec -> cmat -> nonsymmv_ws -> unit = "ml_gsl_eigen_nonsymmv" external _nonsymmv_Z : mat -> cvec -> cmat -> mat -> nonsymmv_ws -> unit = "ml_gsl_eigen_nonsymmv_Z" val nonsymmv : ?protect:bool -> [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `A of float array * int * int | `AA of float array array] -> Gsl_vector_complex.vector * Gsl_matrix_complex.matrix external nonsymmv_sort : Gsl_vector_complex.vector * Gsl_matrix_complex.matrix -> sort -> unit = "ml_gsl_eigen_nonsymmv_sort" ocamlgsl-0.6.0/mlgsl_eigen.c0000664000076400007640000001325010607755005014473 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "wrappers.h" #include "mlgsl_permut.h" #include "mlgsl_complex.h" #include "mlgsl_vector_complex.h" #include "mlgsl_matrix_complex.h" #undef BASE_TYPE #undef TYPE #undef _DECLARE_BASE_TYPE #undef _CONVERT_BASE_TYPE #undef DECLARE_BASE_TYPE #undef FUNCTION #include "mlgsl_matrix_double.h" #include "mlgsl_vector_double.h" CAMLprim value ml_gsl_eigen_symm_alloc(value n) { value v; gsl_eigen_symm_workspace *ws = gsl_eigen_symm_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define SYMM_WS_val(v) ((gsl_eigen_symm_workspace *)Field(v, 0)) ML1(gsl_eigen_symm_free, SYMM_WS_val, Unit) CAMLprim value ml_gsl_eigen_symm(value A, value EVAL, value ws) { _DECLARE_MATRIX(A); _DECLARE_VECTOR(EVAL); _CONVERT_MATRIX(A); _CONVERT_VECTOR(EVAL); gsl_eigen_symm(&m_A, &v_EVAL, SYMM_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_symmv_alloc(value n) { value v; gsl_eigen_symmv_workspace *ws = gsl_eigen_symmv_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define SYMMV_WS_val(v) ((gsl_eigen_symmv_workspace *)Field(v, 0)) ML1(gsl_eigen_symmv_free, SYMMV_WS_val, Unit) CAMLprim value ml_gsl_eigen_symmv(value A, value EVAL, value EVEC, value ws) { _DECLARE_MATRIX2(A, EVEC); _DECLARE_VECTOR(EVAL); _CONVERT_MATRIX2(A, EVEC); _CONVERT_VECTOR(EVAL); gsl_eigen_symmv(&m_A, &v_EVAL, &m_EVEC, SYMMV_WS_val(ws)); return Val_unit; } static const gsl_eigen_sort_t eigen_sort_type[] = { GSL_EIGEN_SORT_VAL_ASC, GSL_EIGEN_SORT_VAL_DESC, GSL_EIGEN_SORT_ABS_ASC, GSL_EIGEN_SORT_ABS_DESC, }; CAMLprim value ml_gsl_eigen_symmv_sort(value E, value sort) { value EVAL = Field(E, 0); value EVEC = Field(E, 1); _DECLARE_MATRIX(EVEC); _DECLARE_VECTOR(EVAL); _CONVERT_MATRIX(EVEC); _CONVERT_VECTOR(EVAL); gsl_eigen_symmv_sort(&v_EVAL, &m_EVEC, eigen_sort_type[ Int_val(sort) ]); return Val_unit; } /* Hermitian matrices */ CAMLprim value ml_gsl_eigen_herm_alloc(value n) { value v; gsl_eigen_herm_workspace *ws = gsl_eigen_herm_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define HERM_WS_val(v) ((gsl_eigen_herm_workspace *)Field(v, 0)) ML1(gsl_eigen_herm_free, HERM_WS_val, Unit) CAMLprim value ml_gsl_eigen_herm(value A, value EVAL, value ws) { _DECLARE_COMPLEX_MATRIX(A); _DECLARE_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX(A); _CONVERT_VECTOR(EVAL); gsl_eigen_herm(&m_A, &v_EVAL, HERM_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_hermv_alloc(value n) { value v; gsl_eigen_hermv_workspace *ws = gsl_eigen_hermv_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define HERMV_WS_val(v) ((gsl_eigen_hermv_workspace *)Field(v, 0)) ML1(gsl_eigen_hermv_free, HERMV_WS_val, Unit) CAMLprim value ml_gsl_eigen_hermv(value A, value EVAL, value EVEC, value ws) { _DECLARE_VECTOR(EVAL); _DECLARE_COMPLEX_MATRIX2(A, EVEC); _CONVERT_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX2(A, EVEC); gsl_eigen_hermv(&m_A, &v_EVAL, &m_EVEC, HERMV_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_hermv_sort(value E, value sort) { value EVAL = Field(E, 0); value EVEC = Field(E, 1); _DECLARE_COMPLEX_MATRIX(EVEC); _DECLARE_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX(EVEC); _CONVERT_VECTOR(EVAL); gsl_eigen_hermv_sort(&v_EVAL, &m_EVEC, eigen_sort_type[ Int_val(sort) ]); return Val_unit; } /* Real Nonsymmetrix Matrices */ CAMLprim value ml_gsl_eigen_nonsymm_alloc(value n) { value v; gsl_eigen_nonsymm_workspace *ws = gsl_eigen_nonsymm_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define NONSYMM_WS_val(v) ((gsl_eigen_nonsymm_workspace *)Field(v, 0)) ML1(gsl_eigen_nonsymm_free, NONSYMM_WS_val, Unit) CAMLprim value ml_gsl_eigen_nonsymm(value A, value EVAL, value ws) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX_VECTOR(EVAL); _CONVERT_MATRIX(A); _CONVERT_COMPLEX_VECTOR(EVAL); gsl_eigen_nonsymm(&m_A, &v_EVAL, NONSYMM_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_nonsymm_Z(value A, value EVAL, value Z, value ws) { _DECLARE_MATRIX2(A,Z); _DECLARE_COMPLEX_VECTOR(EVAL); _CONVERT_MATRIX2(A,Z); _CONVERT_COMPLEX_VECTOR(EVAL); gsl_eigen_nonsymm_Z(&m_A, &v_EVAL, &m_Z, NONSYMM_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_nonsymmv_alloc(value n) { value v; gsl_eigen_nonsymmv_workspace *ws = gsl_eigen_nonsymmv_alloc(Int_val(n)); Abstract_ptr(v, ws); return v; } #define NONSYMMV_WS_val(v) ((gsl_eigen_nonsymmv_workspace *)Field(v, 0)) ML1(gsl_eigen_nonsymmv_free, NONSYMMV_WS_val, Unit) CAMLprim value ml_gsl_eigen_nonsymmv(value A, value EVAL, value EVEC, value ws) { _DECLARE_MATRIX(A); _DECLARE_COMPLEX_VECTOR(EVAL); _DECLARE_COMPLEX_MATRIX(EVEC); _CONVERT_MATRIX(A); _CONVERT_COMPLEX_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX(EVEC); gsl_eigen_nonsymmv(&m_A, &v_EVAL, &m_EVEC, NONSYMMV_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_nonsymmv_Z(value A, value EVAL, value EVEC, value Z, value ws) { _DECLARE_MATRIX2(A,Z); _DECLARE_COMPLEX_VECTOR(EVAL); _DECLARE_COMPLEX_MATRIX(EVEC); _CONVERT_MATRIX2(A,Z); _CONVERT_COMPLEX_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX(EVEC); gsl_eigen_nonsymmv_Z(&m_A, &v_EVAL, &m_EVEC, &m_Z, NONSYMMV_WS_val(ws)); return Val_unit; } CAMLprim value ml_gsl_eigen_nonsymmv_sort(value E, value sort) { value EVAL = Field(E, 0); value EVEC = Field(E, 1); _DECLARE_COMPLEX_VECTOR(EVAL); _DECLARE_COMPLEX_MATRIX(EVEC); _CONVERT_COMPLEX_VECTOR(EVAL); _CONVERT_COMPLEX_MATRIX(EVEC); gsl_eigen_nonsymmv_sort(&v_EVAL, &m_EVEC, eigen_sort_type[ Int_val(sort) ]); return Val_unit; } ocamlgsl-0.6.0/gsl_poly.ml0000664000076400007640000000253210600031632014207 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_complex type poly = float array external eval : poly -> float -> float = "ml_gsl_poly_eval" type quad_sol = | Quad_0 | Quad_2 of float * float external solve_quadratic : a:float -> b:float -> c:float -> quad_sol = "ml_gsl_poly_solve_quadratic" external complex_solve_quadratic : a:float -> b:float -> c:float -> complex * complex = "ml_gsl_poly_complex_solve_quadratic" type cubic_sol = | Cubic_0 | Cubic_1 of float | Cubic_3 of float * float * float external solve_cubic : a:float -> b:float -> c:float -> cubic_sol = "ml_gsl_poly_solve_cubic" external complex_solve_cubic : a:float -> b:float -> c:float -> complex * complex * complex = "ml_gsl_poly_complex_solve_cubic" type ws external _alloc_ws : int -> ws = "ml_gsl_poly_complex_workspace_alloc" external _free_ws : ws -> unit= "ml_gsl_poly_complex_workspace_free" external _solve : poly -> ws -> complex_array -> unit = "ml_gsl_poly_complex_solve" let solve poly = let n = Array.length poly in let ws = _alloc_ws n in try let sol = Array.make (2*(n-1)) 0. in _solve poly ws sol ; _free_ws ws ; sol with exn -> _free_ws ws ; raise exn ocamlgsl-0.6.0/gsl_poly.mli0000664000076400007640000000212410600031632014355 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Polynomials *) open Gsl_complex type poly = float array (** {3 Polynomial Evaluation} *) external eval : poly -> float -> float = "ml_gsl_poly_eval" (** {3 Quadratic Equations} *) type quad_sol = | Quad_0 | Quad_2 of float * float external solve_quadratic : a:float -> b:float -> c:float -> quad_sol = "ml_gsl_poly_solve_quadratic" external complex_solve_quadratic : a:float -> b:float -> c:float -> complex * complex = "ml_gsl_poly_complex_solve_quadratic" (** {3 Cubic Equations} *) type cubic_sol = | Cubic_0 | Cubic_1 of float | Cubic_3 of float * float * float external solve_cubic : a:float -> b:float -> c:float -> cubic_sol = "ml_gsl_poly_solve_cubic" external complex_solve_cubic : a:float -> b:float -> c:float -> complex * complex * complex = "ml_gsl_poly_complex_solve_cubic" (** {3 General Polynomial Equations} *) val solve : poly -> complex_array ocamlgsl-0.6.0/mlgsl_poly.c0000664000076400007640000000656210600031632014361 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" CAMLprim value ml_gsl_poly_eval(value c, value x) { int len = Double_array_length(c); return copy_double(gsl_poly_eval(Double_array_val(c), len, Double_val(x))); } CAMLprim value ml_gsl_poly_solve_quadratic(value a, value b, value c) { double x0, x1; int n ; n = gsl_poly_solve_quadratic(Double_val(a), Double_val(b), Double_val(c), &x0, &x1); { CAMLparam0(); CAMLlocal1(r); if(n == 0) r = Val_int(0); else{ r = alloc(2, 0); Store_field(r, 0, copy_double(x0)); Store_field(r, 1, copy_double(x1)); } ; CAMLreturn(r); } } CAMLprim value ml_gsl_poly_complex_solve_quadratic(value a, value b, value c) { gsl_complex z0, z1; gsl_poly_complex_solve_quadratic(Double_val(a), Double_val(b), Double_val(c), &z0, &z1); { CAMLparam0(); CAMLlocal3(r,rz0,rz1); rz0 = alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(rz0, 0, GSL_REAL(z0)); Store_double_field(rz0, 1, GSL_IMAG(z0)); rz1 = alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(rz1, 0, GSL_REAL(z1)); Store_double_field(rz1, 1, GSL_IMAG(z1)); r = alloc_small(2, 0); Field(r,0) = rz0 ; Field(r,1) = rz1 ; CAMLreturn(r); } } CAMLprim value ml_gsl_poly_solve_cubic(value a, value b, value c) { double x0, x1, x2; int n ; n = gsl_poly_solve_cubic(Double_val(a), Double_val(b), Double_val(c), &x0, &x1, &x2); { CAMLparam0(); CAMLlocal1(r); r = Val_int(0); /* to silence compiler warnings */ switch(n){ case 0: break; case 1: r = alloc(1, 0); Store_field(r, 0, copy_double(x0)); break; case 3: r = alloc(3, 1); Store_field(r, 0, copy_double(x0)); Store_field(r, 1, copy_double(x1)); Store_field(r, 2, copy_double(x2)); } ; CAMLreturn(r); }; } CAMLprim value ml_gsl_poly_complex_solve_cubic(value a, value b, value c) { gsl_complex z0, z1, z2; gsl_poly_complex_solve_cubic(Double_val(a), Double_val(b), Double_val(c), &z0, &z1, &z2); { CAMLparam0(); CAMLlocal4(r,rz0, rz1, rz2); rz0 = alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(rz0, 0, GSL_REAL(z0)); Store_double_field(rz0, 1, GSL_IMAG(z0)); rz1 = alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(rz1, 0, GSL_REAL(z1)); Store_double_field(rz1, 1, GSL_IMAG(z1)); rz2 = alloc_small(2 * Double_wosize, Double_array_tag); Store_double_field(rz2, 0, GSL_REAL(z2)); Store_double_field(rz2, 1, GSL_IMAG(z2)); r = alloc_small(3, 0); Field(r,0) = rz0 ; Field(r,1) = rz1 ; Field(r,2) = rz2 ; CAMLreturn(r); } } #define POLY_WS(v) (gsl_poly_complex_workspace *)Field((v), 0) ML1_alloc(gsl_poly_complex_workspace_alloc, Int_val, Abstract_ptr) ML1(gsl_poly_complex_workspace_free, POLY_WS, Unit) CAMLprim value ml_gsl_poly_complex_solve(value a, value ws, value r) { gsl_poly_complex_solve(Double_array_val(a), Double_array_length(a), POLY_WS(ws), (gsl_complex_packed_ptr) r); return Val_unit; } ocamlgsl-0.6.0/gsl_interp.ml0000664000076400007640000000510210600031632014521 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type t type accel type interp_type = | LINEAR | POLYNOMIAL | CSPLINE | CSPLINE_PERIODIC | AKIMA | AKIMA_PERIODIC external _alloc : interp_type -> int -> t = "ml_gsl_interp_alloc" external _free : t -> unit = "ml_gsl_interp_free" let make t s = let i = _alloc t s in Gc.finalise _free i ; i external _init : t -> float array -> float array -> int -> unit = "ml_gsl_interp_init" let init i x y = let lx = Array.length x in let ly = Array.length y in if lx <> ly then invalid_arg "Gsl_interp: init" ; _init i x y lx external name : t -> string = "ml_gsl_interp_name" external min_size : t -> int = "ml_gsl_interp_min_size" external _accel_alloc : unit -> accel = "ml_gsl_interp_accel_alloc" external _accel_free : accel -> unit = "ml_gsl_interp_accel_free" let make_accel () = let a = _accel_alloc () in Gc.finalise _accel_free a ; a external i_eval : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval" external i_eval_deriv : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval_deriv" external i_eval_deriv2 : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval_deriv2" external i_eval_integ : t -> float array -> float array -> float -> float -> accel -> float = "ml_gsl_interp_eval_integ_bc" "ml_gsl_interp_eval_integ" (* Higher level functions *) type interp = { interp : t ; accel : accel ; xa : float array ; ya : float array ; size : int ; i_type : interp_type ; } let make_interp i_type x y = let len = Array.length x in let ly = Array.length y in if len <> ly then invalid_arg "Gsl_interp.make" ; let t = _alloc i_type len in let a = _accel_alloc () in let v = { interp=t; accel = a ; xa=x; ya=y; size=len; i_type=i_type } in Gc.finalise (fun v -> _free v.interp ; _accel_free v.accel) v ; init t x y ; v let eval interp x = i_eval interp.interp interp.xa interp.ya x interp.accel external eval_array : interp -> float array -> float array -> unit = "ml_gsl_interp_eval_array" let eval_deriv interp x = i_eval_deriv interp.interp interp.xa interp.ya x interp.accel let eval_deriv2 interp x = i_eval_deriv2 interp.interp interp.xa interp.ya x interp.accel let eval_integ interp a b = i_eval_integ interp.interp interp.xa interp.ya a b interp.accel ocamlgsl-0.6.0/gsl_interp.mli0000664000076400007640000000345410600031632014702 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Interpolation *) type t type accel type interp_type = | LINEAR | POLYNOMIAL | CSPLINE | CSPLINE_PERIODIC | AKIMA | AKIMA_PERIODIC val make : interp_type -> int -> t val init : t -> float array -> float array -> unit external name : t -> string = "ml_gsl_interp_name" external min_size : t -> int = "ml_gsl_interp_min_size" val make_accel : unit -> accel external i_eval : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval" external i_eval_deriv : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval_deriv" external i_eval_deriv2 : t -> float array -> float array -> float -> accel -> float = "ml_gsl_interp_eval_deriv2" external i_eval_integ : t -> float array -> float array -> float -> float -> accel -> float = "ml_gsl_interp_eval_integ_bc" "ml_gsl_interp_eval_integ" (** {3 Higher level functions} *) type interp = { interp : t ; accel : accel ; xa : float array ; ya : float array ; size : int ; i_type : interp_type ; } val make_interp : interp_type -> float array -> float array -> interp val eval : interp -> float -> float (** [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. *) external eval_array : interp -> float array -> float array -> unit = "ml_gsl_interp_eval_array" val eval_deriv : interp -> float -> float val eval_deriv2 : interp -> float -> float val eval_integ : interp -> float -> float -> float ocamlgsl-0.6.0/mlgsl_interp.c0000664000076400007640000000674710600031632014704 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" static const gsl_interp_type *interp_type_of_val(value t) { const gsl_interp_type* interp_type[] = { gsl_interp_linear, gsl_interp_polynomial, gsl_interp_cspline, gsl_interp_cspline_periodic, gsl_interp_akima, gsl_interp_akima_periodic }; return interp_type[Int_val(t)]; } #define Interp_val(v) ((gsl_interp *)Field((v), 0)) #define InterpAccel_val(v) ((gsl_interp_accel *)Field((v), 0)) CAMLprim value ml_gsl_interp_alloc(value type, value size) { value r; gsl_interp *i=gsl_interp_alloc(interp_type_of_val(type), Int_val(size)); Abstract_ptr(r, i); return r; } CAMLprim value ml_gsl_interp_free(value i) { gsl_interp_free(Interp_val(i)); return Val_unit; } CAMLprim value ml_gsl_interp_init(value i, value x, value y, value size) { gsl_interp_init(Interp_val(i), Double_array_val(x), Double_array_val(y), Int_val(size)); return Val_unit; } CAMLprim value ml_gsl_interp_name(value i) { return copy_string(gsl_interp_name(Interp_val(i))); } CAMLprim value ml_gsl_interp_min_size(value i) { return Val_int(gsl_interp_min_size(Interp_val(i))); } CAMLprim value ml_gsl_interp_accel_alloc(value unit) { value r; Abstract_ptr(r, gsl_interp_accel_alloc()); return r; } CAMLprim value ml_gsl_interp_accel_free(value ia) { gsl_interp_accel_free(InterpAccel_val(ia)); return Val_unit; } CAMLprim value ml_gsl_interp_eval(value i, value xa, value ya, value x, value A) { return copy_double(gsl_interp_eval(Interp_val(i), Double_array_val(xa), Double_array_val(ya), Double_val(x), InterpAccel_val(A))); } CAMLprim value ml_gsl_interp_eval_deriv(value i, value xa, value ya, value x, value A) { return copy_double(gsl_interp_eval_deriv(Interp_val(i), Double_array_val(xa), Double_array_val(ya), Double_val(x), InterpAccel_val(A))); } CAMLprim value ml_gsl_interp_eval_deriv2(value i, value xa, value ya, value x, value A) { return copy_double(gsl_interp_eval_deriv2(Interp_val(i), Double_array_val(xa), Double_array_val(ya), Double_val(x), InterpAccel_val(A))); } CAMLprim value ml_gsl_interp_eval_integ(value i, value xa, value ya, value a, value b, value A) { return copy_double(gsl_interp_eval_integ(Interp_val(i), Double_array_val(xa), Double_array_val(ya), Double_val(a), Double_val(b), InterpAccel_val(A))); } CAMLprim value ml_gsl_interp_eval_integ_bc(value *args, int nb) { return ml_gsl_interp_eval_integ(args[0], args[1], args[2], args[3], args[4], args[5]); } CAMLprim value ml_gsl_interp_eval_array(value i, value xa, value ya) { mlsize_t lx = Double_array_length(xa); mlsize_t ly = Double_array_length(ya); register int j; gsl_interp *c_i = Interp_val(Field(i, 0)); gsl_interp_accel *c_A = InterpAccel_val(Field(i, 1)); double *c_x = Double_array_val(Field(i, 2)); double *c_y = Double_array_val(Field(i, 3)); double *c_xa = Double_array_val(xa) ; double *c_ya = Double_array_val(ya) ; if(lx != ly) GSL_ERROR("array sizes differ", GSL_EBADLEN); for(j=0;j rng_type = "ml_gsl_rng_get_default" external default_seed : unit -> nativeint = "ml_gsl_rng_get_default_seed" external set_default : rng_type -> unit = "ml_gsl_rng_set_default" external set_default_seed : nativeint -> unit = "ml_gsl_rng_set_default_seed" external env_setup : unit -> unit = "ml_gsl_rng_env_setup" external create : rng_type -> t = "ml_gsl_rng_alloc" external delete : t -> unit = "ml_gsl_rng_free" let make rngtype = let rng = create rngtype in Gc.finalise delete rng ; rng external set : t -> nativeint -> unit = "ml_gsl_rng_set" external name : t -> string = "ml_gsl_rng_name" external max : t -> nativeint = "ml_gsl_rng_max" external min : t -> nativeint = "ml_gsl_rng_min" external get_type : t -> rng_type = "ml_gsl_rng_get_type" external memcpy : t -> t -> unit = "ml_gsl_rng_memcpy" external clone : t -> t = "ml_gsl_rng_clone" external dump_state : t -> string * string = "ml_gsl_rng_dump_state" external set_state : t -> string * string -> unit = "ml_gsl_rng_set_state" external get : t -> nativeint = "ml_gsl_rng_get" external uniform : t -> float = "ml_gsl_rng_uniform" external uniform_pos : t -> float = "ml_gsl_rng_uniform_pos" external uniform_int : t -> int -> int = "ml_gsl_rng_uniform_int" "noalloc" external uniform_arr : t -> float array -> unit = "ml_gsl_rng_uniform_arr" "noalloc" external uniform_pos_arr : t -> float array -> unit = "ml_gsl_rng_uniform_pos_arr" "noalloc" ocamlgsl-0.6.0/gsl_rng.mli0000664000076400007640000000524510607755005014205 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Random Number Generation *) type rng_type = | BOROSH13 | COVEYOU | CMRG | FISHMAN18 | FISHMAN20 | FISHMAN2X | GFSR4 | KNUTHRAN | KNUTHRAN2 | KNUTHRAN2002 | LECUYER21 | MINSTD | MRG | MT19937 | MT19937_1999 | MT19937_1998 | R250 | RAN0 | RAN1 | RAN2 | RAN3 | RAND | RAND48 | RANDOM128_BSD | RANDOM128_GLIBC2 | RANDOM128_LIBC5 | RANDOM256_BSD | RANDOM256_GLIBC2 | RANDOM256_LIBC5 | RANDOM32_BSD | RANDOM32_GLIBC2 | RANDOM32_LIBC5 | RANDOM64_BSD | RANDOM64_GLIBC2 | RANDOM64_LIBC5 | RANDOM8_BSD | RANDOM8_GLIBC2 | RANDOM8_LIBC5 | RANDOM_BSD | RANDOM_GLIBC2 | RANDOM_LIBC5 | RANDU | RANF | RANLUX | RANLUX389 | RANLXD1 | RANLXD2 | RANLXS0 | RANLXS1 | RANLXS2 | RANMAR | SLATEC | TAUS | TAUS_2 | TAUS_113 | TRANSPUTER | TT800 | UNI | UNI32 | VAX | WATERMAN14 | ZUF type t (** {3 Default values} *) external default : unit -> rng_type = "ml_gsl_rng_get_default" external default_seed : unit -> nativeint = "ml_gsl_rng_get_default_seed" external set_default : rng_type -> unit = "ml_gsl_rng_set_default" external set_default_seed : nativeint -> unit = "ml_gsl_rng_set_default_seed" external env_setup : unit -> unit = "ml_gsl_rng_env_setup" (** {3 Creating} *) val make : rng_type -> t external set : t -> nativeint -> unit = "ml_gsl_rng_set" external name : t -> string = "ml_gsl_rng_name" external get_type : t-> rng_type = "ml_gsl_rng_get_type" (** warning : the nativeint used for seeds are in fact unsigned but ocaml treats them as signed. But you can still print them using %nu with printf functions. *) external max : t -> nativeint = "ml_gsl_rng_max" external min : t -> nativeint = "ml_gsl_rng_min" external memcpy : t -> t -> unit = "ml_gsl_rng_memcpy" external clone : t -> t = "ml_gsl_rng_clone" external dump_state : t -> string * string = "ml_gsl_rng_dump_state" external set_state : t -> string * string -> unit = "ml_gsl_rng_set_state" (** {3 Sampling} *) external get : t -> nativeint = "ml_gsl_rng_get" external uniform : t -> float = "ml_gsl_rng_uniform" external uniform_pos : t -> float = "ml_gsl_rng_uniform_pos" external uniform_int : t -> int -> int = "ml_gsl_rng_uniform_int" "noalloc" (** These function fill the array with random numbers : *) external uniform_arr : t -> float array -> unit = "ml_gsl_rng_uniform_arr" "noalloc" external uniform_pos_arr : t -> float array -> unit = "ml_gsl_rng_uniform_pos_arr" "noalloc" ocamlgsl-0.6.0/mlgsl_rng.c0000664000076400007640000001203110607755005014166 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" #include "mlgsl_rng.h" #define NB_RNG 62 const gsl_rng_type *rngtype_of_int(int i) { const gsl_rng_type *rngtypes[ NB_RNG ] = { gsl_rng_borosh13, gsl_rng_coveyou, gsl_rng_cmrg, gsl_rng_fishman18, gsl_rng_fishman20, gsl_rng_fishman2x, gsl_rng_gfsr4, gsl_rng_knuthran, gsl_rng_knuthran2, gsl_rng_knuthran2002, gsl_rng_lecuyer21, gsl_rng_minstd, gsl_rng_mrg, gsl_rng_mt19937, gsl_rng_mt19937_1999, gsl_rng_mt19937_1998, gsl_rng_r250, gsl_rng_ran0, gsl_rng_ran1, gsl_rng_ran2, gsl_rng_ran3, gsl_rng_rand, gsl_rng_rand48, gsl_rng_random128_bsd, gsl_rng_random128_glibc2, gsl_rng_random128_libc5, gsl_rng_random256_bsd, gsl_rng_random256_glibc2, gsl_rng_random256_libc5, gsl_rng_random32_bsd, gsl_rng_random32_glibc2, gsl_rng_random32_libc5, gsl_rng_random64_bsd, gsl_rng_random64_glibc2, gsl_rng_random64_libc5, gsl_rng_random8_bsd, gsl_rng_random8_glibc2, gsl_rng_random8_libc5, gsl_rng_random_bsd, gsl_rng_random_glibc2, gsl_rng_random_libc5, gsl_rng_randu, gsl_rng_ranf, gsl_rng_ranlux, gsl_rng_ranlux389, gsl_rng_ranlxd1, gsl_rng_ranlxd2, gsl_rng_ranlxs0, gsl_rng_ranlxs1, gsl_rng_ranlxs2, gsl_rng_ranmar, gsl_rng_slatec, gsl_rng_taus, gsl_rng_taus2, gsl_rng_taus113, gsl_rng_transputer, gsl_rng_tt800, gsl_rng_uni, gsl_rng_uni32, gsl_rng_vax, gsl_rng_waterman14, gsl_rng_zuf } ; return rngtypes[i]; } #define Rngtype_val(v) (rngtype_of_int(Int_val(v))) value ml_gsl_rng_env_setup(value unit) { gsl_rng_env_setup() ; return Val_unit; } static int int_of_rngtype(const gsl_rng_type *rngt) { unsigned int i, len = NB_RNG; for(i=0; itype)); } value ml_gsl_rng_memcpy(value src, value dst) { gsl_rng_memcpy(Rng_val(dst), Rng_val(src)); return Val_unit; } value ml_gsl_rng_clone(value rng) { value r; Abstract_ptr(r, gsl_rng_clone(Rng_val(rng))); return r; } value ml_gsl_rng_dump_state(value rng) { CAMLparam0(); CAMLlocal3(v, n, s); size_t len = gsl_rng_size(Rng_val(rng)); void *state = gsl_rng_state(Rng_val(rng)); const char *name = gsl_rng_name(Rng_val(rng)); n = copy_string(name); s = alloc_string(len); memcpy(Bp_val(s), state, len); v = alloc_small(2, 0); Field(v, 0) = n; Field(v, 1) = s; CAMLreturn(v); } value ml_gsl_rng_set_state(value rng, value v) { gsl_rng *r = Rng_val(rng); char *name = String_val(Field(v, 0)); value state = Field(v, 1); if(strcmp(name, gsl_rng_name(r)) != 0 || gsl_rng_size(r) != string_length(state) ) invalid_argument("Gsl_rng.set_state : wrong rng type"); memcpy(r->state, Bp_val(state), string_length(state)); return Val_unit; } /* sampling */ value ml_gsl_rng_get(value rng) { return copy_nativeint(gsl_rng_get(Rng_val(rng))) ; } value ml_gsl_rng_uniform(value rng) { return copy_double(gsl_rng_uniform(Rng_val(rng))) ; } value ml_gsl_rng_uniform_pos(value rng) { return copy_double(gsl_rng_uniform_pos(Rng_val(rng))) ; } value ml_gsl_rng_uniform_int(value rng, value n) { return Val_int(gsl_rng_uniform_int(Rng_val(rng), Int_val(n))) ; } value ml_gsl_rng_uniform_arr(value rng, value arr) { gsl_rng *c_rng = Rng_val(rng) ; mlsize_t len = Double_array_length(arr); register int i; for(i=0; i #include #define Rng_val(v) ((gsl_rng *)(Field(v, 0))) ocamlgsl-0.6.0/gsl_qrng.ml0000664000076400007640000000153110600031632014171 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type qrng_type = | NIEDERREITER_2 | SOBOL type t external _alloc : qrng_type -> int -> t = "ml_gsl_qrng_alloc" external _free : t -> unit = "ml_gsl_qrng_free" external init : t -> unit = "ml_gsl_qrng_init" let make t d = let qrng = _alloc t d in Gc.finalise _free qrng ; qrng external dimension : t -> int = "ml_gsl_qrng_dimension" external name : t -> string = "ml_gsl_qrng_name" external memcpy : src:t -> dst:t -> unit = "ml_gsl_qrng_memcpy" external clone : t -> t = "ml_gsl_qrng_clone" external get : t -> float array -> unit = "ml_gsl_qrng_get" external sample : t -> float array = "ml_gsl_qrng_sample" ocamlgsl-0.6.0/gsl_qrng.mli0000664000076400007640000000132710600031632014345 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Quasi-Random Sequences *) type qrng_type = | NIEDERREITER_2 | SOBOL type t val make : qrng_type -> int -> t external init : t -> unit = "ml_gsl_qrng_init" external get : t -> float array -> unit = "ml_gsl_qrng_get" external sample : t -> float array = "ml_gsl_qrng_sample" external name : t -> string = "ml_gsl_qrng_name" external dimension : t -> int = "ml_gsl_qrng_dimension" external memcpy : src:t -> dst:t -> unit = "ml_gsl_qrng_memcpy" external clone : t -> t = "ml_gsl_qrng_clone" ocamlgsl-0.6.0/mlgsl_qrng.c0000664000076400007640000000300410600031632014331 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include "wrappers.h" static inline const gsl_qrng_type *qrngtype_val(value v) { const gsl_qrng_type *qrng_type[] = { gsl_qrng_niederreiter_2, gsl_qrng_sobol }; return qrng_type[Int_val(v)]; } #define Qrng_val(v) (gsl_qrng *)Field((v), 0) CAMLprim value ml_gsl_qrng_alloc(value type, value dim) { value r; Abstract_ptr(r, gsl_qrng_alloc(qrngtype_val(type), Int_val(dim))); return r; } ML1(gsl_qrng_free, Qrng_val, Unit) ML1(gsl_qrng_init, Qrng_val, Unit) CAMLprim value ml_gsl_qrng_dimension(value qrng) { return Val_int((Qrng_val(qrng))->dimension); } CAMLprim value ml_gsl_qrng_get(value qrng, value x) { if(Double_array_length(x) != (Qrng_val(qrng))->dimension) GSL_ERROR("wrong array size", GSL_EBADLEN); gsl_qrng_get(Qrng_val(qrng), Double_array_val(x)); return Val_unit; } CAMLprim value ml_gsl_qrng_sample(value qrng) { gsl_qrng * q = Qrng_val(qrng); value arr = alloc(q->dimension * Double_wosize, Double_array_tag); gsl_qrng_get(q, Double_array_val(arr)); return arr; } ML1(gsl_qrng_name, Qrng_val, copy_string) CAMLprim value ml_gsl_qrng_memcpy(value src, value dst) { gsl_qrng_memcpy(Qrng_val(dst), Qrng_val(src)); return Val_unit; } CAMLprim value ml_gsl_qrng_clone(value qrng) { value r; Abstract_ptr(r, gsl_qrng_clone(Qrng_val(qrng))); return r; } ocamlgsl-0.6.0/gsl_randist.ml0000664000076400007640000002330310607755005014705 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (* GAUSSIAN *) external gaussian : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian" external gaussian_ratio_method : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian_ratio_method" external gaussian_ziggurat : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian_ziggurat" external gaussian_pdf : float -> sigma:float -> float = "ml_gsl_ran_gaussian_pdf" "gsl_ran_gaussian_pdf" "float" external ugaussian : Gsl_rng.t -> float = "ml_gsl_ran_ugaussian" external ugaussian_ratio_method : Gsl_rng.t -> float = "ml_gsl_ran_ugaussian_ratio_method" external ugaussian_pdf : float -> float = "ml_gsl_ran_ugaussian_pdf" "gsl_ran_ugaussian_pdf" "float" (* GAUSSIAN TAIL *) external gaussian_tail : Gsl_rng.t -> a:float -> sigma:float -> float = "ml_gsl_ran_gaussian_tail" external gaussian_tail_pdf : float -> a:float -> sigma:float -> float = "ml_gsl_ran_gaussian_tail_pdf" "gsl_ran_gaussian_tail_pdf" "float" external ugaussian_tail : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_ugaussian_tail" external ugaussian_tail_pdf : float -> a:float -> float = "ml_gsl_ran_ugaussian_tail_pdf" "gsl_ran_ugaussian_tail_pdf" "float" (* BIVARIATE *) external bivariate_gaussian : Gsl_rng.t -> sigma_x:float -> sigma_y:float -> rho:float -> float * float = "ml_gsl_ran_bivariate_gaussian" external bivariate_gaussian_pdf : x:float -> y:float -> sigma_x:float -> sigma_y:float -> rho:float -> float = "ml_gsl_ran_bivariate_gaussian_pdf" "gsl_ran_bivariate_gaussian_pdf" "float" (* EXPONENTIAL *) external exponential : Gsl_rng.t -> mu:float -> float = "ml_gsl_ran_exponential" external exponential_pdf : float -> mu:float -> float = "ml_gsl_ran_exponential_pdf" "gsl_ran_exponential_pdf" "float" (* LAPLACE *) external laplace : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_laplace" external laplace_pdf : float -> a:float -> float = "ml_gsl_ran_laplace_pdf" "gsl_ran_laplace_pdf" "float" (* EXPPOW *) external exppow : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_exppow" external exppow_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_exppow_pdf" "gsl_ran_exppow_pdf" "float" (* CAUCHY *) external cauchy : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_cauchy" external cauchy_pdf : float -> a:float -> float = "ml_gsl_ran_cauchy_pdf" "gsl_ran_cauchy_pdf" "float" (* RAYLEIGH *) external rayleigh : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_rayleigh" external rayleigh_pdf : float -> sigma:float -> float = "ml_gsl_ran_rayleigh_pdf" "gsl_ran_rayleigh_pdf" "float" (* RAYLEIGH TAIL *) external rayleigh_tail : Gsl_rng.t -> a:float -> sigma:float -> float = "ml_gsl_ran_rayleigh_tail" external rayleigh_tail_pdf : float -> a:float -> sigma:float -> float = "ml_gsl_ran_rayleigh_tail_pdf" "gsl_ran_rayleigh_tail_pdf" "float" (* LANDAU *) external landau : Gsl_rng.t -> float = "ml_gsl_ran_landau" external landau_pdf : float -> float = "ml_gsl_ran_landau_pdf" "gsl_ran_landau_pdf" "float" (* LEVY ALPHA-STABLE *) external levy : Gsl_rng.t -> c:float -> alpha:float -> float = "ml_gsl_ran_levy" (* LEVY SKEW ALPHA-STABLE *) external levy_skew : Gsl_rng.t -> c:float -> alpha:float -> beta:float -> float = "ml_gsl_ran_levy_skew" (* GAMMA *) external gamma : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gamma" external gamma_int : Gsl_rng.t -> a:int -> float = "ml_gsl_ran_gamma_int" external gamma_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gamma_pdf" "gsl_ran_gamma_pdf" "float" external gamma_mt : Gsl_rng.t -> a:int -> b:float -> float = "ml_gsl_ran_gamma_mt" external gamma_knuth : Gsl_rng.t -> a:int -> b:float -> float = "ml_gsl_ran_gamma_knuth" (* FLAT *) external flat : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_flat" external flat_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_flat_pdf" "gsl_ran_flat_pdf" "float" (* LOGNORMAL *) external lognormal : Gsl_rng.t -> zeta:float -> sigma:float -> float = "ml_gsl_ran_lognormal" external lognormal_pdf : float -> zeta:float -> sigma:float -> float = "ml_gsl_ran_lognormal_pdf" "gsl_ran_lognormal_pdf" "float" (* CHI-SQUARED *) external chisq : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_chisq" external chisq_pdf : float -> nu:float -> float = "ml_gsl_ran_chisq_pdf" "gsl_ran_chisq_pdf" "float" (* DIRICHLET *) external dirichlet : Gsl_rng.t -> alpha:float array -> theta:float array -> unit = "ml_gsl_ran_dirichlet" external dirichlet_pdf : alpha:float array -> theta:float array -> float = "ml_gsl_ran_dirichlet_pdf" external dirichlet_lnpdf : alpha:float array -> theta:float array -> float = "ml_gsl_ran_dirichlet_lnpdf" (* F DISTRIBUTION *) external fdist : Gsl_rng.t -> nu1:float -> nu2:float -> float = "ml_gsl_ran_fdist" external fdist_pdf : float -> nu1:float -> nu2:float -> float = "ml_gsl_ran_fdist_pdf" "gsl_ran_fdist_pdf" "float" (* T DISTRIBUTION *) external tdist : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_tdist" external tdist_pdf : float -> nu:float -> float = "ml_gsl_ran_tdist_pdf" "gsl_ran_tdist_pdf" "float" (* BETA *) external beta : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_beta" external beta_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_beta_pdf" "gsl_ran_beta_pdf" "float" (* LOGISTIC *) external logistic : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_logistic" external logistic_pdf : float -> a:float -> float = "ml_gsl_ran_logistic_pdf" "gsl_ran_logistic_pdf" "float" (* PARETO *) external pareto : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_pareto" external pareto_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_pareto_pdf" "gsl_ran_pareto_pdf" "float" (* SPHERICAL *) external dir_2d : Gsl_rng.t -> float * float = "ml_gsl_ran_dir_2d" external dir_2d_trig_method : Gsl_rng.t -> float * float = "ml_gsl_ran_dir_2d_trig_method" external dir_3d : Gsl_rng.t -> float * float * float = "ml_gsl_ran_dir_3d" external dir_nd : Gsl_rng.t -> float array -> unit = "ml_gsl_ran_dir_nd" (* WEIBULL *) external weibull : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_weibull" external weibull_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_weibull_pdf" "gsl_ran_weibull_pdf" "float" (* TYPE 1 GUMBEL *) external gumbel1 : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gumbel1" external gumbel1_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gumbel1_pdf" "gsl_ran_gumbel1_pdf" "float" (* TYPE 2 GUMBEL *) external gumbel2 : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gumbel2" external gumbel2_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gumbel2_pdf" "gsl_ran_gumbel2_pdf" "float" (* DISCRETE *) type discrete external _discrete_preproc : float array -> discrete = "ml_gsl_ran_discrete_preproc" external discrete : Gsl_rng.t -> discrete -> int = "ml_gsl_ran_discrete" "noalloc" external discrete_pdf : int -> discrete -> float = "ml_gsl_ran_discrete_pdf" external discrete_free : discrete -> unit = "ml_gsl_ran_discrete_free" let discrete_preproc arr = let d = _discrete_preproc arr in Gc.finalise discrete_free d ; d (* POISSON *) external poisson : Gsl_rng.t -> mu:float -> int = "ml_gsl_ran_poisson" external poisson_pdf : int -> mu:float -> float = "ml_gsl_ran_poisson_pdf" (* BERNOULLI *) external bernoulli : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_bernoulli" external bernoulli_pdf : int -> p:float -> float = "ml_gsl_ran_bernoulli_pdf" (* BINOMIAL *) external binomial : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial" external binomial_knuth : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial_knuth" external binomial_tpe : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial_tpe" external binomial_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_binomial_pdf" (* MULTINOMIAL *) external multinomial : Gsl_rng.t -> n:int -> p:float array -> int array = "ml_gsl_ran_multinomial" external multinomial_pdf : p:float array -> n:int array -> float = "ml_gsl_ran_multinomial_pdf" external multinomial_lnpdf : p:float array -> n:int array -> float = "ml_gsl_ran_multinomial_lnpdf" (* NEGATIVE BINOMIAL *) external negative_binomial : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_negative_binomial" external negative_binomial_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_negative_binomial_pdf" (* PASCAL *) external pascal : Gsl_rng.t -> p:float -> k:int -> int = "ml_gsl_ran_pascal" external pascal_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_pascal_pdf" (* GEOMETRIC *) external geometric : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_geometric" external geometric_pdf : int -> p:float -> float = "ml_gsl_ran_geometric_pdf" (* HYPER GEOMETRIC *) external hypergeometric : Gsl_rng.t -> n1:int -> n2:int -> t:int -> int = "ml_gsl_ran_hypergeometric" external hypergeometric_pdf : int -> n1:int -> n2:int -> t:int -> float = "ml_gsl_ran_hypergeometric_pdf" (* LOGARITHMIC *) external logarithmic : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_logarithmic" external logarithmic_pdf : int -> p:float -> float = "ml_gsl_ran_logarithmic_pdf" (* SHUFFLING *) external shuffle : Gsl_rng.t -> 'a array -> unit = "ml_gsl_ran_shuffle" external choose : Gsl_rng.t -> src:'a array -> dst:'a array -> unit = "ml_gsl_ran_choose" external sample : Gsl_rng.t -> src:'a array -> dst:'a array -> unit = "ml_gsl_ran_sample" ocamlgsl-0.6.0/gsl_randist.mli0000664000076400007640000002143410607755005015061 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Random Number Distributions *) external gaussian : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian" external gaussian_ratio_method : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian_ratio_method" external gaussian_ziggurat : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_gaussian_ziggurat" external gaussian_pdf : float -> sigma:float -> float = "ml_gsl_ran_gaussian_pdf" "gsl_ran_gaussian_pdf" "float" external ugaussian : Gsl_rng.t -> float = "ml_gsl_ran_ugaussian" external ugaussian_ratio_method : Gsl_rng.t -> float = "ml_gsl_ran_ugaussian_ratio_method" external ugaussian_pdf : float -> float = "ml_gsl_ran_ugaussian_pdf" "gsl_ran_ugaussian_pdf" "float" external gaussian_tail : Gsl_rng.t -> a:float -> sigma:float -> float = "ml_gsl_ran_gaussian_tail" external gaussian_tail_pdf : float -> a:float -> sigma:float -> float = "ml_gsl_ran_gaussian_tail_pdf" "gsl_ran_gaussian_tail_pdf" "float" external ugaussian_tail : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_ugaussian_tail" external ugaussian_tail_pdf : float -> a:float -> float = "ml_gsl_ran_ugaussian_tail_pdf" "gsl_ran_ugaussian_tail_pdf" "float" external bivariate_gaussian : Gsl_rng.t -> sigma_x:float -> sigma_y:float -> rho:float -> float * float = "ml_gsl_ran_bivariate_gaussian" external bivariate_gaussian_pdf : x:float -> y:float -> sigma_x:float -> sigma_y:float -> rho:float -> float = "ml_gsl_ran_bivariate_gaussian_pdf" "gsl_ran_bivariate_gaussian_pdf" "float" external exponential : Gsl_rng.t -> mu:float -> float = "ml_gsl_ran_exponential" external exponential_pdf : float -> mu:float -> float = "ml_gsl_ran_exponential_pdf" "gsl_ran_exponential_pdf" "float" external laplace : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_laplace" external laplace_pdf : float -> a:float -> float = "ml_gsl_ran_laplace_pdf" "gsl_ran_laplace_pdf" "float" external exppow : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_exppow" external exppow_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_exppow_pdf" "gsl_ran_exppow_pdf" "float" external cauchy : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_cauchy" external cauchy_pdf : float -> a:float -> float = "ml_gsl_ran_cauchy_pdf" "gsl_ran_cauchy_pdf" "float" external rayleigh : Gsl_rng.t -> sigma:float -> float = "ml_gsl_ran_rayleigh" external rayleigh_pdf : float -> sigma:float -> float = "ml_gsl_ran_rayleigh_pdf" "gsl_ran_rayleigh_pdf" "float" external rayleigh_tail : Gsl_rng.t -> a:float -> sigma:float -> float = "ml_gsl_ran_rayleigh_tail" external rayleigh_tail_pdf : float -> a:float -> sigma:float -> float = "ml_gsl_ran_rayleigh_tail_pdf" "gsl_ran_rayleigh_tail_pdf" "float" external landau : Gsl_rng.t -> float = "ml_gsl_ran_landau" external landau_pdf : float -> float = "ml_gsl_ran_landau_pdf" "gsl_ran_landau_pdf" "float" external levy : Gsl_rng.t -> c:float -> alpha:float -> float = "ml_gsl_ran_levy" external levy_skew : Gsl_rng.t -> c:float -> alpha:float -> beta:float -> float = "ml_gsl_ran_levy_skew" external gamma : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gamma" external gamma_int : Gsl_rng.t -> a:int -> float = "ml_gsl_ran_gamma_int" external gamma_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gamma_pdf" "gsl_ran_gamma_pdf" "float" external gamma_mt : Gsl_rng.t -> a:int -> b:float -> float = "ml_gsl_ran_gamma_mt" external gamma_knuth : Gsl_rng.t -> a:int -> b:float -> float = "ml_gsl_ran_gamma_knuth" external flat : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_flat" external flat_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_flat_pdf" "gsl_ran_flat_pdf" "float" external lognormal : Gsl_rng.t -> zeta:float -> sigma:float -> float = "ml_gsl_ran_lognormal" external lognormal_pdf : float -> zeta:float -> sigma:float -> float = "ml_gsl_ran_lognormal_pdf" "gsl_ran_lognormal_pdf" "float" external chisq : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_chisq" external chisq_pdf : float -> nu:float -> float = "ml_gsl_ran_chisq_pdf" "gsl_ran_chisq_pdf" "float" external dirichlet : Gsl_rng.t -> alpha:float array -> theta:float array -> unit = "ml_gsl_ran_dirichlet" external dirichlet_pdf : alpha:float array -> theta:float array -> float = "ml_gsl_ran_dirichlet_pdf" external dirichlet_lnpdf : alpha:float array -> theta:float array -> float = "ml_gsl_ran_dirichlet_lnpdf" external fdist : Gsl_rng.t -> nu1:float -> nu2:float -> float = "ml_gsl_ran_fdist" external fdist_pdf : float -> nu1:float -> nu2:float -> float = "ml_gsl_ran_fdist_pdf" "gsl_ran_fdist_pdf" "float" external tdist : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_tdist" external tdist_pdf : float -> nu:float -> float = "ml_gsl_ran_tdist_pdf" "gsl_ran_tdist_pdf" "float" external beta : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_beta" external beta_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_beta_pdf" "gsl_ran_beta_pdf" "float" external logistic : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_logistic" external logistic_pdf : float -> a:float -> float = "ml_gsl_ran_logistic_pdf" "gsl_ran_logistic_pdf" "float" external pareto : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_pareto" external pareto_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_pareto_pdf" "gsl_ran_pareto_pdf" "float" external dir_2d : Gsl_rng.t -> float * float = "ml_gsl_ran_dir_2d" external dir_2d_trig_method : Gsl_rng.t -> float * float = "ml_gsl_ran_dir_2d_trig_method" external dir_3d : Gsl_rng.t -> float * float * float = "ml_gsl_ran_dir_3d" external dir_nd : Gsl_rng.t -> float array -> unit = "ml_gsl_ran_dir_nd" external weibull : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_weibull" external weibull_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_weibull_pdf" "gsl_ran_weibull_pdf" "float" external gumbel1 : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gumbel1" external gumbel1_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gumbel1_pdf" "gsl_ran_gumbel1_pdf" "float" external gumbel2 : Gsl_rng.t -> a:float -> b:float -> float = "ml_gsl_ran_gumbel2" external gumbel2_pdf : float -> a:float -> b:float -> float = "ml_gsl_ran_gumbel2_pdf" "gsl_ran_gumbel2_pdf" "float" type discrete val discrete_preproc : float array -> discrete external discrete : Gsl_rng.t -> discrete -> int = "ml_gsl_ran_discrete" "noalloc" external discrete_pdf : int -> discrete -> float = "ml_gsl_ran_discrete_pdf" external poisson : Gsl_rng.t -> mu:float -> int = "ml_gsl_ran_poisson" external poisson_pdf : int -> mu:float -> float = "ml_gsl_ran_poisson_pdf" external bernoulli : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_bernoulli" external bernoulli_pdf : int -> p:float -> float = "ml_gsl_ran_bernoulli_pdf" external binomial : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial" external binomial_knuth : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial_knuth" external binomial_tpe : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_binomial_tpe" external binomial_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_binomial_pdf" external multinomial : Gsl_rng.t -> n:int -> p:float array -> int array = "ml_gsl_ran_multinomial" external multinomial_pdf : p:float array -> n:int array -> float = "ml_gsl_ran_multinomial_pdf" external multinomial_lnpdf : p:float array -> n:int array -> float = "ml_gsl_ran_multinomial_lnpdf" external negative_binomial : Gsl_rng.t -> p:float -> n:int -> int = "ml_gsl_ran_negative_binomial" external negative_binomial_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_negative_binomial_pdf" external pascal : Gsl_rng.t -> p:float -> k:int -> int = "ml_gsl_ran_pascal" external pascal_pdf : int -> p:float -> n:int -> float = "ml_gsl_ran_pascal_pdf" external geometric : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_geometric" external geometric_pdf : int -> p:float -> float = "ml_gsl_ran_geometric_pdf" external hypergeometric : Gsl_rng.t -> n1:int -> n2:int -> t:int -> int = "ml_gsl_ran_hypergeometric" external hypergeometric_pdf : int -> n1:int -> n2:int -> t:int -> float = "ml_gsl_ran_hypergeometric_pdf" external logarithmic : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_logarithmic" external logarithmic_pdf : int -> p:float -> float = "ml_gsl_ran_logarithmic_pdf" external shuffle : Gsl_rng.t -> 'a array -> unit = "ml_gsl_ran_shuffle" external choose : Gsl_rng.t -> src:'a array -> dst:'a array -> unit = "ml_gsl_ran_choose" external sample : Gsl_rng.t -> src:'a array -> dst:'a array -> unit = "ml_gsl_ran_sample" ocamlgsl-0.6.0/mlgsl_randist.c0000664000076400007640000002425010607755005015052 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include "wrappers.h" #include "mlgsl_rng.h" /* GAUSSIAN */ ML2(gsl_ran_gaussian, Rng_val, Double_val, copy_double) ML2(gsl_ran_gaussian_ratio_method, Rng_val, Double_val, copy_double) ML2(gsl_ran_gaussian_ziggurat, Rng_val, Double_val, copy_double) ML2(gsl_ran_gaussian_pdf, Double_val, Double_val, copy_double) ML1(gsl_ran_ugaussian, Rng_val, copy_double) ML1(gsl_ran_ugaussian_ratio_method, Rng_val, copy_double) ML1(gsl_ran_ugaussian_pdf, Double_val, copy_double) /* GAUSSIAN TAIL */ ML3(gsl_ran_gaussian_tail, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_gaussian_tail_pdf, Double_val, Double_val, Double_val ,copy_double) ML2(gsl_ran_ugaussian_tail, Rng_val, Double_val, copy_double) ML2(gsl_ran_ugaussian_tail_pdf, Double_val, Double_val, copy_double) /* BIVARIATE */ CAMLprim value ml_gsl_ran_bivariate_gaussian(value rng, value sigma_x, value sigma_y, value rho) { double x,y; gsl_ran_bivariate_gaussian(Rng_val(rng), Double_val(sigma_x), Double_val(sigma_y), Double_val(rho), &x, &y); return copy_two_double(x, y); } ML5(gsl_ran_bivariate_gaussian_pdf, Double_val, Double_val, Double_val, Double_val, Double_val, copy_double) /* EXPONENTIAL */ ML2(gsl_ran_exponential, Rng_val, Double_val, copy_double) ML2(gsl_ran_exponential_pdf, Double_val, Double_val, copy_double) /* LAPLACE */ ML2(gsl_ran_laplace, Rng_val, Double_val, copy_double) ML2(gsl_ran_laplace_pdf, Double_val, Double_val, copy_double) /* EXPONENTIAL POWER */ ML3(gsl_ran_exppow, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_exppow_pdf, Double_val, Double_val, Double_val, copy_double) /* CAUCHY */ ML2(gsl_ran_cauchy, Rng_val, Double_val, copy_double) ML2(gsl_ran_cauchy_pdf, Double_val, Double_val, copy_double) /* RAYLEIGH */ ML2(gsl_ran_rayleigh, Rng_val, Double_val, copy_double) ML2(gsl_ran_rayleigh_pdf, Double_val, Double_val, copy_double) /* RAYLEIGH TAIL */ ML3(gsl_ran_rayleigh_tail, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_rayleigh_tail_pdf, Double_val, Double_val, Double_val, copy_double) /* LANDAU */ ML1(gsl_ran_landau, Rng_val, copy_double) ML1(gsl_ran_landau_pdf, Double_val, copy_double) /* LEVY ALPHA-STABLE */ ML3(gsl_ran_levy, Rng_val, Double_val, Double_val, copy_double) /* LEVY SKEW ALPHA-STABLE */ ML4(gsl_ran_levy_skew, Rng_val, Double_val, Double_val, Double_val, copy_double) /* GAMMA */ ML3(gsl_ran_gamma, Rng_val, Double_val, Double_val, copy_double) ML2(gsl_ran_gamma_int, Rng_val, Unsigned_int_val, copy_double) ML3(gsl_ran_gamma_pdf, Double_val, Double_val, Double_val, copy_double) ML3(gsl_ran_gamma_mt, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_gamma_knuth, Rng_val, Double_val, Double_val, copy_double) /* FLAT */ ML3(gsl_ran_flat, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_flat_pdf, Double_val, Double_val, Double_val, copy_double) /* LOGNORMAL */ ML3(gsl_ran_lognormal, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_lognormal_pdf, Double_val, Double_val, Double_val, copy_double) /* CHISQ */ ML2(gsl_ran_chisq, Rng_val, Double_val, copy_double) ML2(gsl_ran_chisq_pdf, Double_val, Double_val, copy_double) /* DIRICHLET */ CAMLprim value ml_gsl_ran_dirichlet(value rng, value alpha, value theta) { const size_t K = Double_array_length(alpha); if(Double_array_length(theta) != K) GSL_ERROR("alpha and theta must have same size", GSL_EBADLEN); gsl_ran_dirichlet(Rng_val(rng), K, Double_array_val(alpha), Double_array_val(theta)); return Val_unit; } CAMLprim value ml_gsl_ran_dirichlet_pdf(value alpha, value theta) { const size_t K = Double_array_length(alpha); double r ; if(Double_array_length(theta) != K) GSL_ERROR("alpha and theta must have same size", GSL_EBADLEN); r = gsl_ran_dirichlet_pdf(K, Double_array_val(alpha), Double_array_val(theta)); return copy_double(r); } CAMLprim value ml_gsl_ran_dirichlet_lnpdf(value alpha, value theta) { const size_t K = Double_array_length(alpha); double r ; if(Double_array_length(theta) != K) GSL_ERROR("alpha and theta must have same size", GSL_EBADLEN); r = gsl_ran_dirichlet_lnpdf(K, Double_array_val(alpha), Double_array_val(theta)); return copy_double(r); } /* FDIST */ ML3(gsl_ran_fdist, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_fdist_pdf, Double_val, Double_val, Double_val, copy_double) /* TDIST */ ML2(gsl_ran_tdist, Rng_val, Double_val, copy_double) ML2(gsl_ran_tdist_pdf, Double_val, Double_val, copy_double) /* BETA */ ML3(gsl_ran_beta, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_beta_pdf, Double_val, Double_val, Double_val, copy_double) /* LOGISTIC */ ML2(gsl_ran_logistic, Rng_val, Double_val, copy_double) ML2(gsl_ran_logistic_pdf, Double_val, Double_val, copy_double) /* PARETO */ ML3(gsl_ran_pareto, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_pareto_pdf, Double_val, Double_val, Double_val, copy_double) /* SPHERICAL */ CAMLprim value ml_gsl_ran_dir_2d(value rng) { double x,y; gsl_ran_dir_2d(Rng_val(rng), &x, &y); return copy_two_double(x, y); } CAMLprim value ml_gsl_ran_dir_2d_trig_method(value rng) { double x,y; gsl_ran_dir_2d_trig_method(Rng_val(rng), &x, &y); return copy_two_double(x, y); } CAMLprim value ml_gsl_ran_dir_3d(value rng) { double x,y,z; gsl_ran_dir_3d(Rng_val(rng), &x, &y, &z); { CAMLparam0(); CAMLlocal1(r); r=alloc_tuple(3); Store_field(r, 0, copy_double(x)); Store_field(r, 1, copy_double(y)); Store_field(r, 2, copy_double(z)); CAMLreturn(r); } } CAMLprim value ml_gsl_ran_dir_nd(value rng, value x) { gsl_ran_dir_nd(Rng_val(rng), Double_array_length(x), Double_array_val(x)); return Val_unit; } /* WEIBULL */ ML3(gsl_ran_weibull, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_weibull_pdf, Double_val, Double_val, Double_val, copy_double) /* GUMBEL1 */ ML3(gsl_ran_gumbel1, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_gumbel1_pdf, Double_val, Double_val, Double_val, copy_double) /* GUMBEL2 */ ML3(gsl_ran_gumbel2, Rng_val, Double_val, Double_val, copy_double) ML3(gsl_ran_gumbel2_pdf, Double_val, Double_val, Double_val, copy_double) /* POISSON */ ML2(gsl_ran_poisson, Rng_val, Double_val, Val_int) ML2(gsl_ran_poisson_pdf, Int_val, Double_val, copy_double) /* BERNOULLI */ ML2(gsl_ran_bernoulli, Rng_val, Double_val, Val_int) ML2(gsl_ran_bernoulli_pdf, Int_val, Double_val, copy_double) /* BINOMIAL */ ML3(gsl_ran_binomial, Rng_val, Double_val, Int_val, Val_int) ML3(gsl_ran_binomial_knuth, Rng_val, Double_val, Int_val, Val_int) ML3(gsl_ran_binomial_tpe, Rng_val, Double_val, Int_val, Val_int) ML3(gsl_ran_binomial_pdf, Int_val, Double_val, Int_val, copy_double) /* MULTINOMIAL */ CAMLprim value ml_gsl_ran_multinomial(value rng, value n, value p) { const size_t K = Double_array_length(p); LOCALARRAY(unsigned int, N, K); value r; gsl_ran_multinomial(Rng_val(rng), K, Int_val(n), Double_array_val(p), N); { register int i; r = alloc(K, 0); for(i=0; i a:float -> b:float -> epsabs:float -> epsrel:float -> float * float * int = "ml_gsl_integration_qng" type workspace external alloc_ws : int -> workspace = "ml_gsl_integration_workspace_alloc" external free_ws : workspace -> unit = "ml_gsl_integration_workspace_free" let make_ws size = let ws = alloc_ws size in Gc.finalise free_ws ws ; ws external size : workspace -> int = "ml_gsl_integration_ws_size" type key = | GAUSS15 | GAUSS21 | GAUSS31 | GAUSS41 | GAUSS51 | GAUSS61 external qag : gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> key -> workspace -> result = "ml_gsl_integration_qag_bc" "ml_gsl_integration_qag" external qags : gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qags_bc" "ml_gsl_integration_qags" external qagp : gsl_fun -> pts:float array -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagp_bc" "ml_gsl_integration_qagp" external qagi : gsl_fun -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagi" external qagiu : gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagiu_bc" "ml_gsl_integration_qagiu" external qagil : gsl_fun -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagil_bc" "ml_gsl_integration_qagil" let qag_sing gslfun ~a ~b ?pts ?(limit=1000) ~epsabs ~epsrel () = if b < a then invalid_arg "qag_sing" ; let ws = make_ws limit in begin if b = infinity then begin if a = neg_infinity then qagi gslfun epsabs epsrel ws else qagiu gslfun a epsabs epsrel ws end else begin if a = neg_infinity then qagil gslfun b epsabs epsrel ws else begin match pts with | None -> qags gslfun a b epsabs epsrel ws | Some farr -> let len = Array.length farr in let arr = Array.make (2 + len) a in Array.blit farr 0 arr 1 len ; arr.(len + 1) <- b ; qagp gslfun arr epsabs epsrel ws end end end external qawc : gsl_fun -> a:float -> b:float -> c:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qawc_bc" "ml_gsl_integration_qawc" type qaws_table external alloc_qaws : alpha:float -> beta:float -> mu:int -> nu:int -> qaws_table = "ml_gsl_integration_qaws_table_alloc" external set_qaws : qaws_table -> alpha:float -> beta:float -> mu:int -> nu:int -> unit = "ml_gsl_integration_qaws_table_set" external free_qaws : qaws_table -> unit = "ml_gsl_integration_qaws_table_free" external qaws : gsl_fun -> a:float -> b:float -> qaws_table -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qaws_bc" "ml_gsl_integration_qaws" type qawo_table type qawo_sine = | QAWO_COSINE | QAWO_SINE external alloc_qawo : omega:float -> l:float -> qawo_sine -> n:int -> qawo_table = "ml_gsl_integration_qawo_table_alloc" external set_qawo : qawo_table -> omega:float -> l:float -> qawo_sine -> unit = "ml_gsl_integration_qawo_table_set" external free_qawo : qawo_table -> unit = "ml_gsl_integration_qawo_table_free" external qawo : gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> qawo_table -> result = "ml_gsl_integration_qawo_bc" "ml_gsl_integration_qawo" external qawf : gsl_fun -> a:float -> epsabs:float -> ?limit:int -> workspace -> workspace -> qawo_table -> result = "ml_gsl_integration_qawf_bc" "ml_gsl_integration_qawf" ocamlgsl-0.6.0/gsl_integration.mli0000664000076400007640000000634210600031632015723 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Numerical Integration *) open Gsl_fun external qng : gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> float * float * int = "ml_gsl_integration_qng" type workspace val make_ws : int -> workspace external size : workspace -> int = "ml_gsl_integration_ws_size" type key = | GAUSS15 | GAUSS21 | GAUSS31 | GAUSS41 | GAUSS51 | GAUSS61 external qag : gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> key -> workspace -> result = "ml_gsl_integration_qag_bc" "ml_gsl_integration_qag" external qags : gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qags_bc" "ml_gsl_integration_qags" external qagp : gsl_fun -> pts:float array -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagp_bc" "ml_gsl_integration_qagp" external qagi : gsl_fun -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagi" external qagiu : gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagiu_bc" "ml_gsl_integration_qagiu" external qagil : gsl_fun -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qagil_bc" "ml_gsl_integration_qagil" val qag_sing : gsl_fun -> a:float -> b:float -> ?pts:float array -> ?limit:int -> epsabs:float -> epsrel:float -> unit -> result external qawc : gsl_fun -> a:float -> b:float -> c:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qawc_bc" "ml_gsl_integration_qawc" type qaws_table external alloc_qaws : alpha:float -> beta:float -> mu:int -> nu:int -> qaws_table = "ml_gsl_integration_qaws_table_alloc" external set_qaws : qaws_table -> alpha:float -> beta:float -> mu:int -> nu:int -> unit = "ml_gsl_integration_qaws_table_set" external free_qaws : qaws_table -> unit = "ml_gsl_integration_qaws_table_free" external qaws : gsl_fun -> a:float -> b:float -> qaws_table -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> result = "ml_gsl_integration_qaws_bc" "ml_gsl_integration_qaws" type qawo_table type qawo_sine = | QAWO_COSINE | QAWO_SINE external alloc_qawo : omega:float -> l:float -> qawo_sine -> n:int -> qawo_table = "ml_gsl_integration_qawo_table_alloc" external set_qawo : qawo_table -> omega:float -> l:float -> qawo_sine -> unit = "ml_gsl_integration_qawo_table_set" external free_qawo : qawo_table -> unit = "ml_gsl_integration_qawo_table_free" external qawo : gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> qawo_table -> result = "ml_gsl_integration_qawo_bc" "ml_gsl_integration_qawo" external qawf : gsl_fun -> a:float -> epsabs:float -> ?limit:int -> workspace -> workspace -> qawo_table -> result = "ml_gsl_integration_qawf_bc" "ml_gsl_integration_qawf" ocamlgsl-0.6.0/mlgsl_integration.c0000664000076400007640000002366410600031632015723 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include #include "mlgsl_fun.h" #include "wrappers.h" /* QNG integration */ CAMLprim value ml_gsl_integration_qng(value fun, value a, value b, value epsabs, value epsrel) { CAMLparam1(fun); CAMLlocal3(res, r, e); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t neval; gsl_integration_qng(&gf, Double_val(a), Double_val(b), Double_val(epsabs), Double_val(epsrel), &result, &abserr, &neval); r = copy_double(result); e = copy_double(abserr); res = alloc_small(3, 0); Field(res, 0) = r; Field(res, 1) = e; Field(res, 2) = Val_int(neval); CAMLreturn(res); } /* WORKSPACE */ #define GSL_WS(v) (gsl_integration_workspace *)(Field((v), 0)) ML1_alloc(gsl_integration_workspace_alloc, Int_val, Abstract_ptr) ML1(gsl_integration_workspace_free, GSL_WS, Unit) CAMLprim value ml_gsl_integration_ws_size(value ws) { return Val_int((GSL_WS(ws))->size); } /* QAG Integration */ CAMLprim value ml_gsl_integration_qag(value fun, value a, value b, value epsabs, value epsrel, value limit, value key, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; static const int key_conv [] = { GSL_INTEG_GAUSS15, GSL_INTEG_GAUSS21, GSL_INTEG_GAUSS31, GSL_INTEG_GAUSS41, GSL_INTEG_GAUSS51, GSL_INTEG_GAUSS61 }; int c_key = key_conv [ Int_val(key) ]; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qag(&gf, Double_val(a), Double_val(b), Double_val(epsabs), Double_val(epsrel), c_limit, c_key, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qag_bc(value *args, int nb) { return ml_gsl_integration_qag(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); } CAMLprim value ml_gsl_integration_qags(value fun, value a, value b, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qags(&gf, Double_val(a), Double_val(b), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qags_bc(value *args, int nb) { return ml_gsl_integration_qags(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } CAMLprim value ml_gsl_integration_qagp(value fun, value pts, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qagp(&gf, Double_array_val(pts), Double_array_length(pts), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qagp_bc(value *args, int nb) { return ml_gsl_integration_qagp(args[0], args[1], args[2], args[3], args[4], args[5]); } CAMLprim value ml_gsl_integration_qagi(value fun, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val,gslws->limit); gsl_integration_qagi(&gf, Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qagiu(value fun, value a, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qagiu(&gf, Double_val(a), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qagiu_bc(value *args, int nb) { return ml_gsl_integration_qagiu(args[0], args[1], args[2], args[3], args[4], args[5]); } CAMLprim value ml_gsl_integration_qagil(value fun, value b, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qagil(&gf, Double_val(b), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qagil_bc(value *args, int nb) { return ml_gsl_integration_qagil(args[0], args[1], args[2], args[3], args[4], args[5]); } /* QAWC integration */ CAMLprim value ml_gsl_integration_qawc(value fun, value a, value b, value c, value epsabs, value epsrel, value limit, value ws) { CAMLparam2(fun, ws); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qawc(&gf, Double_val(a), Double_val(b), Double_val(c), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qawc_bc(value *args, int nb) { return ml_gsl_integration_qawc(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); } /* QAWS integration */ CAMLprim value ml_gsl_integration_qaws_table_alloc(value alpha, value beta, value mu, value nu) { value res; Abstract_ptr(res, gsl_integration_qaws_table_alloc(Double_val(alpha), Double_val(beta), Int_val(mu), Int_val(nu))); return res; } #define QAWSTABLE_VAL(v) (gsl_integration_qaws_table *)Field((v), 0) ML5(gsl_integration_qaws_table_set, QAWSTABLE_VAL, Double_val, Double_val, Int_val, Int_val, Unit) ML1(gsl_integration_qaws_table_free, QAWSTABLE_VAL, Unit) CAMLprim value ml_gsl_integration_qaws(value fun, value a, value b, value table , value epsabs, value epsrel, value limit, value ws) { CAMLparam3(fun, ws, table); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qaws(&gf, Double_val(a), Double_val(b), QAWSTABLE_VAL(table), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qaws_bc(value *args, int nb) { return ml_gsl_integration_qaws(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]); } /* QAWO integration */ static inline enum gsl_integration_qawo_enum qawo_of_val(value sine) { static const enum gsl_integration_qawo_enum qawo_sine[] = { GSL_INTEG_COSINE, GSL_INTEG_SINE }; return qawo_sine[Int_val(sine)]; } CAMLprim value ml_gsl_integration_qawo_table_alloc(value omega, value l, value sine, value n) { value res; Abstract_ptr(res, gsl_integration_qawo_table_alloc(Double_val(omega), Double_val(l), qawo_of_val(sine), Int_val(n))); return res; } #define QAWOTABLE_VAL(v) (gsl_integration_qawo_table *)Field((v), 0) ML4(gsl_integration_qawo_table_set, QAWOTABLE_VAL, Double_val, Double_val, qawo_of_val, Unit) ML1(gsl_integration_qawo_table_free, QAWOTABLE_VAL, Unit) CAMLprim value ml_gsl_integration_qawo(value fun, value a, value epsabs, value epsrel, value limit, value ws, value table) { CAMLparam3(fun, ws, table); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qawo(&gf, Double_val(a), Double_val(epsabs), Double_val(epsrel), c_limit, gslws, QAWOTABLE_VAL(table), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qawo_bc(value *args, int nb) { return ml_gsl_integration_qawo(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } CAMLprim value ml_gsl_integration_qawf(value fun, value a, value epsabs, value limit, value ws, value cyclews, value table) { CAMLparam4(fun, ws, cyclews, table); GSLFUN_CLOSURE(gf, fun); double result, abserr; size_t c_limit; gsl_integration_workspace *gslws = GSL_WS(ws); c_limit = Opt_arg(limit, Int_val, gslws->limit); gsl_integration_qawf(&gf, Double_val(a), Double_val(epsabs), c_limit, gslws, GSL_WS(cyclews), QAWOTABLE_VAL(table), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_integration_qawf_bc(value *args, int nb) { return ml_gsl_integration_qawf(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } ocamlgsl-0.6.0/gsl_fit.ml0000664000076400007640000000152010600031632014002 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type linear_fit_coeffs = { c0 : float; c1 : float; cov00 : float ; cov01 : float ; cov11 : float; sumsq : float ; } external linear : ?weight:float array -> float array -> float array -> linear_fit_coeffs = "ml_gsl_fit_linear" external linear_est : float -> coeffs:linear_fit_coeffs -> Gsl_fun.result = "ml_gsl_fit_linear_est" type mul_fit_coeffs = { m_c1 : float ; m_cov11 : float ; m_sumsq : float ; } external mul : ?weight:float array -> float array -> float array -> mul_fit_coeffs = "ml_gsl_fit_mul" external mul_est : float -> coeffs:mul_fit_coeffs -> Gsl_fun.result = "ml_gsl_fit_mul_est" ocamlgsl-0.6.0/gsl_fit.mli0000664000076400007640000000154110600031632014156 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Least-Squares Fitting *) type linear_fit_coeffs = { c0 : float; c1 : float; cov00 : float ; cov01 : float ; cov11 : float; sumsq : float ; } external linear : ?weight:float array -> float array -> float array -> linear_fit_coeffs = "ml_gsl_fit_linear" external linear_est : float -> coeffs:linear_fit_coeffs -> Gsl_fun.result = "ml_gsl_fit_linear_est" type mul_fit_coeffs = { m_c1 : float ; m_cov11 : float ; m_sumsq : float ; } external mul : ?weight:float array -> float array -> float array -> mul_fit_coeffs = "ml_gsl_fit_mul" external mul_est : float -> coeffs:mul_fit_coeffs -> Gsl_fun.result = "ml_gsl_fit_mul_est" ocamlgsl-0.6.0/mlgsl_fit.c0000664000076400007640000001162710600031632014156 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" #include "mlgsl_matrix_double.h" #include "mlgsl_vector_double.h" CAMLprim value ml_gsl_fit_linear(value wo, value x, value y) { value r; size_t N=Double_array_length(x); double c0,c1,cov00,cov01,cov11,sumsq; if(Double_array_length(y) != N) GSL_ERROR("array sizes differ", GSL_EBADLEN); if(wo == Val_none) gsl_fit_linear(Double_array_val(x), 1, Double_array_val(y), 1, N, &c0, &c1, &cov00, &cov01, &cov11, &sumsq); else { value w=Field(wo, 0); if(Double_array_length(w) != N) GSL_ERROR("array sizes differ", GSL_EBADLEN); gsl_fit_wlinear(Double_array_val(x), 1, Double_array_val(w), 1, Double_array_val(y), 1, N, &c0, &c1, &cov00, &cov01, &cov11, &sumsq); } r=alloc_small(6 * Double_wosize, Double_array_tag); Store_double_field(r, 0, c0); Store_double_field(r, 1, c1); Store_double_field(r, 2, cov00); Store_double_field(r, 3, cov01); Store_double_field(r, 4, cov11); Store_double_field(r, 5, sumsq); return r; } CAMLprim value ml_gsl_fit_linear_est(value x, value coeffs) { double y,y_err; gsl_fit_linear_est(Double_val(x), Double_field(coeffs, 0), Double_field(coeffs, 1), Double_field(coeffs, 2), Double_field(coeffs, 3), Double_field(coeffs, 4), &y, &y_err); return copy_two_double_arr(y, y_err); } CAMLprim value ml_gsl_fit_mul(value wo, value x, value y) { value r; size_t N=Double_array_length(x); double c1,cov11,sumsq; if(Double_array_length(y) != N) GSL_ERROR("array sizes differ", GSL_EBADLEN); if(wo == Val_none) gsl_fit_mul(Double_array_val(x), 1, Double_array_val(y), 1, N, &c1, &cov11, &sumsq); else { value w=Field(wo, 0); if(Double_array_length(w) != N) GSL_ERROR("array sizes differ", GSL_EBADLEN); gsl_fit_wmul(Double_array_val(x), 1, Double_array_val(w), 1, Double_array_val(y), 1, N, &c1, &cov11, &sumsq); } r=alloc_small(3 * Double_wosize, Double_array_tag); Store_double_field(r, 0, c1); Store_double_field(r, 1, cov11); Store_double_field(r, 2, sumsq); return r; } CAMLprim value ml_gsl_fit_mul_est(value x, value coeffs) { double y,y_err; gsl_fit_mul_est(Double_val(x), Double_field(coeffs, 0), Double_field(coeffs, 1), &y, &y_err); return copy_two_double_arr(y, y_err); } /* MULTIFIT */ CAMLprim value ml_gsl_multifit_linear_alloc(value n, value p) { value r; Abstract_ptr(r, gsl_multifit_linear_alloc(Int_val(n), Int_val(p))); return r; } #define MultifitWS_val(v) ((gsl_multifit_linear_workspace *)(Field((v), 0))) ML1(gsl_multifit_linear_free, MultifitWS_val, Unit) CAMLprim value ml_gsl_multifit_linear(value wo, value x, value y, value c, value cov, value ws) { double chisq; _DECLARE_MATRIX2(x,cov); _DECLARE_VECTOR2(y,c); _CONVERT_MATRIX2(x,cov); _CONVERT_VECTOR2(y,c); if(wo == Val_none) gsl_multifit_linear(&m_x, &v_y, &v_c, &m_cov, &chisq, MultifitWS_val(ws)); else { value w=Field(wo, 0); _DECLARE_VECTOR(w); _CONVERT_VECTOR(w); gsl_multifit_wlinear(&m_x, &v_w, &v_y, &v_c, &m_cov, &chisq, MultifitWS_val(ws)); } return copy_double(chisq); } CAMLprim value ml_gsl_multifit_linear_bc(value *args, int argc) { return ml_gsl_multifit_linear(args[0], args[1], args[2], args[3], args[4], args[5]); } CAMLprim value ml_gsl_multifit_linear_svd(value wo, value x, value y, value tol, value c, value cov, value ws) { size_t rank; double chisq; _DECLARE_MATRIX2(x,cov); _DECLARE_VECTOR2(y,c); _CONVERT_MATRIX2(x,cov); _CONVERT_VECTOR2(y,c); if(wo == Val_none) gsl_multifit_linear_svd(&m_x, &v_y, Double_val(tol), &rank, &v_c, &m_cov, &chisq, MultifitWS_val(ws)); else { value w=Field(wo, 0); _DECLARE_VECTOR(w); _CONVERT_VECTOR(w); gsl_multifit_wlinear_svd(&m_x, &v_w, &v_y, Double_val(tol), &rank, &v_c, &m_cov, &chisq, MultifitWS_val(ws)); } { CAMLparam0(); CAMLlocal2(r, v_chisq); v_chisq = copy_double (chisq); r = alloc_small (2, 0); Field (r, 0) = Val_long (rank); Field (r, 1) = v_chisq; CAMLreturn(r); } } CAMLprim value ml_gsl_multifit_linear_svd_bc(value *args, int argc) { return ml_gsl_multifit_linear_svd(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } CAMLprim value ml_gsl_multifit_linear_est (value x, value c, value cov) { double y, y_err; _DECLARE_VECTOR2(x, c); _DECLARE_MATRIX(cov); _CONVERT_VECTOR2(x, c); _CONVERT_MATRIX(cov); gsl_multifit_linear_est (&v_x, &v_c, &m_cov, &y, &y_err); return copy_two_double_arr (y, y_err); } ocamlgsl-0.6.0/gsl_multifit.ml0000664000076400007640000000357010600031632015064 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_vectmat type ws external alloc_ws : int -> int -> ws = "ml_gsl_multifit_linear_alloc" external free_ws : ws -> unit = "ml_gsl_multifit_linear_free" let make ~n ~p = let ws = alloc_ws n p in Gc.finalise free_ws ws ; ws external _linear : ?weight:vec -> x:mat -> y:vec -> c:vec -> cov:mat -> ws -> float = "ml_gsl_multifit_linear_bc" "ml_gsl_multifit_linear" external _linear_svd : ?weight:vec -> x:mat -> y:vec -> tol:float -> c:vec -> cov:mat -> ws -> int * float = "ml_gsl_multifit_linear_svd_bc" "ml_gsl_multifit_linear_svd" let linear ?weight x y = let (n,p) = Gsl_vectmat.dims x in let dy = Gsl_vectmat.length y in if dy <> n then invalid_arg "Gsl_multifit.linear: wrong dimensions" ; Gsl_misc.may weight (fun w -> if Gsl_vectmat.length w <> n then invalid_arg "Gsl_multifit.linear: wrong dimensions") ; let c = Gsl_vector.create p in let cov = Gsl_matrix.create p p in let ws = alloc_ws n p in try let chisq = _linear ?weight ~x ~y ~c:(`V c) ~cov:(`M cov) ws in free_ws ws ; (c, cov, chisq) with exn -> free_ws ws ; raise exn external linear_est : x:vec -> c:vec -> cov:mat -> Gsl_fun.result = "ml_gsl_multifit_linear_est" let fit_poly ?weight ~x ~y order = let n = Array.length y in let x_mat = Gsl_matrix.create n (succ order) in for i=0 to pred n do let xi = x.(i) in for j=0 to order do x_mat.{i, j} <- Gsl_math.pow_int xi j done done ; let weight = match weight with | None -> None | Some a -> Some (vec_convert (`A a)) in let (c, cov, chisq) = linear ?weight (`M x_mat) (vec_convert (`A y)) in (Gsl_vector.to_array c, Gsl_matrix.to_arrays cov, chisq) ocamlgsl-0.6.0/gsl_multifit.mli0000664000076400007640000000166710600031632015242 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Multi-parameter Least-Squares Fitting *) open Gsl_vectmat type ws val make : n:int -> p:int -> ws external _linear : ?weight:vec -> x:mat -> y:vec -> c:vec -> cov:mat -> ws -> float = "ml_gsl_multifit_linear_bc" "ml_gsl_multifit_linear" external _linear_svd : ?weight:vec -> x:mat -> y:vec -> tol:float -> c:vec -> cov:mat -> ws -> int * float = "ml_gsl_multifit_linear_svd_bc" "ml_gsl_multifit_linear_svd" val linear : ?weight:vec -> mat -> vec -> Gsl_vector.vector * Gsl_matrix.matrix * float external linear_est : x:vec -> c:vec -> cov:mat -> Gsl_fun.result = "ml_gsl_multifit_linear_est" val fit_poly : ?weight:float array -> x:float array -> y:float array -> int -> float array * float array array * float ocamlgsl-0.6.0/gsl_multifit_nlin.ml0000664000076400007640000000235210600031632016101 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_fun open Gsl_vector type t type kind = | LMSDER | LMDER external _alloc : kind -> n:int -> p:int -> t = "ml_gsl_multifit_fdfsolver_alloc" external _free : t -> unit = "ml_gsl_multifit_fdfsolver_free" external _set : t -> multi_fun_fdf -> vector -> unit = "ml_gsl_multifit_fdfsolver_set" let make kind ~n ~p gf x = let s = _alloc kind ~n ~p in Gc.finalise _free s ; _set s gf x ; s external name : t -> string = "ml_gsl_multifit_fdfsolver_name" external iterate : t -> unit = "ml_gsl_multifit_fdfsolver_iterate" external position : t -> vector -> unit = "ml_gsl_multifit_fdfsolver_position" external get_state : t -> ?x:vector -> ?f:vector -> ?dx:vector -> unit -> unit = "ml_gsl_multifit_fdfsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multifit_test_delta" external test_gradient : t -> epsabs:float -> vector -> bool = "ml_gsl_multifit_test_gradient" external covar : t -> epsrel:float -> Gsl_matrix.matrix -> unit = "ml_gsl_multifit_covar" ocamlgsl-0.6.0/gsl_multifit_nlin.mli0000664000076400007640000000177110600031632016256 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Nonlinear Least-Squares Fitting *) open Gsl_fun open Gsl_vector type t type kind = | LMSDER | LMDER val make : kind -> n:int -> p:int -> multi_fun_fdf -> vector -> t external name : t -> string = "ml_gsl_multifit_fdfsolver_name" external iterate : t -> unit = "ml_gsl_multifit_fdfsolver_iterate" external position : t -> vector -> unit = "ml_gsl_multifit_fdfsolver_position" external get_state : t -> ?x:vector -> ?f:vector -> ?dx:vector -> unit -> unit = "ml_gsl_multifit_fdfsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multifit_test_delta" external test_gradient : t -> epsabs:float -> vector -> bool = "ml_gsl_multifit_test_gradient" external covar : t -> epsrel:float -> Gsl_matrix.matrix -> unit = "ml_gsl_multifit_covar" ocamlgsl-0.6.0/mlgsl_multifit.c0000664000076400007640000000757510607751036015256 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" #include "mlgsl_vector_double.h" #include "mlgsl_matrix_double.h" /* solvers */ static const gsl_multifit_fdfsolver_type *fdfsolver_of_value(value t) { const gsl_multifit_fdfsolver_type *solver_types[] = { gsl_multifit_fdfsolver_lmsder, gsl_multifit_fdfsolver_lmder, } ; return solver_types[Int_val(t)]; } CAMLprim value ml_gsl_multifit_fdfsolver_alloc(value type, value n, value p) { gsl_multifit_fdfsolver *S; struct callback_params *params; value res; S=gsl_multifit_fdfsolver_alloc(fdfsolver_of_value(type), Int_val(n), Int_val(p)); params=stat_alloc(sizeof(*params)); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)S; Field(res, 1) = (value)params; params->gslfun.mffdf.f = &gsl_multifit_callback_f; params->gslfun.mffdf.df = &gsl_multifit_callback_df; params->gslfun.mffdf.fdf = &gsl_multifit_callback_fdf; params->gslfun.mffdf.n = Int_val(n); params->gslfun.mffdf.p = Int_val(p); params->gslfun.mffdf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); return res; } #define FDFSOLVER_VAL(v) ((gsl_multifit_fdfsolver *)(Field(v, 0))) #define CALLBACKPARAMS_VAL(v) ((struct callback_params *)(Field(v, 1))) CAMLprim value ml_gsl_multifit_fdfsolver_set(value S, value fun, value x) { CAMLparam2(S, x); struct callback_params *p=CALLBACKPARAMS_VAL(S); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); p->closure = fun; gsl_multifit_fdfsolver_set(FDFSOLVER_VAL(S), &(p->gslfun.mffdf), &v_x); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multifit_fdfsolver_free(value S) { struct callback_params *p=CALLBACKPARAMS_VAL(S); remove_global_root(&(p->closure)); stat_free(p); gsl_multifit_fdfsolver_free(FDFSOLVER_VAL(S)); return Val_unit; } ML1(gsl_multifit_fdfsolver_name, FDFSOLVER_VAL, copy_string) ML1(gsl_multifit_fdfsolver_iterate, FDFSOLVER_VAL, Unit) CAMLprim value ml_gsl_multifit_fdfsolver_position(value S, value x) { CAMLparam2(S, x); gsl_vector *pos; _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); pos=gsl_multifit_fdfsolver_position(FDFSOLVER_VAL(S)); gsl_vector_memcpy(&v_x, pos); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multifit_fdfsolver_get_state(value solv, value xo, value fo, value dxo, value unit) { gsl_multifit_fdfsolver *S=FDFSOLVER_VAL(solv); if(Is_block(xo)) { value x=Unoption(xo); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); gsl_vector_memcpy(&v_x, S->x); } if(Is_block(fo)) { value f=Unoption(fo); _DECLARE_VECTOR(f); _CONVERT_VECTOR(f); gsl_vector_memcpy(&v_f, S->f); } if(Is_block(dxo)) { value dx=Unoption(dxo); _DECLARE_VECTOR(dx); _CONVERT_VECTOR(dx); gsl_vector_memcpy(&v_dx, S->dx); } return Val_unit; } CAMLprim value ml_gsl_multifit_test_delta(value S, value epsabs, value epsrel) { gsl_multifit_fdfsolver *solv=FDFSOLVER_VAL(S); int status = gsl_multifit_test_delta(solv->dx, solv->x, Double_val(epsabs), Double_val(epsrel)); return Val_negbool(status); } CAMLprim value ml_gsl_multifit_test_gradient(value S, value epsabs, value g) { int status; gsl_multifit_fdfsolver *solv=FDFSOLVER_VAL(S); _DECLARE_VECTOR(g); _CONVERT_VECTOR(g); gsl_multifit_gradient(solv->J, solv->f, &v_g); status = gsl_multifit_test_gradient(&v_g, Double_val(epsabs)); return Val_negbool(status); } CAMLprim value ml_gsl_multifit_covar(value S, value epsrel, value covar) { _DECLARE_MATRIX(covar); _CONVERT_MATRIX(covar); gsl_multifit_covar(FDFSOLVER_VAL(S)->J, Double_val(epsrel), &m_covar); return Val_unit; } ocamlgsl-0.6.0/gsl_root.ml0000664000076400007640000000336410600031632014213 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) module Bracket = struct type kind = | BISECTION | FALSEPOS | BRENT type t external _alloc : kind -> t = "ml_gsl_root_fsolver_alloc" external _free : t -> unit = "ml_gsl_root_fsolver_free" external _set : t -> Gsl_fun.gsl_fun -> float -> float -> unit = "ml_gsl_root_fsolver_set" let make kind f x y = let s = _alloc kind in Gc.finalise _free s ; _set s f x y ; s external name : t -> string = "ml_gsl_root_fsolver_name" external iterate : t -> unit = "ml_gsl_root_fsolver_iterate" external root : t -> float = "ml_gsl_root_fsolver_root" external interval : t -> float * float = "ml_gsl_root_fsolver_x_interv" end module Polish = struct type kind = | NEWTON | SECANT | STEFFENSON type t external _alloc : kind -> t = "ml_gsl_root_fdfsolver_alloc" external _free : t -> unit = "ml_gsl_root_fdfsolver_free" external _set : t -> Gsl_fun.gsl_fun_fdf -> float -> unit = "ml_gsl_root_fdfsolver_set" let make kind f r = let s = _alloc kind in Gc.finalise _free s ; _set s f r ; s external name : t -> string = "ml_gsl_root_fdfsolver_name" external iterate : t -> unit = "ml_gsl_root_fdfsolver_iterate" external root : t -> float = "ml_gsl_root_fdfsolver_root" end external test_interval : lo:float -> up:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_root_test_interval" external test_delta : x1:float -> x0:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_root_test_delta" external test_residual : f:float -> epsabs:float -> bool = "ml_gsl_root_test_residual" ocamlgsl-0.6.0/gsl_root.mli0000664000076400007640000000241310600031632014356 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** One dimensional Root-Finding *) module Bracket : sig type kind = | BISECTION | FALSEPOS | BRENT type t val make : kind -> Gsl_fun.gsl_fun -> float -> float -> t external name : t -> string = "ml_gsl_root_fsolver_name" external iterate : t -> unit = "ml_gsl_root_fsolver_iterate" external root : t -> float = "ml_gsl_root_fsolver_root" external interval : t -> float * float = "ml_gsl_root_fsolver_x_interv" end module Polish : sig type kind = | NEWTON | SECANT | STEFFENSON type t val make : kind -> Gsl_fun.gsl_fun_fdf -> float -> t external name : t -> string = "ml_gsl_root_fdfsolver_name" external iterate : t -> unit = "ml_gsl_root_fdfsolver_iterate" external root : t -> float = "ml_gsl_root_fdfsolver_root" end external test_interval : lo:float -> up:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_root_test_interval" external test_delta : x1:float -> x0:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_root_test_delta" external test_residual : f:float -> epsabs:float -> bool = "ml_gsl_root_test_residual" ocamlgsl-0.6.0/mlgsl_roots.c0000664000076400007640000000767510607751014014564 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" static const gsl_root_fsolver_type *Fsolvertype_val(value solver_type) { const gsl_root_fsolver_type *solvers[] = { gsl_root_fsolver_bisection, gsl_root_fsolver_falsepos, gsl_root_fsolver_brent }; return solvers[Int_val(solver_type)]; } static const gsl_root_fdfsolver_type *FDFsolvertype_val(value solver_type) { const gsl_root_fdfsolver_type *solvers[] = { gsl_root_fdfsolver_newton, gsl_root_fdfsolver_secant, gsl_root_fdfsolver_steffenson }; return solvers[Int_val(solver_type)]; } CAMLprim value ml_gsl_root_fsolver_alloc(value t) { struct callback_params *params; gsl_root_fsolver *s; s = gsl_root_fsolver_alloc(Fsolvertype_val(t)); params=stat_alloc(sizeof(*params)); { CAMLparam0(); CAMLlocal1(res); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; params->gslfun.gf.function = &gslfun_callback; params->gslfun.gf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); CAMLreturn(res); } } CAMLprim value ml_gsl_root_fdfsolver_alloc(value t) { struct callback_params *params; gsl_root_fdfsolver *s; s = gsl_root_fdfsolver_alloc(FDFsolvertype_val(t)); params=stat_alloc(sizeof(*params)); { CAMLparam0(); CAMLlocal1(res); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; params->gslfun.gfdf.f = &gslfun_callback_f; params->gslfun.gfdf.df = &gslfun_callback_df; params->gslfun.gfdf.fdf = &gslfun_callback_fdf; params->gslfun.gfdf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); CAMLreturn(res); } } #define Fsolver_val(v) ((gsl_root_fsolver *)Field((v), 0)) #define FDFsolver_val(v) ((gsl_root_fdfsolver *)Field((v), 0)) #define Fparams_val(v) ((struct callback_params *)Field((v), 1)) CAMLprim value ml_gsl_root_fsolver_set(value s, value f, value lo, value hi) { CAMLparam1(s); struct callback_params *p=Fparams_val(s); p->closure=f; gsl_root_fsolver_set(Fsolver_val(s), &(p->gslfun.gf), Double_val(lo), Double_val(hi)); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_root_fdfsolver_set(value s, value f, value r) { CAMLparam1(s); struct callback_params *p=Fparams_val(s); p->closure=f; gsl_root_fdfsolver_set(FDFsolver_val(s), &(p->gslfun.gfdf), Double_val(r)); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_root_fsolver_free(value s) { struct callback_params *p=Fparams_val(s); remove_global_root(&(p->closure)); stat_free(p); gsl_root_fsolver_free(Fsolver_val(s)); return Val_unit; } CAMLprim value ml_gsl_root_fdfsolver_free(value s) { struct callback_params *p=Fparams_val(s); remove_global_root(&(p->closure)); stat_free(p); gsl_root_fdfsolver_free(FDFsolver_val(s)); return Val_unit; } ML1(gsl_root_fsolver_name, Fsolver_val, copy_string) ML1(gsl_root_fdfsolver_name, FDFsolver_val, copy_string) ML1(gsl_root_fsolver_iterate, Fsolver_val, Unit) ML1(gsl_root_fdfsolver_iterate, FDFsolver_val, Unit) ML1(gsl_root_fsolver_root, Fsolver_val, copy_double) ML1(gsl_root_fdfsolver_root, FDFsolver_val, copy_double) CAMLprim value ml_gsl_root_fsolver_x_interv(value S) { return copy_two_double(gsl_root_fsolver_x_lower(Fsolver_val(S)), gsl_root_fsolver_x_upper(Fsolver_val(S))); } ML4(gsl_root_test_interval, Double_val, Double_val, Double_val, Double_val, Val_negbool) ML4(gsl_root_test_delta, Double_val, Double_val, Double_val, Double_val, Val_negbool) ML2(gsl_root_test_residual, Double_val, Double_val, Val_negbool) ocamlgsl-0.6.0/gsl_multiroot.ml0000664000076400007640000000427010600031632015263 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_fun open Gsl_vector module NoDeriv = struct type kind = | HYBRIDS | HYBRID | DNEWTON | BROYDEN type t external _alloc : kind -> int -> t = "ml_gsl_multiroot_fsolver_alloc" external _free : t -> unit = "ml_gsl_multiroot_fsolver_free" external _set : t -> multi_fun -> vector -> unit = "ml_gsl_multiroot_fsolver_set" let make kind dim f x = let s = _alloc kind dim in Gc.finalise _free s ; _set s f x ; s external name : t -> string = "ml_gsl_multiroot_fsolver_name" external iterate : t -> unit = "ml_gsl_multiroot_fsolver_iterate" external root : t -> vector -> unit = "ml_gsl_multiroot_fsolver_root" external get_state : t -> ?x:vector -> ?f:vector -> ?dx:vector -> unit -> unit = "ml_gsl_multiroot_fsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multiroot_test_delta_f" external test_residual : t -> epsabs:float -> bool = "ml_gsl_multiroot_test_residual_f" end module Deriv = struct type kind = | HYBRIDSJ | HYBRIDJ | NEWTON | GNEWTON type t external _alloc : kind -> int -> t = "ml_gsl_multiroot_fdfsolver_alloc" external _free : t -> unit = "ml_gsl_multiroot_fdfsolver_free" external _set : t -> multi_fun_fdf -> vector -> unit = "ml_gsl_multiroot_fdfsolver_set" let make kind dim f x = let s = _alloc kind dim in Gc.finalise _free s ; _set s f x ; s external name : t -> string = "ml_gsl_multiroot_fdfsolver_name" external root : t -> vector -> unit = "ml_gsl_multiroot_fdfsolver_root" external iterate : t -> unit = "ml_gsl_multiroot_fdfsolver_iterate" external get_state : t -> ?x:vector -> ?f:vector -> ?j:Gsl_matrix.matrix -> ?dx:vector -> unit -> unit = "ml_gsl_multiroot_fdfsolver_get_state_bc" "ml_gsl_multiroot_fdfsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multiroot_test_delta_fdf" external test_residual : t -> epsabs:float -> bool = "ml_gsl_multiroot_test_residual_fdf" end ocamlgsl-0.6.0/gsl_multiroot.mli0000664000076400007640000000325610600031632015437 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Multidimensional Root-Finding *) open Gsl_fun open Gsl_vector module NoDeriv : sig type kind = | HYBRIDS | HYBRID | DNEWTON | BROYDEN type t val make : kind -> int -> multi_fun -> vector -> t external name : t -> string = "ml_gsl_multiroot_fsolver_name" external iterate : t -> unit = "ml_gsl_multiroot_fsolver_iterate" external root : t -> vector -> unit = "ml_gsl_multiroot_fsolver_root" external get_state : t -> ?x:vector -> ?f:vector -> ?dx:vector -> unit -> unit = "ml_gsl_multiroot_fsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multiroot_test_delta_f" external test_residual : t -> epsabs:float -> bool = "ml_gsl_multiroot_test_residual_f" end module Deriv : sig type kind = | HYBRIDSJ | HYBRIDJ | NEWTON | GNEWTON type t val make : kind -> int -> multi_fun_fdf -> vector -> t external name : t -> string = "ml_gsl_multiroot_fdfsolver_name" external iterate : t -> unit = "ml_gsl_multiroot_fdfsolver_iterate" external root : t -> vector -> unit = "ml_gsl_multiroot_fdfsolver_root" external get_state : t -> ?x:vector -> ?f:vector -> ?j:Gsl_matrix.matrix -> ?dx:vector -> unit -> unit = "ml_gsl_multiroot_fdfsolver_get_state_bc" "ml_gsl_multiroot_fdfsolver_get_state" external test_delta : t -> epsabs:float -> epsrel:float -> bool = "ml_gsl_multiroot_test_delta_fdf" external test_residual : t -> epsabs:float -> bool = "ml_gsl_multiroot_test_residual_fdf" end ocamlgsl-0.6.0/mlgsl_multiroots.c0000664000076400007640000001653310607751402015631 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" #include "mlgsl_vector_double.h" #include "mlgsl_matrix_double.h" /* solvers */ static const gsl_multiroot_fsolver_type *fsolver_of_value(value t) { const gsl_multiroot_fsolver_type *solver_types[] = { gsl_multiroot_fsolver_hybrids, gsl_multiroot_fsolver_hybrid, gsl_multiroot_fsolver_dnewton, gsl_multiroot_fsolver_broyden, } ; return solver_types[Int_val(t)]; } static const gsl_multiroot_fdfsolver_type *fdfsolver_of_value(value t) { const gsl_multiroot_fdfsolver_type *solver_types[] = { gsl_multiroot_fdfsolver_hybridsj, gsl_multiroot_fdfsolver_hybridj, gsl_multiroot_fdfsolver_newton, gsl_multiroot_fdfsolver_gnewton, } ; return solver_types[Int_val(t)]; } #define CALLBACKPARAMS_VAL(v) ((struct callback_params *)(Field(v, 1))) CAMLprim value ml_gsl_multiroot_fsolver_alloc(value type, value d) { int dim = Int_val(d); gsl_multiroot_fsolver *S; struct callback_params *params; value res; S=gsl_multiroot_fsolver_alloc(fsolver_of_value(type), dim); params=stat_alloc(sizeof(*params)); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)S; Field(res, 1) = (value)params; params->gslfun.mrf.f = &gsl_multiroot_callback; params->gslfun.mrf.n = dim ; params->gslfun.mrf.params = params; params->closure = Val_unit; params->dbl = Val_unit; /* not needed actually */ register_global_root(&(params->closure)); return res; } #define GSLMULTIROOTSOLVER_VAL(v) ((gsl_multiroot_fsolver *)(Field(v, 0))) CAMLprim value ml_gsl_multiroot_fdfsolver_alloc(value type, value d) { int dim = Int_val(d); gsl_multiroot_fdfsolver *S; struct callback_params *params; value res; S=gsl_multiroot_fdfsolver_alloc(fdfsolver_of_value(type), dim); params=stat_alloc(sizeof(*params)); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)S; Field(res, 1) = (value)params; params->gslfun.mrfdf.f = &gsl_multiroot_callback_f; params->gslfun.mrfdf.df = &gsl_multiroot_callback_df; params->gslfun.mrfdf.fdf = &gsl_multiroot_callback_fdf; params->gslfun.mrfdf.n = dim ; params->gslfun.mrfdf.params = params; params->closure = Val_unit; params->dbl = Val_unit; /* not needed actually */ register_global_root(&(params->closure)); return res; } #define GSLMULTIROOTFDFSOLVER_VAL(v) ((gsl_multiroot_fdfsolver *)(Field(v, 0))) CAMLprim value ml_gsl_multiroot_fsolver_set(value S, value fun, value X) { CAMLparam2(S, X); struct callback_params *p=CALLBACKPARAMS_VAL(S); _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); p->closure = fun; if(v_X.size != p->gslfun.mrf.n) GSL_ERROR("wrong number of dimensions for function", GSL_EBADLEN); gsl_multiroot_fsolver_set(GSLMULTIROOTSOLVER_VAL(S), &(p->gslfun.mrf), &v_X); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multiroot_fdfsolver_set(value S, value fun, value X) { CAMLparam2(S,X); struct callback_params *p=CALLBACKPARAMS_VAL(S); _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); p->closure = fun; if(v_X.size != p->gslfun.mrfdf.n) GSL_ERROR("wrong number of dimensions for function", GSL_EBADLEN); gsl_multiroot_fdfsolver_set(GSLMULTIROOTFDFSOLVER_VAL(S), &(p->gslfun.mrfdf), &v_X); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multiroot_fsolver_free(value S) { struct callback_params *p=CALLBACKPARAMS_VAL(S); remove_global_root(&(p->closure)); stat_free(p); gsl_multiroot_fsolver_free(GSLMULTIROOTSOLVER_VAL(S)); return Val_unit; } CAMLprim value ml_gsl_multiroot_fdfsolver_free(value S) { struct callback_params *p=CALLBACKPARAMS_VAL(S); remove_global_root(&(p->closure)); stat_free(p); gsl_multiroot_fdfsolver_free(GSLMULTIROOTFDFSOLVER_VAL(S)); return Val_unit; } ML1(gsl_multiroot_fsolver_name, GSLMULTIROOTSOLVER_VAL, copy_string) ML1(gsl_multiroot_fdfsolver_name, GSLMULTIROOTFDFSOLVER_VAL, copy_string) ML1(gsl_multiroot_fsolver_iterate, GSLMULTIROOTSOLVER_VAL, Unit) ML1(gsl_multiroot_fdfsolver_iterate, GSLMULTIROOTFDFSOLVER_VAL, Unit) CAMLprim value ml_gsl_multiroot_fsolver_root(value S, value r) { CAMLparam2(S,r); gsl_vector *root; _DECLARE_VECTOR(r); _CONVERT_VECTOR(r); root=gsl_multiroot_fsolver_root(GSLMULTIROOTSOLVER_VAL(S)); gsl_vector_memcpy(&v_r, root); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multiroot_fdfsolver_root(value S, value r) { CAMLparam2(S,r); gsl_vector *root; _DECLARE_VECTOR(r); _CONVERT_VECTOR(r); root=gsl_multiroot_fdfsolver_root(GSLMULTIROOTFDFSOLVER_VAL(S)); gsl_vector_memcpy(&v_r, root); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multiroot_fsolver_get_state(value S, value ox, value of, value odx, value unit) { gsl_multiroot_fsolver *s=GSLMULTIROOTSOLVER_VAL(S); if(Is_block(ox)) { value x=Unoption(ox); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); gsl_vector_memcpy(&v_x, s->x); } if(Is_block(of)) { value f=Unoption(of); _DECLARE_VECTOR(f); _CONVERT_VECTOR(f); gsl_vector_memcpy(&v_f, s->f); } if(Is_block(odx)) { value dx=Unoption(odx); _DECLARE_VECTOR(dx); _CONVERT_VECTOR(dx); gsl_vector_memcpy(&v_dx, s->dx); } return Val_unit; } CAMLprim value ml_gsl_multiroot_fdfsolver_get_state(value S, value ox, value of, value oj, value odx, value unit) { gsl_multiroot_fdfsolver *s=GSLMULTIROOTFDFSOLVER_VAL(S); if(Is_block(ox)) { value x=Unoption(ox); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); gsl_vector_memcpy(&v_x, s->x); } if(Is_block(of)) { value f=Unoption(of); _DECLARE_VECTOR(f); _CONVERT_VECTOR(f); gsl_vector_memcpy(&v_f, s->f); } if(Is_block(odx)) { value dx=Unoption(odx); _DECLARE_VECTOR(dx); _CONVERT_VECTOR(dx); gsl_vector_memcpy(&v_dx, s->dx); } if(Is_block(oj)) { value j=Unoption(oj); _DECLARE_MATRIX(j); _CONVERT_MATRIX(j); gsl_matrix_memcpy(&m_j, s->J); } return Val_unit; } CAMLprim value ml_gsl_multiroot_fdfsolver_get_state_bc(value *argv, int argc) { return ml_gsl_multiroot_fdfsolver_get_state(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_multiroot_test_delta_f(value S, value epsabs, value epsrel) { int status; status = gsl_multiroot_test_delta(GSLMULTIROOTSOLVER_VAL(S)->dx, GSLMULTIROOTSOLVER_VAL(S)->x, Double_val(epsabs), Double_val(epsrel)); return Val_negbool(status); } CAMLprim value ml_gsl_multiroot_test_delta_fdf(value S, value epsabs, value epsrel) { int status; status = gsl_multiroot_test_delta(GSLMULTIROOTFDFSOLVER_VAL(S)->dx, GSLMULTIROOTFDFSOLVER_VAL(S)->x, Double_val(epsabs), Double_val(epsrel)); return Val_negbool(status); } CAMLprim value ml_gsl_multiroot_test_residual_f(value S, value epsabs) { int status; status = gsl_multiroot_test_residual(GSLMULTIROOTSOLVER_VAL(S)->f, Double_val(epsabs)); return Val_negbool(status); } CAMLprim value ml_gsl_multiroot_test_residual_fdf(value S, value epsabs) { int status; status = gsl_multiroot_test_residual(GSLMULTIROOTFDFSOLVER_VAL(S)->f, Double_val(epsabs)); return Val_negbool(status); } ocamlgsl-0.6.0/gsl_min.ml0000664000076400007640000000174410600031632014013 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type kind = | GOLDENSECTION | BRENT type t external _alloc : kind -> t = "ml_gsl_min_fminimizer_alloc" external _free : t -> unit = "ml_gsl_min_fminimizer_free" external _set : t -> Gsl_fun.gsl_fun -> min:float -> lo:float -> up:float -> unit = "ml_gsl_min_fminimizer_set" let make k f ~min ~lo ~up = let m = _alloc k in Gc.finalise _free m ; _set m f ~min ~lo ~up ; m external name : t -> string = "ml_gsl_min_fminimizer_name" external iterate : t -> unit = "ml_gsl_min_fminimizer_iterate" external minimum : t -> float = "ml_gsl_min_fminimizer_x_minimum" external interval : t -> float * float = "ml_gsl_min_fminimizer_x_interv" external test_interval : x_lo:float -> x_up:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_min_test_interval" ocamlgsl-0.6.0/gsl_min.mli0000664000076400007640000000137010600031632014157 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** One dimensional Minimization *) type kind = | GOLDENSECTION | BRENT type t val make : kind -> Gsl_fun.gsl_fun -> min:float -> lo:float -> up:float -> t external name : t -> string = "ml_gsl_min_fminimizer_name" external iterate : t -> unit = "ml_gsl_min_fminimizer_iterate" external minimum : t -> float = "ml_gsl_min_fminimizer_x_minimum" external interval : t -> float * float = "ml_gsl_min_fminimizer_x_interv" external test_interval : x_lo:float -> x_up:float -> epsabs:float -> epsrel:float -> bool = "ml_gsl_min_test_interval" ocamlgsl-0.6.0/mlgsl_min.c0000664000076400007640000000423010607751460014166 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" static const gsl_min_fminimizer_type *Minimizertype_val(value mini_type) { const gsl_min_fminimizer_type *minimizer[] = { gsl_min_fminimizer_goldensection, gsl_min_fminimizer_brent }; return minimizer[Int_val(mini_type)]; } CAMLprim value ml_gsl_min_fminimizer_alloc(value t) { CAMLparam0(); CAMLlocal1(res); struct callback_params *params; gsl_min_fminimizer *s; s=gsl_min_fminimizer_alloc(Minimizertype_val(t)); params=stat_alloc(sizeof *params); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; params->gslfun.gf.function = &gslfun_callback ; params->gslfun.gf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); CAMLreturn(res); } #define Minimizer_val(v) ((gsl_min_fminimizer *)Field((v), 0)) #define Mparams_val(v) ((struct callback_params *)Field((v), 1)) CAMLprim value ml_gsl_min_fminimizer_set(value s, value f, value min, value lo, value up) { CAMLparam1(s); Mparams_val(s)->closure = f; gsl_min_fminimizer_set(Minimizer_val(s), &(Mparams_val(s)->gslfun.gf), Double_val(min), Double_val(lo), Double_val(up)); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_min_fminimizer_free(value s) { remove_global_root(&(Mparams_val(s)->closure)); stat_free(Mparams_val(s)); gsl_min_fminimizer_free(Minimizer_val(s)); return Val_unit; } ML1(gsl_min_fminimizer_name, Minimizer_val, copy_string) ML1(gsl_min_fminimizer_iterate, Minimizer_val, Unit) ML1(gsl_min_fminimizer_x_minimum, Minimizer_val, copy_double) CAMLprim value ml_gsl_min_fminimizer_x_interv(value S) { return copy_two_double(gsl_min_fminimizer_x_lower(Minimizer_val(S)), gsl_min_fminimizer_x_upper(Minimizer_val(S))); } ML4(gsl_min_test_interval, Double_val, Double_val, Double_val, Double_val, Val_negbool) ocamlgsl-0.6.0/gsl_multimin.ml0000664000076400007640000000375210607755005015105 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_fun open Gsl_vector module Deriv = struct type kind = | CONJUGATE_FR | CONJUGATE_PR | VECTOR_BFGS | VECTOR_BFGS2 | STEEPEST_DESCENT type t external _alloc : kind -> int -> t = "ml_gsl_multimin_fdfminimizer_alloc" external _free : t -> unit = "ml_gsl_multimin_fdfminimizer_free" external _set : t -> multim_fun_fdf -> x:vector -> step:float -> tol:float -> unit = "ml_gsl_multimin_fdfminimizer_set" let make kind dim gf ~x ~step ~tol = let mini = _alloc kind dim in Gc.finalise _free mini ; _set mini gf ~x ~step ~tol ; mini external name : t -> string = "ml_gsl_multimin_fdfminimizer_name" external iterate : t -> unit = "ml_gsl_multimin_fdfminimizer_iterate" external restart : t -> unit = "ml_gsl_multimin_fdfminimizer_restart" external minimum : ?x:vector -> ?dx:vector -> ?g:vector -> t -> float = "ml_gsl_multimin_fdfminimizer_minimum" external test_gradient : t -> float -> bool = "ml_gsl_multimin_test_gradient" end module NoDeriv = struct type kind = | NM_SIMPLEX type t external _alloc : kind -> int -> t = "ml_gsl_multimin_fminimizer_alloc" external _free : t -> unit = "ml_gsl_multimin_fminimizer_free" external _set : t -> multim_fun -> x:vector -> step_size:vector -> unit = "ml_gsl_multimin_fminimizer_set" let make kind dim gf ~x ~step_size = let mini = _alloc kind dim in Gc.finalise _free mini ; _set mini gf ~x ~step_size ; mini external name : t -> string = "ml_gsl_multimin_fminimizer_name" external iterate : t -> unit = "ml_gsl_multimin_fminimizer_iterate" external minimum : ?x:vector -> t -> float = "ml_gsl_multimin_fminimizer_minimum" external size : t -> float = "ml_gsl_multimin_fminimizer_size" external test_size : t -> float -> bool = "ml_gsl_multimin_test_size" end ocamlgsl-0.6.0/gsl_multimin.mli0000664000076400007640000000260610607755005015253 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Multidimensional Minimization *) open Gsl_fun open Gsl_vector module Deriv : sig type kind = | CONJUGATE_FR | CONJUGATE_PR | VECTOR_BFGS | VECTOR_BFGS2 | STEEPEST_DESCENT type t val make : kind -> int -> multim_fun_fdf -> x:vector -> step:float -> tol:float -> t external name : t -> string = "ml_gsl_multimin_fdfminimizer_name" external iterate : t -> unit = "ml_gsl_multimin_fdfminimizer_iterate" external restart : t -> unit = "ml_gsl_multimin_fdfminimizer_restart" external minimum : ?x:vector -> ?dx:vector -> ?g:vector -> t -> float = "ml_gsl_multimin_fdfminimizer_minimum" external test_gradient : t -> float -> bool = "ml_gsl_multimin_test_gradient" end module NoDeriv : sig type kind = | NM_SIMPLEX type t val make : kind -> int -> multim_fun -> x:vector -> step_size:vector -> t external name : t -> string = "ml_gsl_multimin_fminimizer_name" external iterate : t -> unit = "ml_gsl_multimin_fminimizer_iterate" external minimum : ?x:vector -> t -> float = "ml_gsl_multimin_fminimizer_minimum" external size : t -> float = "ml_gsl_multimin_fminimizer_size" external test_size : t -> float -> bool = "ml_gsl_multimin_test_size" end ocamlgsl-0.6.0/mlgsl_multimin.c0000664000076400007640000001370310607755005015245 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" #include "mlgsl_vector_double.h" #include "mlgsl_matrix_double.h" /* minimizers */ static const gsl_multimin_fdfminimizer_type *fdfminimizer_of_value(value t) { const gsl_multimin_fdfminimizer_type *minimizer_types[] = { gsl_multimin_fdfminimizer_conjugate_fr, gsl_multimin_fdfminimizer_conjugate_pr, gsl_multimin_fdfminimizer_vector_bfgs, gsl_multimin_fdfminimizer_vector_bfgs2, gsl_multimin_fdfminimizer_steepest_descent, } ; return minimizer_types[Int_val(t)]; } CAMLprim value ml_gsl_multimin_fdfminimizer_alloc(value type, value d) { int dim = Int_val(d); struct callback_params *params; gsl_multimin_fdfminimizer *T; value res; T=gsl_multimin_fdfminimizer_alloc(fdfminimizer_of_value(type), dim); params=stat_alloc(sizeof(*params)); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)T; Field(res, 1) = (value)params; params->gslfun.mmfdf.f = &gsl_multimin_callback_f; params->gslfun.mmfdf.df = &gsl_multimin_callback_df; params->gslfun.mmfdf.fdf = &gsl_multimin_callback_fdf; params->gslfun.mmfdf.n = dim; params->gslfun.mmfdf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); return res; } #define GSLMULTIMINFDFMINIMIZER_VAL(v) ((gsl_multimin_fdfminimizer *)(Field(v, 0))) #define CALLBACKPARAMS_VAL(v) ((struct callback_params *)(Field(v, 1))) CAMLprim value ml_gsl_multimin_fdfminimizer_set(value S, value fun, value X, value step, value tol) { CAMLparam2(S, X); struct callback_params *p=CALLBACKPARAMS_VAL(S); _DECLARE_VECTOR(X); _CONVERT_VECTOR(X); p->closure = fun; gsl_multimin_fdfminimizer_set(GSLMULTIMINFDFMINIMIZER_VAL(S), &(p->gslfun.mmfdf), &v_X, Double_val(step), Double_val(tol)); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multimin_fdfminimizer_free(value S) { struct callback_params *p=CALLBACKPARAMS_VAL(S); remove_global_root(&(p->closure)); stat_free(p); gsl_multimin_fdfminimizer_free(GSLMULTIMINFDFMINIMIZER_VAL(S)); return Val_unit; } ML1(gsl_multimin_fdfminimizer_name, GSLMULTIMINFDFMINIMIZER_VAL, copy_string) ML1(gsl_multimin_fdfminimizer_iterate, GSLMULTIMINFDFMINIMIZER_VAL, Unit) ML1(gsl_multimin_fdfminimizer_restart, GSLMULTIMINFDFMINIMIZER_VAL, Unit) CAMLprim value ml_gsl_multimin_fdfminimizer_minimum(value ox, value odx, value og, value T) { gsl_multimin_fdfminimizer *t=GSLMULTIMINFDFMINIMIZER_VAL(T); if(Is_block(ox)) { value x=Unoption(ox); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); gsl_vector_memcpy(&v_x, gsl_multimin_fdfminimizer_x(t)); } if(Is_block(odx)) { value dx=Unoption(odx); _DECLARE_VECTOR(dx); _CONVERT_VECTOR(dx); gsl_vector_memcpy(&v_dx, gsl_multimin_fdfminimizer_dx(t)); } if(Is_block(og)) { value g=Unoption(og); _DECLARE_VECTOR(g); _CONVERT_VECTOR(g); gsl_vector_memcpy(&v_g, gsl_multimin_fdfminimizer_gradient(t)); } return copy_double(gsl_multimin_fdfminimizer_minimum(t)); } CAMLprim value ml_gsl_multimin_test_gradient(value S, value epsabs) { int status; gsl_vector *g = gsl_multimin_fdfminimizer_gradient(GSLMULTIMINFDFMINIMIZER_VAL(S)); status = gsl_multimin_test_gradient(g, Double_val(epsabs)); return Val_negbool(status); } static const gsl_multimin_fminimizer_type *fminimizer_of_value(value t) { const gsl_multimin_fminimizer_type *minimizer_types[] = { gsl_multimin_fminimizer_nmsimplex, } ; return minimizer_types[Int_val(t)]; } CAMLprim value ml_gsl_multimin_fminimizer_alloc(value type, value d) { size_t dim = Int_val(d); struct callback_params *params; gsl_multimin_fminimizer *T; value res; T=gsl_multimin_fminimizer_alloc(fminimizer_of_value(type), dim); params=stat_alloc(sizeof(*params)); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)T; Field(res, 1) = (value)params; params->gslfun.mmf.f = &gsl_multimin_callback; params->gslfun.mmf.n = dim; params->gslfun.mmf.params = params; params->closure = Val_unit; params->dbl = Val_unit; register_global_root(&(params->closure)); return res; } #define GSLMULTIMINFMINIMIZER_VAL(v) ((gsl_multimin_fminimizer *)(Field(v, 0))) CAMLprim value ml_gsl_multimin_fminimizer_set(value S, value fun, value X, value step_size) { CAMLparam3(S, X, step_size); struct callback_params *p=CALLBACKPARAMS_VAL(S); _DECLARE_VECTOR2(X,step_size); _CONVERT_VECTOR2(X,step_size); p->closure = fun; gsl_multimin_fminimizer_set(GSLMULTIMINFMINIMIZER_VAL(S), &(p->gslfun.mmf), &v_X, &v_step_size); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_multimin_fminimizer_free(value S) { struct callback_params *p=CALLBACKPARAMS_VAL(S); remove_global_root(&(p->closure)); stat_free(p); gsl_multimin_fminimizer_free(GSLMULTIMINFMINIMIZER_VAL(S)); return Val_unit; } ML1(gsl_multimin_fminimizer_name, GSLMULTIMINFMINIMIZER_VAL, copy_string) ML1(gsl_multimin_fminimizer_iterate, GSLMULTIMINFMINIMIZER_VAL, Unit) CAMLprim value ml_gsl_multimin_fminimizer_minimum(value ox, value T) { gsl_multimin_fminimizer *t=GSLMULTIMINFMINIMIZER_VAL(T); if(Is_block(ox)) { value x=Unoption(ox); _DECLARE_VECTOR(x); _CONVERT_VECTOR(x); gsl_vector_memcpy(&v_x, gsl_multimin_fminimizer_x(t)); } return copy_double(gsl_multimin_fminimizer_minimum(t)); } ML1(gsl_multimin_fminimizer_size, GSLMULTIMINFMINIMIZER_VAL, copy_double) CAMLprim value ml_gsl_multimin_test_size(value S, value epsabs) { int status; double size = gsl_multimin_fminimizer_size(GSLMULTIMINFMINIMIZER_VAL(S)); status = gsl_multimin_test_size(size, Double_val(epsabs)); return Val_negbool(status); } ocamlgsl-0.6.0/gsl_diff.ml0000664000076400007640000000072410600031632014135 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) external central : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_central" external forward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_forward" external backward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_backward" ocamlgsl-0.6.0/gsl_diff.mli0000664000076400007640000000076510600031632014313 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Numerical Differentiation *) external central : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_central" external forward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_forward" external backward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result = "ml_gsl_diff_backward" ocamlgsl-0.6.0/mlgsl_diff.c0000664000076400007640000000175710600031632014307 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" value ml_gsl_diff_central(value f, value x) { CAMLparam1(f); double result,abserr; GSLFUN_CLOSURE(gf, f); gsl_diff_central(&gf, Double_val(x), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } value ml_gsl_diff_forward(value f, value x) { CAMLparam1(f); double result,abserr; GSLFUN_CLOSURE(gf, f); gsl_diff_forward(&gf, Double_val(x), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } value ml_gsl_diff_backward(value f, value x) { CAMLparam1(f); double result,abserr; GSLFUN_CLOSURE(gf, f); gsl_diff_backward(&gf, Double_val(x), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } ocamlgsl-0.6.0/gsl_cheb.ml0000664000076400007640000000252210600031632014124 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type t external _alloc : int -> t = "ml_gsl_cheb_alloc" external _free : t -> unit = "ml_gsl_cheb_free" let make n = let cs = _alloc n in Gc.finalise _free cs ; cs external order : t -> int = "ml_gsl_cheb_order" external coefs : t -> float array = "ml_gsl_cheb_coefs" external init : t -> Gsl_fun.gsl_fun -> a:float -> b:float -> unit = "ml_gsl_cheb_init" external _eval : t -> float -> float = "ml_gsl_cheb_eval" external _eval_err : t -> float -> Gsl_fun.result = "ml_gsl_cheb_eval_err" external _eval_n : t -> int -> float -> float = "ml_gsl_cheb_eval_n" external _eval_n_err : t -> int -> float -> Gsl_fun.result = "ml_gsl_cheb_eval_n_err" let eval cs ?order x = match order with | None -> _eval cs x | Some o -> _eval_n cs o x let eval_err cs ?order x = match order with | None -> _eval_err cs x | Some o -> _eval_n_err cs o x external calc_deriv : t -> t -> unit = "ml_gsl_cheb_calc_deriv" external calc_integ : t -> t -> unit = "ml_gsl_cheb_calc_integ" let deriv cs = let d = make (order cs) in calc_deriv d cs ; d let integ cs = let d = make (order cs) in calc_integ d cs ; d ocamlgsl-0.6.0/gsl_cheb.mli0000664000076400007640000000113210600031632014271 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Chebyshev Approximations *) type t val make : int -> t external order : t -> int = "ml_gsl_cheb_order" external coefs : t -> float array = "ml_gsl_cheb_coefs" external init : t -> Gsl_fun.gsl_fun -> a:float -> b:float -> unit = "ml_gsl_cheb_init" val eval : t -> ?order:int -> float -> float val eval_err : t -> ?order:int -> float -> Gsl_fun.result val deriv : t -> t val integ : t -> t ocamlgsl-0.6.0/mlgsl_cheb.c0000664000076400007640000000321510600031632014267 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" #define CHEB_VAL(v) ((gsl_cheb_series *)Field((v), 0)) ML1_alloc(gsl_cheb_alloc, Int_val, Abstract_ptr) ML1(gsl_cheb_free, CHEB_VAL, Unit) CAMLprim value ml_gsl_cheb_order(value c) { return Val_int(CHEB_VAL(c)->order); } CAMLprim value ml_gsl_cheb_coefs(value c) { CAMLparam1(c); CAMLlocal1(a); gsl_cheb_series *cs = CHEB_VAL(c); size_t len = cs->order + 1; a = alloc(len * Double_wosize, Double_array_tag); memcpy(Bp_val(a), cs->c, len * sizeof (double)); CAMLreturn(a); } CAMLprim value ml_gsl_cheb_init(value cs, value f, value a, value b) { CAMLparam2(cs, f); GSLFUN_CLOSURE(gf, f); gsl_cheb_init(CHEB_VAL(cs), &gf, Double_val(a), Double_val(b)); CAMLreturn(Val_unit); } ML2(gsl_cheb_eval, CHEB_VAL, Double_val, copy_double) CAMLprim value ml_gsl_cheb_eval_err(value cheb, value x) { double res,err; gsl_cheb_eval_err(CHEB_VAL(cheb), Double_val(x), &res, &err); return copy_two_double_arr(res, err); } ML3(gsl_cheb_eval_n, CHEB_VAL, Int_val, Double_val, copy_double) CAMLprim value ml_gsl_cheb_eval_n_err(value cheb, value order, value x) { double res,err; gsl_cheb_eval_n_err(CHEB_VAL(cheb), Int_val(order), Double_val(x), &res, &err); return copy_two_double_arr(res, err); } ML2(gsl_cheb_calc_deriv, CHEB_VAL, CHEB_VAL, Unit) ML2(gsl_cheb_calc_integ, CHEB_VAL, CHEB_VAL, Unit) ocamlgsl-0.6.0/gsl_sum.ml0000664000076400007640000000220410600031632014024 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type ws external _alloc : int -> ws = "ml_gsl_sum_levin_u_alloc" external _free : ws -> unit = "ml_gsl_sum_levin_u_free" let make size = let ws = _alloc size in Gc.finalise _free ws ; ws external accel : float array -> ws -> Gsl_fun.result = "ml_gsl_sum_levin_u_accel" type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } external get_info : ws -> ws_info = "ml_gsl_sum_levin_u_getinfo" module Trunc = struct type ws external _alloc : int -> ws = "ml_gsl_sum_levin_utrunc_alloc" external _free : ws -> unit = "ml_gsl_sum_levin_utrunc_free" let make size = let ws = _alloc size in Gc.finalise _free ws ; ws external accel : float array -> ws -> Gsl_fun.result = "ml_gsl_sum_levin_utrunc_accel" type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } external get_info : ws -> ws_info = "ml_gsl_sum_levin_utrunc_getinfo" end ocamlgsl-0.6.0/gsl_sum.mli0000664000076400007640000000145510600031632014204 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Series Acceleration *) type ws val make : int -> ws external accel : float array -> ws -> Gsl_fun.result = "ml_gsl_sum_levin_u_accel" type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } external get_info : ws -> ws_info = "ml_gsl_sum_levin_u_getinfo" module Trunc : sig type ws val make : int -> ws external accel : float array -> ws -> Gsl_fun.result = "ml_gsl_sum_levin_utrunc_accel" type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } external get_info : ws -> ws_info = "ml_gsl_sum_levin_utrunc_getinfo" end ocamlgsl-0.6.0/mlgsl_sum.c0000664000076400007640000000335210600031632014174 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include "wrappers.h" #define WS_val(v) ((gsl_sum_levin_u_workspace *)(Field((v), 0))) ML1_alloc(gsl_sum_levin_u_alloc, Int_val, Abstract_ptr) ML1(gsl_sum_levin_u_free, WS_val, Unit) CAMLprim value ml_gsl_sum_levin_u_accel(value arr, value ws) { double sum_accel, abserr; gsl_sum_levin_u_accel(Double_array_val(arr), Double_array_length(arr), WS_val(ws), &sum_accel, &abserr); return copy_two_double_arr(sum_accel, abserr); } CAMLprim value ml_gsl_sum_levin_u_getinfo(value ws) { gsl_sum_levin_u_workspace *W=WS_val(ws); CAMLparam0(); CAMLlocal2(v, s); s=copy_double(W->sum_plain); v=alloc_small(3, 0); Field(v, 0)=Val_int(W->size); Field(v, 1)=Val_int(W->terms_used); Field(v, 2)=s; CAMLreturn(v); } #define WStrunc_val(v) ((gsl_sum_levin_utrunc_workspace *)(Field((v), 0))) ML1_alloc(gsl_sum_levin_utrunc_alloc, Int_val, Abstract_ptr) ML1(gsl_sum_levin_utrunc_free, WStrunc_val, Unit) CAMLprim value ml_gsl_sum_levin_utrunc_accel(value arr, value ws) { double sum_accel, abserr; gsl_sum_levin_utrunc_accel(Double_array_val(arr), Double_array_length(arr), WStrunc_val(ws), &sum_accel, &abserr); return copy_two_double_arr(sum_accel, abserr); } CAMLprim value ml_gsl_sum_levin_utrunc_getinfo(value ws) { gsl_sum_levin_utrunc_workspace *W=WStrunc_val(ws); CAMLparam0(); CAMLlocal2(v, s); s=copy_double(W->sum_plain); v=alloc_small(3, 0); Field(v, 0)=Val_int(W->size); Field(v, 1)=Val_int(W->terms_used); Field(v, 2)=s; CAMLreturn(v); } ocamlgsl-0.6.0/gsl_fft.ml0000664000076400007640000001520210600031632014001 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type complex = Gsl_complex.complex = { re : float ; im : float } type complex_array = Gsl_complex.complex_array exception Wrong_layout let _ = Callback.register_exception "mlgsl_layout_exn" Wrong_layout type layout = | Real | Halfcomplex | Halfcomplex_rad2 | Complex type fft_array = { mutable layout : layout ; data : float array } let check_layout layout a = if a.layout <> layout then raise Wrong_layout module Real = struct type workspace type wavetable external alloc_workspace : int -> workspace = "ml_gsl_fft_real_workspace_alloc" external alloc_wavetable : int -> wavetable = "ml_gsl_fft_real_wavetable_alloc" external free_workspace : workspace -> unit = "ml_gsl_fft_real_workspace_free" external free_wavetable : wavetable -> unit = "ml_gsl_fft_real_wavetable_free" let make_workspace size = let ws = alloc_workspace size in Gc.finalise free_workspace ws ; ws let make_wavetable size = let wt = alloc_wavetable size in Gc.finalise free_wavetable wt ; wt external transform : ?stride:int -> fft_array -> wavetable -> workspace -> unit = "ml_gsl_fft_real_transform" external transform_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_real_radix2_transform" external ex_unpack : ?stride:int -> float array -> float array -> unit = "ml_gsl_fft_real_unpack" let unpack ?(stride=1) r_arr = if r_arr.layout <> Real then raise Wrong_layout ; let c_arr = Array.make (2 * (Array.length r_arr.data) / stride) 0. in ex_unpack ~stride r_arr.data c_arr ; { layout = Complex ; data = c_arr } end module Halfcomplex = struct type wavetable external alloc_wavetable : int -> wavetable = "ml_gsl_fft_halfcomplex_wavetable_alloc" external free_wavetable : wavetable -> unit = "ml_gsl_fft_halfcomplex_wavetable_free" let make_wavetable size = let wt = alloc_wavetable size in Gc.finalise free_wavetable wt ; wt external transform : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_transform" external transform_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_transform" external backward : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_backward" external backward_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_backward" external inverse : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_inverse" external inverse_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_inverse" external ex_unpack : ?stride:int -> float array -> float array -> unit = "ml_gsl_fft_halfcomplex_unpack" external ex_unpack_rad2 : ?stride:int -> float array -> float array -> unit = "ml_gsl_fft_halfcomplex_unpack_rad2" let unpack ?(stride=1) hc_arr = match hc_arr.layout with | Halfcomplex -> let c_arr = Array.make (2 * (Array.length hc_arr.data) / stride) 0. in ex_unpack ~stride hc_arr.data c_arr ; { layout = Complex ; data = c_arr } | Halfcomplex_rad2 -> let c_arr = Array.make (2 * (Array.length hc_arr.data) / stride) 0. in ex_unpack_rad2 ~stride hc_arr.data c_arr ; { layout = Complex ; data = c_arr } | _ -> raise Wrong_layout end module Complex = struct type workspace type wavetable type direction = Forward | Backward external alloc_workspace : int -> workspace = "ml_gsl_fft_complex_workspace_alloc" external alloc_wavetable : int -> wavetable = "ml_gsl_fft_complex_wavetable_alloc" external free_workspace : workspace -> unit = "ml_gsl_fft_complex_workspace_free" external free_wavetable : wavetable -> unit = "ml_gsl_fft_complex_wavetable_free" let make_workspace size = let ws = alloc_workspace size in Gc.finalise free_workspace ws ; ws let make_wavetable size = let wt = alloc_wavetable size in Gc.finalise free_wavetable wt ; wt external forward : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_forward" external forward_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_forward" external transform : ?stride:int -> complex_array -> wavetable -> workspace -> direction -> unit = "ml_gsl_fft_complex_transform" external transform_rad2 : ?dif:bool -> ?stride:int -> complex_array -> direction -> unit = "ml_gsl_fft_complex_rad2_transform" external backward : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_backward" external backward_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_backward" external inverse : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_inverse" external inverse_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_inverse" end let unpack = function | { layout = Real } as f -> (Real.unpack f).data | { layout = Halfcomplex } | { layout = Halfcomplex_rad2 } as f -> (Halfcomplex.unpack f).data | { layout = Complex ; data = d } -> d let hc_mult ({ data = a } as fa) ({ data = b } as fb) = check_layout Halfcomplex fa ; check_layout Halfcomplex fb ; let len = Array.length a in if Array.length b <> len then invalid_arg "hc_mult: array sizes differ" ; a.(0) <- a.(0) *. b.(0) ; for i=1 to (pred len) / 2 do let a_re = a.(2*i - 1) in let a_im = a.(2*i) in let b_re = b.(2*i - 1) in let b_im = b.(2*i) in a.(2* i-1) <- a_re *. b_re -. a_im *. b_im ; a.(2* i) <- a_re *. b_im +. a_im *. b_re ; done ; if len mod 2 = 0 then a.(pred len) <- a.(pred len) *. b.(pred len) let hc_mult_rad2 ({data = a } as fa) ({data = b } as fb) = check_layout Halfcomplex_rad2 fa ; check_layout Halfcomplex_rad2 fb ; let len = Array.length a in if Array.length b <> len then invalid_arg "hc_mult_rad2: array sizes differ" ; a.(0) <- a.(0) *. b.(0) ; for i=1 to (pred len) / 2 do let a_re = a.(i) in let a_im = a.(len - i) in let b_re = b.(i) in let b_im = b.(len - i) in a.(i) <- a_re *. b_re -. a_im *. b_im ; a.(len - i) <- a_re *. b_im +. a_im *. b_re ; done ; a.(len/2) <- a.(len/2) *. b.(len/2) ocamlgsl-0.6.0/gsl_fft.mli0000664000076400007640000000616310600031632014160 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Fast Fourier Transforms *) open Gsl_complex exception Wrong_layout type layout = | Real | Halfcomplex | Halfcomplex_rad2 | Complex type fft_array = { mutable layout : layout ; data : float array } module Real : sig type workspace type wavetable val make_workspace : int -> workspace val make_wavetable : int -> wavetable external transform : ?stride:int -> fft_array -> wavetable -> workspace -> unit = "ml_gsl_fft_real_transform" external transform_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_real_radix2_transform" val unpack : ?stride:int -> fft_array -> fft_array end module Halfcomplex : sig type wavetable val make_wavetable : int -> wavetable external transform : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_transform" external transform_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_transform" external backward : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_backward" external backward_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_backward" external inverse : ?stride:int -> fft_array -> wavetable -> Real.workspace -> unit = "ml_gsl_fft_halfcomplex_inverse" external inverse_rad2 : ?stride:int -> fft_array -> unit = "ml_gsl_fft_halfcomplex_radix2_inverse" val unpack : ?stride:int -> fft_array -> fft_array end module Complex : sig type workspace type wavetable type direction = Forward | Backward val make_workspace : int -> workspace val make_wavetable : int -> wavetable external forward : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_forward" external forward_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_forward" external transform : ?stride:int -> complex_array -> wavetable -> workspace -> direction -> unit = "ml_gsl_fft_complex_transform" external transform_rad2 : ?dif:bool -> ?stride:int -> complex_array -> direction -> unit = "ml_gsl_fft_complex_rad2_transform" external backward : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_backward" external backward_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_backward" external inverse : ?stride:int -> complex_array -> wavetable -> workspace -> unit = "ml_gsl_fft_complex_inverse" external inverse_rad2 : ?dif:bool -> ?stride:int -> complex_array -> unit = "ml_gsl_fft_complex_rad2_inverse" end val unpack : fft_array -> complex_array val hc_mult : fft_array -> fft_array -> unit val hc_mult_rad2 : fft_array -> fft_array -> unit ocamlgsl-0.6.0/mlgsl_fft.c0000664000076400007640000002274410600031632014155 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include #include "wrappers.h" enum mlgsl_fft_array_layout { LAYOUT_REAL = 0 , LAYOUT_HC = 1 , LAYOUT_HC_RAD2 = 2 , LAYOUT_C = 3 , } ; static void check_layout(value fft_arr, enum mlgsl_fft_array_layout layout) { static value *layout_exn; if(Int_val(Field(fft_arr, 0)) != layout) { if(!layout_exn) { layout_exn = caml_named_value("mlgsl_layout_exn"); if(!layout_exn) /* Gromeleu */ invalid_argument("wrong fft_array layout"); } raise_constant(*layout_exn); } } static inline void update_layout(value fft_arr, enum mlgsl_fft_array_layout layout) { Store_field(fft_arr, 0, Val_int(layout)); } /* WORKSPACE AND WAVETABLES */ #define GSL_REAL_WS(v) ((gsl_fft_real_workspace *)Field((v),0)) #define GSL_COMPLEX_WS(v) ((gsl_fft_complex_workspace *)Field((v),0)) #define GSL_REAL_WT(v) ((gsl_fft_real_wavetable *)Field((v),0)) #define GSL_HALFCOMPLEX_WT(v) ((gsl_fft_halfcomplex_wavetable *)Field((v),0)) #define GSL_COMPLEX_WT(v) ((gsl_fft_complex_wavetable *)Field((v),0)) ML1_alloc(gsl_fft_real_workspace_alloc, Int_val, Abstract_ptr) ML1_alloc(gsl_fft_complex_workspace_alloc, Int_val, Abstract_ptr) ML1_alloc(gsl_fft_real_wavetable_alloc, Int_val, Abstract_ptr) ML1_alloc(gsl_fft_halfcomplex_wavetable_alloc, Int_val, Abstract_ptr) ML1_alloc(gsl_fft_complex_wavetable_alloc, Int_val, Abstract_ptr) ML1(gsl_fft_real_workspace_free, GSL_REAL_WS, Unit) ML1(gsl_fft_complex_workspace_free, GSL_COMPLEX_WS, Unit) ML1(gsl_fft_real_wavetable_free, GSL_REAL_WT, Unit) ML1(gsl_fft_halfcomplex_wavetable_free, GSL_HALFCOMPLEX_WT, Unit) ML1(gsl_fft_complex_wavetable_free, GSL_COMPLEX_WT, Unit) /* UNPACKING ROUTINES */ CAMLprim value ml_gsl_fft_real_unpack(value stride, value r, value c) { const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(r); gsl_fft_real_unpack(Double_array_val(r), Double_array_val(c), c_stride, n) ; return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_unpack(value stride, value hc, value c) { const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(hc); gsl_fft_halfcomplex_unpack(Double_array_val(hc), Double_array_val(c), c_stride, n) ; return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_unpack_rad2(value stride, value hc, value c) { const size_t c_stride = Opt_arg(stride, Int_val ,1); const size_t n = Double_array_length(hc); gsl_fft_halfcomplex_radix2_unpack(Double_array_val(hc), Double_array_val(c), c_stride, n) ; return Val_unit; } /* REAL AND HALFCOMPLEX MIXED-RADIX FFT */ CAMLprim value ml_gsl_fft_real_transform(value stride, value fft_arr, value wt, value ws) { value data = Field(fft_arr, 1); const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data); check_layout(fft_arr, LAYOUT_REAL); gsl_fft_real_transform(Double_array_val(data), c_stride, n, GSL_REAL_WT(wt), GSL_REAL_WS(ws)) ; update_layout(fft_arr, LAYOUT_HC); return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_transform(value stride, value fft_arr, value wt, value ws) { value data = Field(fft_arr, 1); const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data); check_layout(fft_arr, LAYOUT_HC); gsl_fft_halfcomplex_transform(Double_array_val(data), c_stride, n, GSL_HALFCOMPLEX_WT(wt), GSL_REAL_WS(ws)) ; return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_backward(value stride, value fft_arr, value wt, value ws) { value data = Field(fft_arr, 1); const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data); check_layout(fft_arr, LAYOUT_HC); gsl_fft_halfcomplex_backward(Double_array_val(data), c_stride, n, GSL_HALFCOMPLEX_WT(wt), GSL_REAL_WS(ws)) ; update_layout(fft_arr, LAYOUT_REAL); return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_inverse(value stride, value fft_arr, value wt, value ws) { value data = Field(fft_arr, 1); const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data); check_layout(fft_arr, LAYOUT_HC); gsl_fft_halfcomplex_inverse(Double_array_val(data), c_stride, n, GSL_HALFCOMPLEX_WT(wt), GSL_REAL_WS(ws)) ; update_layout(fft_arr, LAYOUT_REAL); return Val_unit; } /* REAL AND HALFCOMPLEX RADIX2 FFT */ CAMLprim value ml_gsl_fft_real_radix2_transform(value stride, value fft_arr) { value data = Field(fft_arr, 1); size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); check_layout(fft_arr, LAYOUT_REAL); gsl_fft_real_radix2_transform(Double_array_val(data), c_stride, N); update_layout(fft_arr, LAYOUT_HC_RAD2); return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_radix2_transform(value stride, value fft_arr) { value data = Field(fft_arr, 1); size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); check_layout(fft_arr, LAYOUT_HC_RAD2); gsl_fft_halfcomplex_radix2_transform(Double_array_val(data), c_stride, N); return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_radix2_backward(value stride, value fft_arr) { value data = Field(fft_arr, 1); size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); check_layout(fft_arr, LAYOUT_HC_RAD2); gsl_fft_halfcomplex_radix2_backward(Double_array_val(data), c_stride, N); update_layout(fft_arr, LAYOUT_REAL); return Val_unit; } CAMLprim value ml_gsl_fft_halfcomplex_radix2_inverse(value stride, value fft_arr) { value data = Field(fft_arr, 1); size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); check_layout(fft_arr, LAYOUT_HC_RAD2); gsl_fft_halfcomplex_radix2_inverse(Double_array_val(data), c_stride, N); update_layout(fft_arr, LAYOUT_REAL); return Val_unit; } /* COMPLEX RADIX-2 FFT */ CAMLprim value ml_gsl_fft_complex_rad2_forward(value dif, value stride, value data) { size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); int c_dif = Opt_arg(dif, Bool_val, 0); if(c_dif) gsl_fft_complex_radix2_dif_forward(Double_array_val(data), c_stride, N); else gsl_fft_complex_radix2_forward(Double_array_val(data), c_stride, N); return Val_unit; } CAMLprim value ml_gsl_fft_complex_rad2_transform(value dif, value stride, value data, value sign) { size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); int c_dif = Opt_arg(dif, Bool_val, 0); gsl_fft_direction c_sign = (Int_val(sign)==0) ? gsl_fft_forward : gsl_fft_backward; if(c_dif) gsl_fft_complex_radix2_dif_transform(Double_array_val(data), c_stride, N, c_sign); else gsl_fft_complex_radix2_transform(Double_array_val(data), c_stride, N, c_sign); return Val_unit; } CAMLprim value ml_gsl_fft_complex_rad2_backward(value dif, value stride, value data) { size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); int c_dif = Opt_arg(dif, Bool_val, 0); if(c_dif) gsl_fft_complex_radix2_dif_backward(Double_array_val(data), c_stride, N); else gsl_fft_complex_radix2_backward(Double_array_val(data), c_stride, N); return Val_unit; } CAMLprim value ml_gsl_fft_complex_rad2_inverse(value dif, value stride, value data) { size_t N = Double_array_length(data); size_t c_stride = Opt_arg(stride, Int_val, 1); int c_dif = Opt_arg(dif, Bool_val, 0); if(c_dif) gsl_fft_complex_radix2_dif_inverse(Double_array_val(data), c_stride, N); else gsl_fft_complex_radix2_inverse(Double_array_val(data), c_stride, N); return Val_unit; } /* COMPLEX MIXED RADIX FFT */ CAMLprim value ml_gsl_fft_complex_forward(value stride, value data, value wt, value ws) { const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data) / 2; gsl_fft_complex_forward(Double_array_val(data), c_stride, n, GSL_COMPLEX_WT(wt), GSL_COMPLEX_WS(ws)) ; return Val_unit; } CAMLprim value ml_gsl_fft_complex_transform(value stride, value data, value wt, value ws, value sign) { const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data) / 2; gsl_fft_direction c_sign = (Int_val(sign)==0) ? gsl_fft_forward : gsl_fft_backward; gsl_fft_complex_transform(Double_array_val(data), c_stride, n, GSL_COMPLEX_WT(wt), GSL_COMPLEX_WS(ws), c_sign) ; return Val_unit; } CAMLprim value ml_gsl_fft_complex_backward(value stride, value data, value wt, value ws) { const size_t c_stride = Opt_arg(stride, Int_val, 1); const size_t n = Double_array_length(data) / 2; gsl_fft_complex_backward(Double_array_val(data), c_stride, n, GSL_COMPLEX_WT(wt), GSL_COMPLEX_WS(ws)) ; return Val_unit; } CAMLprim value ml_gsl_fft_complex_inverse(value stride, value data, value wt, value ws) { const size_t c_stride = Opt_arg(stride, Int_val ,1); const size_t n = Double_array_length(data) / 2; gsl_fft_complex_inverse(Double_array_val(data), c_stride, n, GSL_COMPLEX_WT(wt), GSL_COMPLEX_WS(ws)) ; return Val_unit; } ocamlgsl-0.6.0/gsl_monte.ml0000664000076400007640000000703410600031632014350 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) open Gsl_fun (* PLAIN algorithm *) type plain_state external _alloc_plain : int -> plain_state = "ml_gsl_monte_plain_alloc" external _free_plain : plain_state -> unit = "ml_gsl_monte_plain_free" let make_plain_state s = let state = _alloc_plain s in Gc.finalise _free_plain state ; state external init_plain : plain_state -> unit = "ml_gsl_monte_plain_init" external integrate_plain : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> plain_state -> Gsl_fun.result = "ml_gsl_monte_plain_integrate_bc" "ml_gsl_monte_plain_integrate" (* MISER algorithm *) type miser_state type miser_params = { estimate_frac : float ; (* 0.1 *) min_calls : int ; (* 16 * dim *) min_calls_per_bisection : int ; (* 32 * min_calls *) miser_alpha : float ; (* 2. *) dither : float ; (* 0. *) } external _alloc_miser : int -> miser_state = "ml_gsl_monte_miser_alloc" external _free_miser : miser_state -> unit = "ml_gsl_monte_miser_free" let make_miser_state s = let state = _alloc_miser s in Gc.finalise _free_miser state ; state external init_miser : miser_state -> unit = "ml_gsl_monte_miser_init" external integrate_miser : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> miser_state -> Gsl_fun.result = "ml_gsl_monte_miser_integrate_bc" "ml_gsl_monte_miser_integrate" external get_miser_params : miser_state -> miser_params = "ml_gsl_monte_miser_get_params" external set_miser_params : miser_state -> miser_params -> unit = "ml_gsl_monte_miser_set_params" (* VEGAS algorithm *) type vegas_state type vegas_info = { result : float ; sigma : float ; chisq : float ; } type vegas_mode = | STRATIFIED | IMPORTANCE_ONLY | IMPORTANCE type vegas_params = { vegas_alpha : float ; (* 1.5 *) iterations : int ; (* 5 *) stage : int ; mode : vegas_mode ; verbose : int ; (* 0 *) ostream : out_channel option ; (* stdout *) } external _alloc_vegas : int -> vegas_state = "ml_gsl_monte_vegas_alloc" external _free_vegas : vegas_state -> unit = "ml_gsl_monte_vegas_free" let make_vegas_state s = let state = _alloc_vegas s in Gc.finalise _free_vegas state ; state external init_vegas : vegas_state -> unit = "ml_gsl_monte_vegas_init" external integrate_vegas : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> vegas_state -> Gsl_fun.result = "ml_gsl_monte_vegas_integrate_bc" "ml_gsl_monte_vegas_integrate" external get_vegas_info : vegas_state -> vegas_info = "ml_gsl_monte_vegas_get_info" external get_vegas_params : vegas_state -> vegas_params = "ml_gsl_monte_vegas_get_params" external set_vegas_params : vegas_state -> vegas_params -> unit = "ml_gsl_monte_vegas_set_params" (* High-level version *) type kind = | PLAIN | MISER | VEGAS let integrate kind f ~lo ~up calls rng = let dim = Array.length lo in let with_state alloc free integ = let state = alloc dim in try let res = integ f ~lo ~up calls rng state in free state ; res with exn -> free state ; raise exn in match kind with | PLAIN -> with_state _alloc_plain _free_plain integrate_plain | MISER -> with_state _alloc_miser _free_miser integrate_miser | VEGAS -> with_state _alloc_vegas _free_vegas integrate_vegas ocamlgsl-0.6.0/gsl_monte.mli0000664000076400007640000000505310600031632014520 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Monte Carlo Integration *) open Gsl_fun (** {3 High-level interface} *) type kind = | PLAIN | MISER | VEGAS val integrate : kind -> monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> Gsl_fun.result (** {3 Low-level interface} *) (** {4 PLAIN algorithm} *) type plain_state val make_plain_state : int -> plain_state external init_plain : plain_state -> unit = "ml_gsl_monte_plain_init" external integrate_plain : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> plain_state -> Gsl_fun.result = "ml_gsl_monte_plain_integrate_bc" "ml_gsl_monte_plain_integrate" (** {4 MISER algorithm} *) type miser_state type miser_params = { estimate_frac : float; min_calls : int; min_calls_per_bisection : int; miser_alpha : float; dither : float; } val make_miser_state : int -> miser_state external init_miser : miser_state -> unit = "ml_gsl_monte_miser_init" external integrate_miser : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> miser_state -> Gsl_fun.result = "ml_gsl_monte_miser_integrate_bc" "ml_gsl_monte_miser_integrate" external get_miser_params : miser_state -> miser_params = "ml_gsl_monte_miser_get_params" external set_miser_params : miser_state -> miser_params -> unit = "ml_gsl_monte_miser_set_params" (** {4 VEGAS algorithm} *) type vegas_state type vegas_info = { result : float ; sigma : float ; chisq : float ; } type vegas_mode = | STRATIFIED | IMPORTANCE_ONLY | IMPORTANCE type vegas_params = { vegas_alpha : float ; (** 1.5 *) iterations : int ; (** 5 *) stage : int ; mode : vegas_mode ; verbose : int ; ostream : out_channel option ; } val make_vegas_state : int -> vegas_state external init_vegas : vegas_state -> unit = "ml_gsl_monte_vegas_init" external integrate_vegas : monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> vegas_state -> Gsl_fun.result = "ml_gsl_monte_vegas_integrate_bc" "ml_gsl_monte_vegas_integrate" external get_vegas_info : vegas_state -> vegas_info = "ml_gsl_monte_vegas_get_info" external get_vegas_params : vegas_state -> vegas_params = "ml_gsl_monte_vegas_get_params" external set_vegas_params : vegas_state -> vegas_params -> unit = "ml_gsl_monte_vegas_set_params" ocamlgsl-0.6.0/mlgsl_monte.c0000664000076400007640000002353710607752421014536 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #ifdef WIN32 #include #include #else #include #endif #include #include #include #include #include #include #include #include #include #include "wrappers.h" #include "mlgsl_fun.h" #include "mlgsl_rng.h" #include "io.h" #define CallbackParams_val(v) ((struct callback_params *)Field((v), 1)) /* PLAIN algorithm */ #define GSLPLAINSTATE_VAL(v) ((gsl_monte_plain_state *)Field((v), 0)) CAMLprim value ml_gsl_monte_plain_alloc(value d) { gsl_monte_plain_state *s; struct callback_params *params; int dim=Int_val(d); s=gsl_monte_plain_alloc(dim); params=stat_alloc(sizeof(*params)); { CAMLparam0(); CAMLlocal1(res); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; params->gslfun.mf.f = &gsl_monte_callback; params->gslfun.mf.dim = dim; params->gslfun.mf.params = params; params->closure = Val_unit; params->dbl = alloc(dim * Double_wosize, Double_array_tag); register_global_root(&(params->closure)); register_global_root(&(params->dbl)); CAMLreturn(res); } } ML1(gsl_monte_plain_init, GSLPLAINSTATE_VAL, Unit) CAMLprim value ml_gsl_monte_plain_free(value s) { remove_global_root(&(CallbackParams_val(s)->closure)); remove_global_root(&(CallbackParams_val(s)->dbl)); stat_free(CallbackParams_val(s)); gsl_monte_plain_free(GSLPLAINSTATE_VAL(s)); return Val_unit; } CAMLprim value ml_gsl_monte_plain_integrate(value fun, value xlo, value xup, value calls, value rng, value state) { CAMLparam2(rng, state); double result, abserr; size_t dim=Double_array_length(xlo); LOCALARRAY(double, c_xlo, dim); LOCALARRAY(double, c_xup, dim); struct callback_params *params=CallbackParams_val(state); if(params->gslfun.mf.dim != dim) GSL_ERROR("wrong number of dimensions for function", GSL_EBADLEN); if(Double_array_length(xup) != dim) GSL_ERROR("array sizes differ", GSL_EBADLEN); params->closure = fun; memcpy(c_xlo, Double_array_val(xlo), dim*sizeof(double)); memcpy(c_xup, Double_array_val(xup), dim*sizeof(double)); gsl_monte_plain_integrate(¶ms->gslfun.mf, c_xlo, c_xup, dim, Int_val(calls), Rng_val(rng), GSLPLAINSTATE_VAL(state), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_monte_plain_integrate_bc(value *argv, int argc) { return ml_gsl_monte_plain_integrate(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } /* MISER algorithm */ #define GSLMISERSTATE_VAL(v) ((gsl_monte_miser_state *)Field((v), 0)) CAMLprim value ml_gsl_monte_miser_alloc(value d) { gsl_monte_miser_state *s; struct callback_params *params; int dim=Int_val(d); s=gsl_monte_miser_alloc(dim); params=stat_alloc(sizeof(*params)); { CAMLparam0(); CAMLlocal1(res); res=alloc_small(2, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; params->gslfun.mf.f = &gsl_monte_callback; params->gslfun.mf.dim = dim; params->gslfun.mf.params = params; params->closure = Val_unit; params->dbl = alloc(dim * Double_wosize, Double_array_tag); register_global_root(&(params->closure)); register_global_root(&(params->dbl)); CAMLreturn(res); } } ML1(gsl_monte_miser_init, GSLMISERSTATE_VAL, Unit) CAMLprim value ml_gsl_monte_miser_free(value s) { remove_global_root(&(CallbackParams_val(s)->closure)); remove_global_root(&(CallbackParams_val(s)->dbl)); stat_free(CallbackParams_val(s)); gsl_monte_miser_free(GSLMISERSTATE_VAL(s)); return Val_unit; } CAMLprim value ml_gsl_monte_miser_integrate(value fun, value xlo, value xup, value calls, value rng, value state) { CAMLparam2(rng, state); double result,abserr; size_t dim=Double_array_length(xlo); LOCALARRAY(double, c_xlo, dim); LOCALARRAY(double, c_xup, dim); struct callback_params *params=CallbackParams_val(state); if(params->gslfun.mf.dim != dim) GSL_ERROR("wrong number of dimensions for function", GSL_EBADLEN); if(Double_array_length(xup) != dim) GSL_ERROR("array sizes differ", GSL_EBADLEN); params->closure=fun; memcpy(c_xlo, Double_array_val(xlo), dim*sizeof(double)); memcpy(c_xup, Double_array_val(xup), dim*sizeof(double)); gsl_monte_miser_integrate(¶ms->gslfun.mf, c_xlo, c_xup, dim, Int_val(calls), Rng_val(rng), GSLMISERSTATE_VAL(state), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_monte_miser_integrate_bc(value *argv, int argc) { return ml_gsl_monte_miser_integrate(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_monte_miser_get_params(value state) { CAMLparam0(); CAMLlocal1(r); gsl_monte_miser_state *s = GSLMISERSTATE_VAL(state); r=alloc_tuple(5); Store_field(r, 0, copy_double(s->estimate_frac)); Store_field(r, 1, Val_int(s->min_calls)); Store_field(r, 2, Val_int(s->min_calls_per_bisection)); Store_field(r, 3, copy_double(s->alpha)); Store_field(r, 4, copy_double(s->dither)); CAMLreturn(r); } CAMLprim value ml_gsl_monte_miser_set_params(value state, value params) { gsl_monte_miser_state *s = GSLMISERSTATE_VAL(state); s->estimate_frac = Double_val(Field(params, 0)); s->min_calls = Int_val(Field(params, 1)); s->min_calls_per_bisection = Int_val(Field(params, 2)); s->alpha = Double_val(Field(params, 3)); s->dither = Double_val(Field(params, 4)); return Val_unit; } /* VEGAS algorithm */ #define GSLVEGASSTATE_VAL(v) ((gsl_monte_vegas_state *)Field((v), 0)) #define GSLVEGASSTREAM_VAL(v) Field((v), 2) CAMLprim value ml_gsl_monte_vegas_alloc(value d) { gsl_monte_vegas_state *s; struct callback_params *params; int dim=Int_val(d); s=gsl_monte_vegas_alloc(dim); params=stat_alloc(sizeof(*params)); { CAMLparam0(); CAMLlocal1(res); res=alloc_small(3, Abstract_tag); Field(res, 0) = (value)s; Field(res, 1) = (value)params; Field(res, 2) = Val_none; params->gslfun.mf.f = &gsl_monte_callback; params->gslfun.mf.dim = dim; params->gslfun.mf.params = params; params->closure = Val_unit; params->dbl = alloc(dim * Double_wosize, Double_array_tag); register_global_root(&(params->closure)); register_global_root(&(params->dbl)); register_global_root(&(Field(res, 2))); CAMLreturn(res); } } ML1(gsl_monte_vegas_init, GSLVEGASSTATE_VAL, Unit) CAMLprim value ml_gsl_monte_vegas_free(value state) { gsl_monte_vegas_state *s=GSLVEGASSTATE_VAL(state); remove_global_root(&(CallbackParams_val(state)->closure)); remove_global_root(&(CallbackParams_val(state)->dbl)); stat_free(CallbackParams_val(state)); if(s->ostream != stdout && s->ostream != stderr) fclose(s->ostream); remove_global_root(&GSLVEGASSTREAM_VAL(state)); gsl_monte_vegas_free(s); return Val_unit; } CAMLprim value ml_gsl_monte_vegas_integrate(value fun, value xlo, value xup, value calls, value rng, value state) { CAMLparam2(rng, state); double result,abserr; size_t dim=Double_array_length(xlo); LOCALARRAY(double, c_xlo, dim); LOCALARRAY(double, c_xup, dim); struct callback_params *params=CallbackParams_val(state); if(params->gslfun.mf.dim != dim) GSL_ERROR("wrong number of dimensions for function", GSL_EBADLEN); if(Double_array_length(xup) != dim) GSL_ERROR("array sizes differ", GSL_EBADLEN); params->closure=fun; memcpy(c_xlo, Double_array_val(xlo), dim*sizeof(double)); memcpy(c_xup, Double_array_val(xup), dim*sizeof(double)); gsl_monte_vegas_integrate(¶ms->gslfun.mf, c_xlo, c_xup, dim, Int_val(calls), Rng_val(rng), GSLVEGASSTATE_VAL(state), &result, &abserr); CAMLreturn(copy_two_double_arr(result, abserr)); } CAMLprim value ml_gsl_monte_vegas_integrate_bc(value *argv, int argc) { return ml_gsl_monte_vegas_integrate(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_monte_vegas_get_info(value state) { value r; gsl_monte_vegas_state *s = GSLVEGASSTATE_VAL(state); r=alloc_small(3 * Double_wosize, Double_array_tag); Store_double_field(r, 0, s->result); Store_double_field(r, 1, s->sigma); Store_double_field(r, 2, s->chisq); return r; } CAMLprim value ml_gsl_monte_vegas_get_params(value state) { CAMLparam0(); CAMLlocal1(r); gsl_monte_vegas_state *s = GSLVEGASSTATE_VAL(state); r=alloc_tuple(6); Store_field(r, 0, copy_double(s->alpha)); Store_field(r, 1, Val_int(s->iterations)); Store_field(r, 2, Val_int(s->stage)); Store_field(r, 3, Val_int(s->mode + 1)); Store_field(r, 4, Val_int(s->verbose)); { value vchan; if(GSLVEGASSTREAM_VAL(state) != Val_none){ vchan=alloc_small(1, 0); Field(vchan, 0)=GSLVEGASSTREAM_VAL(state); } else vchan=Val_none; Store_field(r, 5, vchan); } CAMLreturn(r); } CAMLprim value ml_gsl_monte_vegas_set_params(value state, value params) { gsl_monte_vegas_state *s = GSLVEGASSTATE_VAL(state); s->alpha = Double_val(Field(params, 0)); s->iterations = Int_val(Field(params, 1)); s->stage = Int_val(Field(params, 2)); s->mode = Int_val(Field(params, 3)) - 1; s->verbose = Int_val(Field(params, 4)); { value vchan = Field(params, 5); if(Is_block(vchan)){ struct channel *chan=Channel(Field(vchan, 0)); if(s->ostream != stdout && s->ostream != stderr) fclose(s->ostream); flush(chan); s->ostream = fdopen(dup(chan->fd), "w"); GSLVEGASSTREAM_VAL(state) = vchan; } } return Val_unit; } ocamlgsl-0.6.0/gsl_siman.ml0000664000076400007640000000301610600031632014331 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type params = { iters_fixed_T : int ; step_size : float ; k : float ; t_initial : float ; mu_t : float ; t_min : float ; } open Gsl_misc let solve rng conf0 ~energ_func ~step_func ?print_func params = let best_energ = ref (energ_func conf0) in let best_x = ref conf0 in let energ = ref !best_energ in let x = ref !best_x in let t = ref params.t_initial in let n_iter = ref 0 in let n_eval = ref 1 in if is print_func then print_string "#-iter #-evals temperature position energy\n" ; while !t >= params.t_min do for i=1 to params.iters_fixed_T do let new_x = step_func rng !x params.step_size in let new_energ = energ_func new_x in incr n_eval ; if new_energ <= !best_energ then begin best_energ := new_energ ; best_x := new_x end ; if new_energ < !energ || ( let lim = exp (~-. (new_energ -. !energ) /. (!t *. params.k)) in Gsl_rng.uniform rng < lim ) then begin energ := new_energ ; x := new_x ; end done ; if is print_func then begin Printf.printf "%5d %7d %12g" !n_iter !n_eval !t ; may_apply print_func !x ; Printf.printf " %12g\n" !energ end ; t := !t /. params.mu_t ; incr n_iter ; done ; !best_x ocamlgsl-0.6.0/gsl_siman.mli0000664000076400007640000000172610600031632014510 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Simulated Annealing *) (** NB: This module is not interfaced to GSL, it is implemented in OCaml. It is quite simple in fact, so rather than using it you may want to copy the code and tweak the algorithm in your own program. *) type params = { iters_fixed_T : int; (** The number of iterations at each temperature *) step_size : float; (** The maximum step size in the random walk *) k : float; (** parameter of the Boltzmann distribution *) t_initial : float; (** initial temperature *) mu_t : float; (** cooling factor *) t_min : float; (** minimum temperature *) } val solve : Gsl_rng.t -> 'a -> energ_func:('a -> float) -> step_func:(Gsl_rng.t -> 'a -> float -> 'a) -> ?print_func:('a -> unit) -> params -> 'a ocamlgsl-0.6.0/gsl_odeiv.ml0000664000076400007640000000650110607755005014350 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type system external _alloc : (float -> float array -> float array -> unit) -> ?jacobian:(float -> float array -> Gsl_matrix.matrix -> float array -> unit) -> int -> system = "ml_gsl_odeiv_alloc_system" external _free : system -> unit = "ml_gsl_odeiv_free_system" let make_system f ?jac dim = let s = _alloc f ?jacobian:jac dim in Gc.finalise _free s ; s type step type step_kind = | RK2 | RK4 | RKF45 | RKCK | RK8PD | RK2IMP | RK2SIMP | RK4IMP | BSIMP | GEAR1 | GEAR2 external _step_alloc : step_kind -> dim:int -> step = "ml_gsl_odeiv_step_alloc" external _step_free : step -> unit = "ml_gsl_odeiv_step_free" let make_step kind ~dim = let s = _step_alloc kind ~dim in Gc.finalise _step_free s ; s external step_reset : step -> unit = "ml_gsl_odeiv_step_reset" external step_name : step -> string = "ml_gsl_odeiv_step_name" external step_order : step -> int = "ml_gsl_odeiv_step_order" external step_apply : step -> t:float -> h:float -> y:float array -> yerr:float array -> ?dydt_in:float array -> ?dydt_out:float array -> system -> unit = "ml_gsl_odeiv_step_apply_bc" "ml_gsl_odeiv_step_apply" type control external _control_free : control -> unit = "ml_gsl_odeiv_control_free" external _control_standard_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> control = "ml_gsl_odeiv_control_standard_new" external _control_y_new : eps_abs:float -> eps_rel:float -> control = "ml_gsl_odeiv_control_y_new" external _control_yp_new : eps_abs:float -> eps_rel:float -> control = "ml_gsl_odeiv_control_yp_new" external _control_scaled_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> scale_abs:float array -> control = "ml_gsl_odeiv_control_scaled_new" let make_control_standard_new ~eps_abs ~eps_rel ~a_y ~a_dydt = let c = _control_standard_new ~eps_abs ~eps_rel ~a_y ~a_dydt in Gc.finalise _control_free c ; c let make_control_y_new ~eps_abs ~eps_rel = let c = _control_y_new ~eps_abs ~eps_rel in Gc.finalise _control_free c ; c let make_control_yp_new ~eps_abs ~eps_rel = let c = _control_yp_new ~eps_abs ~eps_rel in Gc.finalise _control_free c ; c let make_control_scaled_new ~eps_abs ~eps_rel ~a_y ~a_dydt ~scale_abs = let c = _control_scaled_new ~eps_abs ~eps_rel ~a_y ~a_dydt ~scale_abs in Gc.finalise _control_free c ; c external control_name : control -> string = "ml_gsl_odeiv_control_name" type hadjust = | HADJ_DEC | HADJ_NIL | HADJ_INC external control_hadjust : control -> step -> y:float array -> yerr:float array -> dydt:float array -> h:float -> hadjust * float = "ml_gsl_odeiv_control_hadjust_bc" "ml_gsl_odeiv_control_hadjust" type evolve external _evolve_alloc : int -> evolve = "ml_gsl_odeiv_evolve_alloc" external _evolve_free : evolve -> unit = "ml_gsl_odeiv_evolve_free" let make_evolve dim = let e = _evolve_alloc dim in Gc.finalise _evolve_free e ; e external evolve_reset : evolve -> unit = "ml_gsl_odeiv_evolve_reset" external evolve_apply : evolve -> control -> step -> system -> t:float -> t1:float -> h:float -> y:float array -> float * float = "ml_gsl_odeiv_evolve_apply_bc" "ml_gsl_odeiv_evolve_apply" ocamlgsl-0.6.0/gsl_odeiv.mli0000664000076400007640000000377610607755005014534 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Ordinary Differential Equations *) type system val make_system : (float -> float array -> float array -> unit) -> ?jac:(float -> float array -> Gsl_matrix.matrix -> float array -> unit) -> int -> system type step type step_kind = | RK2 | RK4 | RKF45 | RKCK | RK8PD | RK2IMP | RK2SIMP | RK4IMP | BSIMP | GEAR1 | GEAR2 val make_step : step_kind -> dim:int -> step external step_reset : step -> unit = "ml_gsl_odeiv_step_reset" external step_name : step -> string = "ml_gsl_odeiv_step_name" external step_order : step -> int = "ml_gsl_odeiv_step_order" external step_apply : step -> t:float -> h:float -> y:float array -> yerr:float array -> ?dydt_in:float array -> ?dydt_out:float array -> system -> unit = "ml_gsl_odeiv_step_apply_bc" "ml_gsl_odeiv_step_apply" type control val make_control_standard_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> control val make_control_y_new : eps_abs:float -> eps_rel:float -> control val make_control_yp_new : eps_abs:float -> eps_rel:float -> control val make_control_scaled_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> scale_abs:float array -> control external control_name : control -> string = "ml_gsl_odeiv_control_name" type hadjust = | HADJ_DEC | HADJ_NIL | HADJ_INC external control_hadjust : control -> step -> y:float array -> yerr:float array -> dydt:float array -> h:float -> hadjust * float = "ml_gsl_odeiv_control_hadjust_bc" "ml_gsl_odeiv_control_hadjust" type evolve val make_evolve : int -> evolve external evolve_reset : evolve -> unit = "ml_gsl_odeiv_evolve_reset" external evolve_apply : evolve -> control -> step -> system -> t:float -> t1:float -> h:float -> y:float array -> float * float = "ml_gsl_odeiv_evolve_apply_bc" "ml_gsl_odeiv_evolve_apply" ocamlgsl-0.6.0/mlgsl_odeiv.c0000664000076400007640000002111010607755005014504 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include #include #include "wrappers.h" struct mlgsl_odeiv_params { value closure; value jac_closure; value arr1; value arr2; value mat; size_t dim; }; static int ml_gsl_odeiv_func(double t, const double y[], double dydt[], void *params) { struct mlgsl_odeiv_params *p = params; value vt, res; vt = copy_double(t); memcpy(Double_array_val(p->arr1), y, p->dim * sizeof(double)); res = callback3_exn(p->closure, vt, p->arr1, p->arr2); if(Is_exception_result(res)) return GSL_FAILURE; memcpy(dydt, Double_array_val(p->arr2), p->dim * sizeof(double)); return GSL_SUCCESS; } static int ml_gsl_odeiv_jacobian(double t, const double y[], double *dfdy, double dfdt[], void *params) { struct mlgsl_odeiv_params *p = params; value res, args[4]; args[0] = copy_double(t); memcpy(Double_array_val(p->arr1), y, p->dim * sizeof(double)); args[1] = p->arr1; Data_bigarray_val(p->mat) = dfdy; args[2] = p->mat; args[3] = p->arr2; res = callbackN_exn(p->jac_closure, 4, args); if(Is_exception_result(res)) return GSL_FAILURE; memcpy(dfdt, Double_array_val(p->arr2), p->dim * sizeof(double)); return GSL_SUCCESS; } CAMLprim value ml_gsl_odeiv_alloc_system(value func, value ojac, value dim) { const int barr_flags = BIGARRAY_FLOAT64 | BIGARRAY_C_LAYOUT | BIGARRAY_EXTERNAL; struct mlgsl_odeiv_params *p; gsl_odeiv_system *syst; value res; p=stat_alloc(sizeof (*p)); p->dim = Int_val(dim); p->closure = func; register_global_root(&(p->closure)); p->jac_closure = (ojac == Val_none ? Val_unit : Unoption(ojac)); register_global_root(&(p->jac_closure)); p->arr1 = alloc(Int_val(dim) * Double_wosize, Double_array_tag); register_global_root(&(p->arr1)); p->arr2 = alloc(Int_val(dim) * Double_wosize, Double_array_tag); register_global_root(&(p->arr2)); p->mat = alloc_bigarray_dims(barr_flags, 2, NULL, Int_val(dim), Int_val(dim)); register_global_root(&(p->mat)); syst=stat_alloc(sizeof (*syst)); syst->function = ml_gsl_odeiv_func; syst->jacobian = ml_gsl_odeiv_jacobian; syst->dimension = Int_val(dim); syst->params = p; Abstract_ptr(res, syst); return res; } #define ODEIV_SYSTEM_VAL(v) ((gsl_odeiv_system *)Field((v), 0)) CAMLprim value ml_gsl_odeiv_free_system(value vsyst) { gsl_odeiv_system *syst = ODEIV_SYSTEM_VAL(vsyst); struct mlgsl_odeiv_params *p = syst->params; remove_global_root(&(p->closure)); remove_global_root(&(p->jac_closure)); remove_global_root(&(p->arr1)); remove_global_root(&(p->arr2)); remove_global_root(&(p->mat)); stat_free(p); stat_free(syst); return Val_unit; } CAMLprim value ml_gsl_odeiv_step_alloc(value step_type, value dim) { const gsl_odeiv_step_type *steppers[] = { gsl_odeiv_step_rk2, gsl_odeiv_step_rk4, gsl_odeiv_step_rkf45, gsl_odeiv_step_rkck, gsl_odeiv_step_rk8pd, gsl_odeiv_step_rk2imp, gsl_odeiv_step_rk2simp, gsl_odeiv_step_rk4imp, gsl_odeiv_step_bsimp, gsl_odeiv_step_gear1, gsl_odeiv_step_gear2, }; gsl_odeiv_step *step = gsl_odeiv_step_alloc(steppers[ Int_val(step_type) ], Int_val(dim)); value res; Abstract_ptr(res, step); return res; } #define ODEIV_STEP_VAL(v) ((gsl_odeiv_step *)Field((v), 0)) ML1(gsl_odeiv_step_free, ODEIV_STEP_VAL, Unit) ML1(gsl_odeiv_step_reset, ODEIV_STEP_VAL, Unit) ML1(gsl_odeiv_step_name, ODEIV_STEP_VAL, copy_string) ML1(gsl_odeiv_step_order, ODEIV_STEP_VAL, Val_int) CAMLprim value ml_gsl_odeiv_step_apply(value step, value t, value h, value y, value yerr, value odydt_in, value odydt_out, value syst) { CAMLparam5(step, syst, y, yerr, odydt_out); LOCALARRAY(double, y_copy, Double_array_length(y)); LOCALARRAY(double, yerr_copy, Double_array_length(yerr)); size_t len_dydt_in = odydt_in == Val_none ? 0 : Double_array_length(Unoption(odydt_in)) ; size_t len_dydt_out = odydt_out == Val_none ? 0 : Double_array_length(Unoption(odydt_out)) ; LOCALARRAY(double, dydt_in, len_dydt_in); LOCALARRAY(double, dydt_out, len_dydt_out); int status; if(len_dydt_in) memcpy(dydt_in, Double_array_val(Unoption(odydt_in)), Bosize_val(Unoption(odydt_in))); memcpy(y_copy, Double_array_val(y), Bosize_val(y)); memcpy(yerr_copy, Double_array_val(yerr), Bosize_val(yerr)); status = gsl_odeiv_step_apply(ODEIV_STEP_VAL(step), Double_val(t), Double_val(h), y_copy, yerr_copy, len_dydt_in ? dydt_in : NULL, len_dydt_out ? dydt_out : NULL, ODEIV_SYSTEM_VAL(syst)); /* GSL does not call the error handler for this function */ if (status) GSL_ERROR_VAL ("gsl_odeiv_step_apply", status, Val_unit); memcpy(Double_array_val(y), y_copy, sizeof(y_copy)); memcpy(Double_array_val(yerr), yerr_copy, sizeof(yerr_copy)); if(len_dydt_out) memcpy(Double_array_val(Unoption(odydt_out)), dydt_out, Bosize_val(Unoption(odydt_out))); CAMLreturn(Val_unit); } CAMLprim value ml_gsl_odeiv_step_apply_bc(value argv[], int argc) { return ml_gsl_odeiv_step_apply(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } CAMLprim value ml_gsl_odeiv_control_standard_new(value eps_abs, value eps_rel, value a_y, value a_dydt) { gsl_odeiv_control *c = gsl_odeiv_control_standard_new(Double_val(eps_abs), Double_val(eps_rel), Double_val(a_y), Double_val(a_dydt)); value res; Abstract_ptr(res, c); return res; } CAMLprim value ml_gsl_odeiv_control_y_new(value eps_abs, value eps_rel) { gsl_odeiv_control *c = gsl_odeiv_control_y_new(Double_val(eps_abs), Double_val(eps_rel)); value res; Abstract_ptr(res, c); return res; } CAMLprim value ml_gsl_odeiv_control_yp_new(value eps_abs, value eps_rel) { gsl_odeiv_control *c = gsl_odeiv_control_yp_new(Double_val(eps_abs), Double_val(eps_rel)); value res; Abstract_ptr(res, c); return res; } CAMLprim value ml_gsl_odeiv_control_scaled_new(value eps_abs, value eps_rel, value a_y, value a_dydt, value scale_abs) { gsl_odeiv_control *c = gsl_odeiv_control_scaled_new(Double_val(eps_abs), Double_val(eps_rel), Double_val(a_y), Double_val(a_dydt), Double_array_val(scale_abs), Double_array_length(scale_abs)); value res; Abstract_ptr(res, c); return res; } #define ODEIV_CONTROL_VAL(v) ((gsl_odeiv_control *)Field((v), 0)) ML1(gsl_odeiv_control_free, ODEIV_CONTROL_VAL, Unit) ML1(gsl_odeiv_control_name, ODEIV_CONTROL_VAL, copy_string) CAMLprim value ml_gsl_odeiv_control_hadjust(value c, value s, value y, value yerr, value dydt, value h) { double c_h = Double_val(h); int status = gsl_odeiv_control_hadjust(ODEIV_CONTROL_VAL(c), ODEIV_STEP_VAL(s), Double_array_val(y), Double_array_val(yerr), Double_array_val(dydt), &c_h); { CAMLparam0(); CAMLlocal2(vh, r); vh = copy_double(c_h); r = alloc_small(2, 0); Field(r, 0) = Val_int(status + 1); Field(r, 1) = vh; CAMLreturn(r); } } CAMLprim value ml_gsl_odeiv_control_hadjust_bc(value *argv, int argc) { return ml_gsl_odeiv_control_hadjust(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); } CAMLprim value ml_gsl_odeiv_evolve_alloc(value dim) { gsl_odeiv_evolve *e = gsl_odeiv_evolve_alloc(Int_val(dim)); value res; Abstract_ptr(res, e); return res; } #define ODEIV_EVOLVE_VAL(v) ((gsl_odeiv_evolve *)Field((v), 0)) ML1(gsl_odeiv_evolve_free, ODEIV_EVOLVE_VAL, Unit) ML1(gsl_odeiv_evolve_reset, ODEIV_EVOLVE_VAL, Unit) CAMLprim value ml_gsl_odeiv_evolve_apply(value e, value c, value s, value syst, value t, value t1, value h, value y) { CAMLparam5(e, c, s, syst, y); double t_c = Double_val(t); double h_c = Double_val(h); LOCALARRAY(double, y_copy, Double_array_length(y)); int status; memcpy(y_copy, Double_array_val(y), Bosize_val(y)); status = gsl_odeiv_evolve_apply(ODEIV_EVOLVE_VAL(e), ODEIV_CONTROL_VAL(c), ODEIV_STEP_VAL(s), ODEIV_SYSTEM_VAL(syst), &t_c, Double_val(t1), &h_c, y_copy); /* GSL does not call the error handler for this function */ if (status) GSL_ERROR_VAL ("gsl_odeiv_evolve_apply", status, Val_unit); memcpy(Double_array_val(y), y_copy, Bosize_val(y)); CAMLreturn(copy_two_double(t_c, h_c)); } CAMLprim value ml_gsl_odeiv_evolve_apply_bc(value *argv, int argc) { return ml_gsl_odeiv_evolve_apply(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); } ocamlgsl-0.6.0/gsl_histo.ml0000664000076400007640000000513310600031632014352 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Histograms *) (** The histogram type *) type t = { n : int ; range : float array ; bin : float array ; } let check h = h.n > 0 && Array.length h.range = succ h.n && Array.length h.bin = h.n (** {3 Allocating histograms} *) let make n = { n = n ; range = Array.create (succ n) 0. ; bin = Array.create n 0. ; } let copy h = { n = h.n ; range = Array.copy h.range ; bin = Array.copy h.bin ; } external set_ranges : t -> float array -> unit = "ml_gsl_histogram_set_ranges" external set_ranges_uniform : t -> xmin:float -> xmax:float -> unit = "ml_gsl_histogram_set_ranges_uniform" (** {3 Updating and accessing histogram elements} *) external accumulate : t -> ?w:float -> float -> unit = "ml_gsl_histogram_accumulate" let get h i = h.bin.(i) let get_range h i = (h.range.(i), h.range.(succ i)) let h_max h = h.range.(h.n) let h_min h = h.range.(0) let bins h = h.n let reset h = Array.fill h.bin 0 h.n 0. (** {3 Searching histogram ranges} *) external find : t -> float -> int = "ml_gsl_histogram_find" (** {3 Histograms statistics } *) external max_val : t -> float = "ml_gsl_histogram_max_val" external max_bin : t -> int = "ml_gsl_histogram_max_bin" external min_val : t -> float = "ml_gsl_histogram_min_val" external min_bin : t -> int = "ml_gsl_histogram_min_bin" external mean : t -> float = "ml_gsl_histogram_mean" external sigma : t -> float = "ml_gsl_histogram_sigma" external sum : t -> float = "ml_gsl_histogram_sum" (** {3 Histogram operations} *) external equal_bins_p : t -> t -> bool = "ml_gsl_histogram_equal_bins_p" external add : t -> t -> unit = "ml_gsl_histogram_add" external sub : t -> t -> unit = "ml_gsl_histogram_sub" external mul : t -> t -> unit = "ml_gsl_histogram_mul" external div : t -> t -> unit = "ml_gsl_histogram_div" external scale : t -> float -> unit = "ml_gsl_histogram_scale" external shift : t -> float -> unit = "ml_gsl_histogram_shift" (** {3 Resampling} *) type histo_pdf = { pdf_n : int ; pdf_range : float array ; pdf_sum : float array ; } external _init : histo_pdf -> t -> unit = "ml_gsl_histogram_pdf_init" let init h = let p = { pdf_n = h.n ; pdf_range = Array.copy h.range ; pdf_sum = Array.copy h.bin ; } in _init p h ; p external sample : histo_pdf -> float -> float = "ml_gsl_histogram_pdf_sample" ocamlgsl-0.6.0/gsl_histo.mli0000664000076400007640000000427410600031632014530 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Histograms *) (** The histogram type *) type t = private { n : int; (** number of histogram bins *) range : float array; (** ranges of the bins ; n+1 elements *) bin : float array; (** counts for each bin ; n elements *) } val check : t -> bool (** {3 Allocating histograms} *) val make : int -> t val copy : t -> t external set_ranges : t -> float array -> unit = "ml_gsl_histogram_set_ranges" external set_ranges_uniform : t -> xmin:float -> xmax:float -> unit = "ml_gsl_histogram_set_ranges_uniform" (** {3 Updating and accessing histogram elements} *) external accumulate : t -> ?w:float -> float -> unit = "ml_gsl_histogram_accumulate" val get : t -> int -> float val get_range : t -> int -> float * float val h_max : t -> float val h_min : t -> float val bins : t -> int val reset : t -> unit (** {3 Searching histogram ranges} *) external find : t -> float -> int = "ml_gsl_histogram_find" (** {3 Histograms statistics } *) external max_val : t -> float = "ml_gsl_histogram_max_val" external max_bin : t -> int = "ml_gsl_histogram_max_bin" external min_val : t -> float = "ml_gsl_histogram_min_val" external min_bin : t -> int = "ml_gsl_histogram_min_bin" external mean : t -> float = "ml_gsl_histogram_mean" external sigma : t -> float = "ml_gsl_histogram_sigma" external sum : t -> float = "ml_gsl_histogram_sum" (** {3 Histogram operations} *) external equal_bins_p : t -> t -> bool = "ml_gsl_histogram_equal_bins_p" external add : t -> t -> unit = "ml_gsl_histogram_add" external sub : t -> t -> unit = "ml_gsl_histogram_sub" external mul : t -> t -> unit = "ml_gsl_histogram_mul" external div : t -> t -> unit = "ml_gsl_histogram_div" external scale : t -> float -> unit = "ml_gsl_histogram_scale" external shift : t -> float -> unit = "ml_gsl_histogram_shift" (** {3 Resampling} *) type histo_pdf = private { pdf_n : int; pdf_range : float array; pdf_sum : float array; } val init : t -> histo_pdf external sample : histo_pdf -> float -> float = "ml_gsl_histogram_pdf_sample" ocamlgsl-0.6.0/mlgsl_histo.c0000664000076400007640000001030710600031632014514 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" static inline void histo_of_val(gsl_histogram *h, value vh) { h->n = Int_val(Field(vh, 0)); h->range = Double_array_val(Field(vh, 1)); h->bin = Double_array_val(Field(vh, 2)); } CAMLprim value ml_gsl_histogram_set_ranges(value vh, value range) { gsl_histogram h; histo_of_val(&h, vh); gsl_histogram_set_ranges(&h, Double_array_val(range), Double_array_length(range)); return Val_unit; } CAMLprim value ml_gsl_histogram_set_ranges_uniform(value vh, value xmin, value xmax) { gsl_histogram h; histo_of_val(&h, vh); gsl_histogram_set_ranges_uniform(&h, Double_val(xmin), Double_val(xmax)); return Val_unit; } CAMLprim value ml_gsl_histogram_accumulate(value vh, value ow, value x) { gsl_histogram h; double w = Opt_arg(ow, Double_val, 1.); histo_of_val(&h, vh); gsl_histogram_accumulate(&h, Double_val(x), w); return Val_unit; } CAMLprim value ml_gsl_histogram_find(value vh, value x) { gsl_histogram h; size_t i; histo_of_val(&h, vh); gsl_histogram_find(&h, Double_val(x), &i); return Val_int(i); } CAMLprim value ml_gsl_histogram_max_val(value vh) { gsl_histogram h; histo_of_val(&h, vh); return copy_double(gsl_histogram_max_val(&h)); } CAMLprim value ml_gsl_histogram_max_bin(value vh) { gsl_histogram h; histo_of_val(&h, vh); return Val_int(gsl_histogram_max_bin(&h)); } CAMLprim value ml_gsl_histogram_min_val(value vh) { gsl_histogram h; histo_of_val(&h, vh); return copy_double(gsl_histogram_min_val(&h)); } CAMLprim value ml_gsl_histogram_min_bin(value vh) { gsl_histogram h; histo_of_val(&h, vh); return Val_int(gsl_histogram_min_bin(&h)); } CAMLprim value ml_gsl_histogram_mean(value vh) { gsl_histogram h; histo_of_val(&h, vh); return copy_double(gsl_histogram_mean(&h)); } CAMLprim value ml_gsl_histogram_sigma(value vh) { gsl_histogram h; histo_of_val(&h, vh); return copy_double(gsl_histogram_sigma(&h)); } CAMLprim value ml_gsl_histogram_sum(value vh) { gsl_histogram h; histo_of_val(&h, vh); return copy_double(gsl_histogram_sum(&h)); } CAMLprim value ml_gsl_histogram_equal_bins_p(value vh1, value vh2) { gsl_histogram h1, h2; histo_of_val(&h1, vh1); histo_of_val(&h2, vh2); return Val_bool(gsl_histogram_equal_bins_p(&h1, &h2)); } CAMLprim value ml_gsl_histogram_add(value vh1, value vh2) { gsl_histogram h1, h2; histo_of_val(&h1, vh1); histo_of_val(&h2, vh2); gsl_histogram_add(&h1, &h2); return Val_unit; } CAMLprim value ml_gsl_histogram_sub(value vh1, value vh2) { gsl_histogram h1, h2; histo_of_val(&h1, vh1); histo_of_val(&h2, vh2); gsl_histogram_sub(&h1, &h2); return Val_unit; } CAMLprim value ml_gsl_histogram_mul(value vh1, value vh2) { gsl_histogram h1, h2; histo_of_val(&h1, vh1); histo_of_val(&h2, vh2); gsl_histogram_mul(&h1, &h2); return Val_unit; } CAMLprim value ml_gsl_histogram_div(value vh1, value vh2) { gsl_histogram h1, h2; histo_of_val(&h1, vh1); histo_of_val(&h2, vh2); gsl_histogram_div(&h1, &h2); return Val_unit; } CAMLprim value ml_gsl_histogram_scale(value vh, value s) { gsl_histogram h; histo_of_val(&h, vh); gsl_histogram_scale(&h, Double_val(s)); return Val_unit; } CAMLprim value ml_gsl_histogram_shift(value vh, value s) { gsl_histogram h; histo_of_val(&h, vh); gsl_histogram_shift(&h, Double_val(s)); return Val_unit; } static inline void histopdf_of_val(gsl_histogram_pdf *p, value vh) { p->n = Int_val(Field(vh, 0)); p->range = Double_array_val(Field(vh, 1)); p->sum = Double_array_val(Field(vh, 2)); } CAMLprim value ml_gsl_histogram_pdf_init(value vp, value vh) { gsl_histogram_pdf p; gsl_histogram h; histopdf_of_val(&p, vp); histo_of_val(&h, vh); gsl_histogram_pdf_init(&p, &h); return Val_unit; } CAMLprim value ml_gsl_histogram_pdf_sample(value vp, value r) { gsl_histogram_pdf p; histopdf_of_val(&p, vp); return copy_double(gsl_histogram_pdf_sample(&p, r)); } ocamlgsl-0.6.0/gsl_stats.ml0000664000076400007640000000413710600031632014365 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) external mean : ?w:float array -> float array -> float = "ml_gsl_stats_mean" external variance : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_variance" external sd : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_sd" external variance_with_fixed_mean : ?w:float array -> mean:float -> float array -> float = "ml_gsl_stats_variance_with_fixed_mean" external sd_with_fixed_mean : ?w:float array -> mean:float -> float array -> float = "ml_gsl_stats_sd_with_fixed_mean" external absdev : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_absdev" external skew : ?w:float array -> float array -> float = "ml_gsl_stats_skew" external skew_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float = "ml_gsl_stats_skew_m_sd" external kurtosis : ?w:float array -> float array -> float = "ml_gsl_stats_kurtosis" external kurtosis_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float = "ml_gsl_stats_kurtosis_m_sd" external lag1_autocorrelation : mean:float -> float array -> float = "ml_gsl_stats_lag1_autocorrelation" external covariance : float array -> float array -> float = "ml_gsl_stats_covariance" external covariance_m : mean1:float -> float array -> mean2:float -> float array -> float = "ml_gsl_stats_covariance_m" external max : float array -> float = "ml_gsl_stats_max" external min : float array -> float = "ml_gsl_stats_min" external minmax : float array -> float * float = "ml_gsl_stats_minmax" external max_index : float array -> int = "ml_gsl_stats_max_index" external min_index : float array -> int = "ml_gsl_stats_min_index" external minmax_index : float array -> int * int = "ml_gsl_stats_minmax_index" external quantile_from_sorted_data : float array -> float -> float = "ml_gsl_stats_quantile_from_sorted_data" ocamlgsl-0.6.0/gsl_stats.mli0000664000076400007640000000403410600031632014532 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Statistics *) external mean : ?w:float array -> float array -> float = "ml_gsl_stats_mean" external variance : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_variance" external sd : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_sd" external variance_with_fixed_mean : ?w:float array -> mean:float -> float array -> float = "ml_gsl_stats_variance_with_fixed_mean" external sd_with_fixed_mean : ?w:float array -> mean:float -> float array -> float = "ml_gsl_stats_sd_with_fixed_mean" external absdev : ?w:float array -> ?mean:float -> float array -> float = "ml_gsl_stats_absdev" external skew : ?w:float array -> float array -> float = "ml_gsl_stats_skew" external skew_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float = "ml_gsl_stats_skew_m_sd" external kurtosis : ?w:float array -> float array -> float = "ml_gsl_stats_kurtosis" external kurtosis_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float = "ml_gsl_stats_kurtosis_m_sd" external lag1_autocorrelation : mean:float -> float array -> float = "ml_gsl_stats_lag1_autocorrelation" external covariance : float array -> float array -> float = "ml_gsl_stats_covariance" external covariance_m : mean1:float -> float array -> mean2:float -> float array -> float = "ml_gsl_stats_covariance_m" external max : float array -> float = "ml_gsl_stats_max" external min : float array -> float = "ml_gsl_stats_min" external minmax : float array -> float * float = "ml_gsl_stats_minmax" external max_index : float array -> int = "ml_gsl_stats_max_index" external min_index : float array -> int = "ml_gsl_stats_min_index" external minmax_index : float array -> int * int = "ml_gsl_stats_minmax_index" external quantile_from_sorted_data : float array -> float -> float = "ml_gsl_stats_quantile_from_sorted_data" ocamlgsl-0.6.0/mlgsl_stats.c0000664000076400007640000002060210600031632014523 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include "wrappers.h" static inline void check_array_size(value a, value b) { if(Double_array_length(a) != Double_array_length(b)) GSL_ERROR_VOID("array sizes differ", GSL_EBADLEN); } CAMLprim value ml_gsl_stats_mean(value ow, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_mean(Double_array_val(data), 1, len); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wmean(Double_array_val(w), 1, Double_array_val(data), 1, len); } return copy_double(result); } CAMLprim value ml_gsl_stats_variance(value ow, value omean, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) if(omean == Val_none) result = gsl_stats_variance(Double_array_val(data), 1, len); else result = gsl_stats_variance_m(Double_array_val(data), 1, len, Double_val(Unoption(omean))); else { value w = Unoption(ow); check_array_size(data, w); if(omean == Val_none) result = gsl_stats_wvariance(Double_array_val(w), 1, Double_array_val(data), 1, len); else result = gsl_stats_wvariance_m(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(Unoption(omean))); } return copy_double(result); } CAMLprim value ml_gsl_stats_sd(value ow, value omean, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) if(omean == Val_none) result = gsl_stats_sd(Double_array_val(data), 1, len); else result = gsl_stats_sd_m(Double_array_val(data), 1, len, Double_val(Unoption(omean))); else { value w = Unoption(ow); check_array_size(data, w); if(omean == Val_none) result = gsl_stats_wsd(Double_array_val(w), 1, Double_array_val(data), 1, len); else result = gsl_stats_wsd_m(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(Unoption(omean))); } return copy_double(result); } CAMLprim value ml_gsl_stats_variance_with_fixed_mean(value ow, value mean, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_variance_with_fixed_mean(Double_array_val(data), 1, len, Double_val(mean)); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wvariance_with_fixed_mean(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(mean)); } return copy_double(result); } CAMLprim value ml_gsl_stats_sd_with_fixed_mean(value ow, value mean, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_sd_with_fixed_mean(Double_array_val(data), 1, len, Double_val(mean)); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wsd_with_fixed_mean(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(mean)); } return copy_double(result); } CAMLprim value ml_gsl_stats_absdev(value ow, value omean, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) if(omean == Val_none) result = gsl_stats_absdev(Double_array_val(data), 1, len); else result = gsl_stats_absdev_m(Double_array_val(data), 1, len, Double_val(Unoption(omean))); else { value w = Unoption(ow); check_array_size(data, w); if(omean == Val_none) result = gsl_stats_wabsdev(Double_array_val(w), 1, Double_array_val(data), 1, len); else result = gsl_stats_wabsdev_m(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(Unoption(omean))); } return copy_double(result); } CAMLprim value ml_gsl_stats_skew(value ow, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_skew(Double_array_val(data), 1, len); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wskew(Double_array_val(w), 1, Double_array_val(data), 1, len); } return copy_double(result); } CAMLprim value ml_gsl_stats_skew_m_sd(value ow, value mean, value sd, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_skew_m_sd(Double_array_val(data), 1, len, Double_val(mean), Double_val(sd)); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wskew_m_sd(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(mean), Double_val(sd)); } return copy_double(result); } CAMLprim value ml_gsl_stats_kurtosis(value ow, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_kurtosis(Double_array_val(data), 1, len); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wkurtosis(Double_array_val(w), 1, Double_array_val(data), 1, len); } return copy_double(result); } CAMLprim value ml_gsl_stats_kurtosis_m_sd(value ow, value mean, value sd, value data) { size_t len = Double_array_length(data); double result; if(ow == Val_none) result = gsl_stats_kurtosis_m_sd(Double_array_val(data), 1, len, Double_val(mean), Double_val(sd)); else { value w = Unoption(ow); check_array_size(data, w); result = gsl_stats_wkurtosis_m_sd(Double_array_val(w), 1, Double_array_val(data), 1, len, Double_val(mean), Double_val(sd)); } return copy_double(result); } CAMLprim value ml_gsl_stats_lag1_autocorrelation(value omean, value data) { size_t len = Double_array_length(data); double result; if(omean == Val_none) result = gsl_stats_lag1_autocorrelation(Double_array_val(data), 1, len); else result = gsl_stats_lag1_autocorrelation_m(Double_array_val(data), 1, len, Double_val(Unoption(omean))); return copy_double(result); } CAMLprim value ml_gsl_stats_covariance(value data1, value data2) { size_t len = Double_array_length(data1); double result; check_array_size(data1, data2); result = gsl_stats_covariance(Double_array_val(data1), 1, Double_array_val(data2), 1, len); return copy_double(result); } CAMLprim value ml_gsl_stats_covariance_m(value mean1, value data1, value mean2, value data2) { size_t len = Double_array_length(data1); double result; check_array_size(data1, data2); result = gsl_stats_covariance_m(Double_array_val(data1), 1, Double_array_val(data2), 1, len, Double_val(mean1), Double_val(mean2)); return copy_double(result); } CAMLprim value ml_gsl_stats_max(value data) { size_t len = Double_array_length(data); double result = gsl_stats_max(Double_array_val(data), 1, len); return copy_double(result); } CAMLprim value ml_gsl_stats_min(value data) { size_t len = Double_array_length(data); double result = gsl_stats_min(Double_array_val(data), 1, len); return copy_double(result); } CAMLprim value ml_gsl_stats_minmax(value data) { size_t len = Double_array_length(data); double mi, ma; gsl_stats_minmax(&mi, &ma, Double_array_val(data), 1, len); return copy_two_double(mi, ma); } CAMLprim value ml_gsl_stats_max_index(value data) { size_t len = Double_array_length(data); size_t result = gsl_stats_max_index(Double_array_val(data), 1, len); return Val_int(result); } CAMLprim value ml_gsl_stats_min_index(value data) { size_t len = Double_array_length(data); size_t result = gsl_stats_min_index(Double_array_val(data), 1, len); return Val_int(result); } CAMLprim value ml_gsl_stats_minmax_index(value data) { size_t len = Double_array_length(data); size_t mi, ma; value r; gsl_stats_minmax_index(&mi, &ma, Double_array_val(data), 1, len); r = alloc_small(2, 0); Field(r, 0) = Val_int(mi); Field(r, 1) = Val_int(ma); return r; } CAMLprim value ml_gsl_stats_quantile_from_sorted_data(value data, value f) { size_t len = Double_array_length(data); double r = gsl_stats_quantile_from_sorted_data(Double_array_val(data), 1, len, Double_val(f)); return copy_double(r); } ocamlgsl-0.6.0/gsl_wavelet.ml0000664000076400007640000000527410600031632014701 0ustar olivolivtype t type ws type kind = | DAUBECHIES | DAUBECHIES_CENTERED | HAAR | HAAR_CENTERED | BSPLINE | BSPLINE_CENTERED type direction = | FORWARD | BACKWARD external _alloc : kind -> int -> t = "ml_gsl_wavelet_alloc" external _free : t -> unit = "ml_gsl_wavelet_free" let make kind size = let w = _alloc kind size in Gc.finalise _free w ; w external name : t -> string = "ml_gsl_wavelet_name" external _workspace_alloc : int -> ws = "ml_gsl_wavelet_workspace_alloc" external _workspace_free : ws -> unit = "ml_gsl_wavelet_workspace_free" let workspace_make size = let ws = _workspace_alloc size in Gc.finalise _workspace_free ws ; ws external workspace_size : ws -> int = "ml_gsl_wavelet_workspace_size" external _transform : t -> direction -> Gsl_vector_flat.vector -> ws -> unit = "ml_gsl_wavelet_transform" external _transform_bigarray : t -> direction -> Gsl_vector.vector -> ws -> unit = "ml_gsl_wavelet_transform_bigarray" let with_workspace ws length f arg = let workspace = match ws with | Some ws -> ws | None -> _workspace_alloc (length arg) in try f arg workspace ; if ws = None then _workspace_free workspace with exn -> if ws = None then _workspace_free workspace ; raise exn let transform_vector_flat w dir ?ws = with_workspace ws Gsl_vector_flat.length (_transform w dir) let transform_vector w dir ?ws = with_workspace ws Gsl_vector.length (_transform_bigarray w dir) let transform_gen w dir ?ws = function | `V v -> transform_vector w dir ?ws v | `VF v -> transform_vector_flat w dir ?ws v let transform_array w dir ?ws ?stride ?off ?len arr = transform_vector_flat w dir ?ws (Gsl_vector_flat.view_array ?stride ?off ?len arr) let transform_forward w = transform_array w FORWARD let transform_inverse w = transform_array w BACKWARD type ordering = | STANDARD | NON_STANDARD external _transform_2d : t -> ordering -> direction -> Gsl_matrix_flat.matrix -> ws -> unit = "ml_gsl_wavelet2d_transform_matrix" external _transform_2d_bigarray : t -> ordering -> direction -> Gsl_matrix.matrix -> ws -> unit = "ml_gsl_wavelet2d_transform_matrix" external _transform_2d_gen : t -> ordering -> direction -> [< Gsl_vectmat.mat] -> ws -> unit = "ml_gsl_wavelet2d_transform_matrix" let transform_matrix_flat w order dir ?ws = with_workspace ws (fun m -> fst (Gsl_matrix_flat.dims m)) (_transform_2d w order dir) let transform_matrix w order dir ?ws = with_workspace ws (fun m -> fst (Gsl_matrix.dims m)) (_transform_2d_bigarray w order dir) let transform_matrix_gen w order dir ?ws = with_workspace ws (fun m -> fst (Gsl_vectmat.dims m)) (_transform_2d_gen w order dir) ocamlgsl-0.6.0/gsl_wavelet.mli0000664000076400007640000000245110600031632015044 0ustar olivoliv(** Wavelet Transforms *) type t type ws type kind = | DAUBECHIES | DAUBECHIES_CENTERED | HAAR | HAAR_CENTERED | BSPLINE | BSPLINE_CENTERED type direction = FORWARD | BACKWARD val make : kind -> int -> t external name : t -> string = "ml_gsl_wavelet_name" val workspace_make : int -> ws external workspace_size : ws -> int = "ml_gsl_wavelet_workspace_size" (** {3 1D transforms} *) val transform_array : t -> direction -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit val transform_forward : t -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit val transform_inverse : t -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit val transform_vector_flat : t -> direction -> ?ws:ws -> Gsl_vector_flat.vector -> unit val transform_vector : t -> direction -> ?ws:ws -> Gsl_vector.vector -> unit val transform_gen : t -> direction -> ?ws:ws -> [< Gsl_vectmat.vec] -> unit (** {3 2D transforms} *) type ordering = | STANDARD | NON_STANDARD val transform_matrix_flat : t -> ordering -> direction -> ?ws:ws -> Gsl_matrix_flat.matrix -> unit val transform_matrix : t -> ordering -> direction -> ?ws:ws -> Gsl_matrix.matrix -> unit val transform_matrix_gen : t -> ordering -> direction -> ?ws:ws -> [< Gsl_vectmat.mat] -> unit ocamlgsl-0.6.0/mlgsl_wavelet.c0000664000076400007640000000616210600031632015041 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include #include #include "mlgsl_matrix_double.h" #include "wrappers.h" static const gsl_wavelet_type * gslwavelettype_val (value v) { const gsl_wavelet_type *w_type[] = { gsl_wavelet_daubechies, gsl_wavelet_daubechies_centered, gsl_wavelet_haar, gsl_wavelet_haar_centered, gsl_wavelet_bspline, gsl_wavelet_bspline_centered }; return w_type [ Int_val (v) ] ; } CAMLprim value ml_gsl_wavelet_alloc (value ty, value k) { value r; gsl_wavelet *w; w = gsl_wavelet_alloc (gslwavelettype_val (ty), Long_val (k)); Abstract_ptr (r, w); return r; } #define Wavelet_val(v) (gsl_wavelet *)Field(v, 0) ML1 (gsl_wavelet_free, Wavelet_val, Unit) ML1 (gsl_wavelet_name, Wavelet_val, copy_string) CAMLprim value ml_gsl_wavelet_workspace_alloc (value n) { value r; gsl_wavelet_workspace *ws; ws = gsl_wavelet_workspace_alloc (Long_val (n)); Abstract_ptr (r, ws); return r; } #define WS_val(v) (gsl_wavelet_workspace *)Field(v, 0) CAMLprim value ml_gsl_wavelet_workspace_size (value ws) { return Val_long ((WS_val (ws))->n); } ML1 (gsl_wavelet_workspace_free, WS_val, Unit) static inline gsl_wavelet_direction gsl_direction_val (value v) { static const gsl_wavelet_direction conv[] = { gsl_wavelet_forward, gsl_wavelet_backward }; return conv [ Int_val (v) ]; } static void check_array (value vf) { mlsize_t len = Double_array_length (Field (vf, 0)); size_t off = Long_val (Field (vf, 1)); size_t n = Long_val (Field (vf, 2)); size_t stride = Long_val (Field (vf, 3)); if (off + (n - 1) * stride >= len) GSL_ERROR_VOID ("Inconsistent array specification", GSL_EBADLEN); } CAMLprim value ml_gsl_wavelet_transform (value w, value dir, value vf, value ws) { double *data = Double_array_val (Field (vf, 0)) + Long_val (Field (vf, 1)); size_t n = Long_val (Field (vf, 2)); size_t stride = Long_val (Field (vf, 3)); check_array (vf); gsl_wavelet_transform (Wavelet_val (w), data, stride, n, gsl_direction_val (dir), WS_val (ws)); return Val_unit; } CAMLprim value ml_gsl_wavelet_transform_bigarray (value w, value dir, value b, value ws) { struct caml_bigarray *bigarr = Bigarray_val(b); double *data = bigarr->data; size_t n = bigarr->dim[0]; gsl_wavelet_transform (Wavelet_val (w), data, 1, n, gsl_direction_val (dir), WS_val (ws)); return Val_unit; } /* 2D transforms */ CAMLprim value ml_gsl_wavelet2d_transform_matrix (value w, value ordering, value dir, value a, value ws) { _DECLARE_MATRIX(a); _CONVERT_MATRIX(a); if (Int_val (ordering) == 0) gsl_wavelet2d_transform_matrix (Wavelet_val (w), &m_a, gsl_direction_val (dir), WS_val (ws)); else gsl_wavelet2d_nstransform_matrix (Wavelet_val (w), &m_a, gsl_direction_val (dir), WS_val (ws)); return Val_unit; } ocamlgsl-0.6.0/gsl_bspline.ml0000664000076400007640000000146510607755005014702 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2007 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) type ws external _alloc : k:int -> nbreak:int -> ws = "ml_gsl_bspline_alloc" external _free : ws -> unit = "ml_gsl_bspline_free" let make ~k ~nbreak = let ws = _alloc ~k ~nbreak in Gc.finalise _free ws ; ws external ncoeffs : ws -> int = "ml_gsl_bspline_ncoeffs" "noalloc" open Gsl_vectmat external knots : [< vec] -> ws -> unit = "ml_gsl_bspline_knots" external knots_uniform : a:float -> b:float -> ws -> unit = "ml_gsl_bspline_knots_uniform" external _eval : float -> [< vec] -> ws -> unit = "ml_gsl_bspline_eval" let eval ws x = let n = ncoeffs ws in let v = `V (Gsl_vector.create n) in _eval x v ws ; v ocamlgsl-0.6.0/gsl_bspline.mli0000664000076400007640000000113610607755005015046 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2007 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Basis Splines *) type ws val make : k:int -> nbreak:int -> ws external ncoeffs : ws -> int = "ml_gsl_bspline_ncoeffs" "noalloc" open Gsl_vectmat external knots : [< vec] -> ws -> unit = "ml_gsl_bspline_knots" external knots_uniform : a:float -> b:float -> ws -> unit = "ml_gsl_bspline_knots_uniform" external _eval : float -> [< vec] -> ws -> unit = "ml_gsl_bspline_eval" val eval : ws -> float -> [> vec] ocamlgsl-0.6.0/mlgsl_bspline.c0000664000076400007640000000212010607755005015032 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2007 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include "wrappers.h" CAMLprim value ml_gsl_bspline_alloc(value k, value nbreak) { value r; gsl_bspline_workspace *w = gsl_bspline_alloc (Long_val(k), Long_val(nbreak)); Abstract_ptr(r, w); return r; } #define Bspline_val(v) ((gsl_bspline_workspace *)(Field((v), 0))) ML1(gsl_bspline_free, Bspline_val, Unit) ML1(gsl_bspline_ncoeffs, Bspline_val, Val_long) #include "mlgsl_vector_double.h" CAMLprim value ml_gsl_bspline_knots (value b, value w) { _DECLARE_VECTOR(b); _CONVERT_VECTOR(b); gsl_bspline_knots(&v_b, Bspline_val(w)); return Val_unit; } ML3(gsl_bspline_knots_uniform, Double_val, Double_val, Bspline_val, Unit) CAMLprim value ml_gsl_bspline_eval (value x, value B, value w) { _DECLARE_VECTOR(B); _CONVERT_VECTOR(B); gsl_bspline_eval(Double_val(x), &v_B, Bspline_val(w)); return Val_unit; } ocamlgsl-0.6.0/mlgsl_sf.c0000664000076400007640000004156510607755006014027 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #include #include #include #include #include "wrappers.h" static inline value val_of_result(gsl_sf_result *result) { return copy_two_double_arr(result->val, result->err); } static value val_of_result_pair (gsl_sf_result *re, gsl_sf_result *im) { CAMLparam0 (); CAMLlocal3 (v, v_re, v_im); v_re = val_of_result (re); v_im = val_of_result (im); v = alloc_small (2, 0); Field (v, 0) = v_re; Field (v, 1) = v_im; CAMLreturn (v); } static inline value val_of_result_e10(gsl_sf_result_e10 *result) { CAMLparam0(); CAMLlocal3(r, v, e) ; v = copy_double(result->val); e = copy_double(result->err); r = alloc_small(3, 0); Field(r, 0) = v; Field(r, 1) = e; Field(r, 2) = Val_int(result->e10); CAMLreturn(r); } CAMLprim value ml_gsl_sf_result_smash_e(value e10) { gsl_sf_result r; gsl_sf_result_e10 e = { /*.val =*/ Double_val(Field(e10, 0)), /*.err =*/ Double_val(Field(e10, 1)), /*.e10 =*/ Int_val(Field(e10, 2)) } ; gsl_sf_result_smash_e(&e, &r); return val_of_result(&r); } #define GSL_MODE_val Int_val #define ML1_res(name, conv1) \ CAMLprim value ml_##name(value arg1) \ { gsl_sf_result res; \ name(conv1(arg1), &res); \ return val_of_result(&res); } #define ML2_res(name, conv1, conv2) \ CAMLprim value ml_##name(value arg1, value arg2) \ { gsl_sf_result res; \ name(conv1(arg1), conv2(arg2), &res); \ return val_of_result(&res); } #define ML3_res(name, conv1, conv2, conv3) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3) \ { gsl_sf_result res; \ name(conv1(arg1), conv2(arg2), conv3(arg3), &res); \ return val_of_result(&res); } #define ML4_res(name, conv1, conv2, conv3, conv4) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3, value arg4) \ { gsl_sf_result res; \ name(conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), &res); \ return val_of_result(&res); } #define ML5_res(name, conv1, conv2, conv3, conv4, conv5) \ CAMLprim value ml_##name(value arg1, value arg2, value arg3, value arg4, value arg5) \ { gsl_sf_result res; \ name(conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), conv5(arg5), &res); \ return val_of_result(&res); } #define SF1(name, conv1) \ ML1(gsl_sf_##name, conv1, copy_double) \ ML1_res(gsl_sf_##name##_e, conv1) #define SF2(name, conv1, conv2) \ ML2(gsl_sf_##name, conv1, conv2, copy_double) \ ML2_res(gsl_sf_##name##_e, conv1, conv2) #define SF3(name, conv1, conv2, conv3) \ ML3(gsl_sf_##name, conv1, conv2, conv3, copy_double) \ ML3_res(gsl_sf_##name##_e, conv1, conv2, conv3) #define SF4(name, conv1, conv2, conv3, conv4) \ ML4(gsl_sf_##name, conv1, conv2, conv3, conv4, copy_double) \ ML4_res(gsl_sf_##name##_e, conv1, conv2, conv3, conv4) #define SF5(name, conv1, conv2, conv3, conv4, conv5) \ ML5(gsl_sf_##name, conv1, conv2, conv3, conv4, conv5, copy_double) \ ML5_res(gsl_sf_##name##_e, conv1, conv2, conv3, conv4, conv5) /* AIRY functions */ SF2(airy_Ai, Double_val, GSL_MODE_val) SF2(airy_Bi, Double_val, GSL_MODE_val) SF2(airy_Ai_scaled, Double_val, GSL_MODE_val) SF2(airy_Bi_scaled, Double_val, GSL_MODE_val) SF2(airy_Ai_deriv, Double_val, GSL_MODE_val) SF2(airy_Bi_deriv, Double_val, GSL_MODE_val) SF2(airy_Ai_deriv_scaled, Double_val, GSL_MODE_val) SF2(airy_Bi_deriv_scaled, Double_val, GSL_MODE_val) SF1(airy_zero_Ai, Int_val) SF1(airy_zero_Bi, Int_val) SF1(airy_zero_Ai_deriv, Int_val) SF1(airy_zero_Bi_deriv, Int_val) /* BESSEL functions */ #define BESSEL_CYL(l) \ SF1(bessel_##l##0, Double_val) \ SF1(bessel_##l##1, Double_val) \ SF2(bessel_##l##n, Int_val, Double_val) \ value ml_gsl_sf_bessel_##l##n_array(value nmin, value x, value r_arr){\ int NMIN=Int_val(nmin); \ int NMAX=NMIN+Double_array_length(r_arr)-1; \ gsl_sf_bessel_##l##n_array(NMIN, NMAX, Double_val(x), Double_array_val(r_arr));\ return Val_unit; } #define BESSEL_CYL_SCALED(l) \ SF1(bessel_##l##0_scaled, Double_val) \ SF1(bessel_##l##1_scaled, Double_val) \ SF2(bessel_##l##n_scaled, Int_val, Double_val) \ value ml_gsl_sf_bessel_##l##n_scaled_array(value nmin, value x, value r_arr){\ int NMIN=Int_val(nmin); \ int NMAX=NMIN+Double_array_length(r_arr)-1; \ gsl_sf_bessel_##l##n_array(NMIN, NMAX, Double_val(x), Double_array_val(r_arr));\ return Val_unit; } BESSEL_CYL(J) BESSEL_CYL(Y) BESSEL_CYL(I) BESSEL_CYL_SCALED(I) BESSEL_CYL(K) BESSEL_CYL_SCALED(K) #define BESSEL_SPH(c) \ SF1(bessel_##c##0, Double_val) \ SF1(bessel_##c##1, Double_val) \ SF1(bessel_##c##2, Double_val) \ SF2(bessel_##c##l, Int_val, Double_val) \ value ml_gsl_sf_bessel_##c##l_array(value x, value r_arr){\ int LMAX=Double_array_length(r_arr)-1; \ gsl_sf_bessel_##c##l_array(LMAX, Double_val(x), Double_array_val(r_arr));\ return Val_unit; } #define BESSEL_SPH_SCALED(c) \ SF1(bessel_##c##0_scaled, Double_val) \ SF1(bessel_##c##1_scaled, Double_val) \ SF2(bessel_##c##l_scaled, Int_val, Double_val) \ value ml_gsl_sf_bessel_##c##l_scaled_array(value x, value r_arr){\ int LMAX=Double_array_length(r_arr)-1; \ gsl_sf_bessel_##c##l_scaled_array(LMAX, Double_val(x), Double_array_val(r_arr));\ return Val_unit; } BESSEL_SPH(j) CAMLprim value ml_gsl_sf_bessel_jl_steed_array(value x, value x_arr) { gsl_sf_bessel_jl_steed_array(Double_array_length(x_arr)-1, Double_val(x), Double_array_val(x_arr)); return Val_unit; } BESSEL_SPH(y) BESSEL_SPH_SCALED(i) BESSEL_SPH_SCALED(k) SF2(bessel_Jnu, Double_val, Double_val) CAMLprim value ml_gsl_sf_bessel_sequence_Jnu_e(value nu, value mode, value x) { gsl_sf_bessel_sequence_Jnu_e(Double_val(nu), GSL_MODE_val(mode), Double_array_length(x), Double_array_val(x)); return Val_unit; } SF2(bessel_Ynu, Double_val, Double_val) SF2(bessel_Inu, Double_val, Double_val) SF2(bessel_Inu_scaled, Double_val, Double_val) SF2(bessel_Knu, Double_val, Double_val) SF2(bessel_lnKnu, Double_val, Double_val) SF2(bessel_Knu_scaled, Double_val, Double_val) SF1(bessel_zero_J0, Int_val) SF1(bessel_zero_J1, Int_val) SF2(bessel_zero_Jnu, Double_val, Int_val) /* CLAUSEN functions */ SF1(clausen, Double_val) /* COULOMB functions */ SF2(hydrogenicR_1, Double_val, Double_val) SF4(hydrogenicR, Int_val, Int_val, Double_val, Double_val) /* FIXME: COULOMB wave functions */ ML2_res(gsl_sf_coulomb_CL_e, Double_val, Double_val) CAMLprim value ml_gsl_sf_coulomb_CL_array(value lmin, value eta, value c_arr) { gsl_sf_coulomb_CL_array(Double_val(lmin), Double_array_length(c_arr)-1, Double_val(eta), Double_array_val(c_arr)); return Val_unit; } /* FIXME: coupling coeffs */ /* DAWSON function */ SF1(dawson, Double_val) /* DEBYE functions */ SF1(debye_1, Double_val) SF1(debye_2, Double_val) SF1(debye_3, Double_val) SF1(debye_4, Double_val) SF1(debye_5, Double_val) SF1(debye_6, Double_val) /* DILOGARITHM */ SF1(dilog, Double_val) CAMLprim value ml_gsl_sf_complex_dilog_e(value r, value theta) { gsl_sf_result re,im; gsl_sf_complex_dilog_e(Double_val(r), Double_val(theta), &re, &im); return val_of_result_pair (&re, &im); } CAMLprim value ml_gsl_sf_complex_dilog_xy_e(value x, value y) { gsl_sf_result re, im; gsl_sf_complex_dilog_xy_e (Double_val(x), Double_val(y), &re, &im); return val_of_result_pair (&re, &im); } CAMLprim value ml_gsl_sf_complex_spence_xy_e(value x, value y) { gsl_sf_result re, im; gsl_sf_complex_spence_xy_e (Double_val(x), Double_val(y), &re, &im); return val_of_result_pair (&re, &im); } /* ELEMENTARY operations */ ML2_res(gsl_sf_multiply_e, Double_val, Double_val) ML4_res(gsl_sf_multiply_err_e, Double_val, Double_val, Double_val, Double_val) /* ELLIPTIC integrals */ SF2(ellint_Kcomp, Double_val, GSL_MODE_val) SF2(ellint_Ecomp, Double_val, GSL_MODE_val) SF3(ellint_Pcomp, Double_val, Double_val, GSL_MODE_val) SF2(ellint_Dcomp, Double_val, GSL_MODE_val) SF3(ellint_F, Double_val, Double_val, GSL_MODE_val) SF3(ellint_E, Double_val, Double_val, GSL_MODE_val) SF4(ellint_P, Double_val, Double_val, Double_val, GSL_MODE_val) SF4(ellint_D, Double_val, Double_val, Double_val, GSL_MODE_val) SF3(ellint_RC, Double_val, Double_val, GSL_MODE_val) SF4(ellint_RD, Double_val, Double_val, Double_val, GSL_MODE_val) SF4(ellint_RF, Double_val, Double_val, Double_val, GSL_MODE_val) SF5(ellint_RJ, Double_val, Double_val, Double_val, Double_val, GSL_MODE_val) /* FIXME: gsl_sf_elljac_e */ /* ERROR functions */ SF1(erf, Double_val) SF1(erfc, Double_val) SF1(log_erfc, Double_val) SF1(erf_Z, Double_val) SF1(erf_Q, Double_val) /* EXPONENTIAL functions */ SF1(exp, Double_val) CAMLprim value ml_gsl_sf_exp_e10_e(value x) { gsl_sf_result_e10 res; gsl_sf_exp_e10_e(Double_val(x), &res); return val_of_result_e10(&res); } SF2(exp_mult, Double_val, Double_val) CAMLprim value ml_gsl_sf_exp_mult_e10_e(value x, value y) { gsl_sf_result_e10 res; gsl_sf_exp_mult_e10_e(Double_val(x), Double_val(y), &res); return val_of_result_e10(&res); } SF1(expm1, Double_val) SF1(exprel, Double_val) SF1(exprel_2, Double_val) SF2(exprel_n, Int_val, Double_val) ML2_res(gsl_sf_exp_err_e, Double_val, Double_val) CAMLprim value ml_gsl_sf_exp_err_e10_e(value x, value dx) { gsl_sf_result_e10 res; gsl_sf_exp_err_e10_e(Double_val(x), Double_val(dx), &res); return val_of_result_e10(&res); } ML4_res(gsl_sf_exp_mult_err_e, Double_val, Double_val, Double_val, Double_val) CAMLprim value ml_gsl_sf_exp_mult_err_e10_e(value x, value dx, value y, value dy) { gsl_sf_result_e10 res; gsl_sf_exp_mult_err_e10_e(Double_val(x), Double_val(dx), Double_val(y), Double_val(dy), &res); return val_of_result_e10(&res); } /* EXPONENTIAL integrals */ SF1(expint_E1, Double_val) SF1(expint_E2, Double_val) SF1(expint_E1_scaled, Double_val) SF1(expint_E2_scaled, Double_val) SF1(expint_Ei, Double_val) SF1(expint_Ei_scaled, Double_val) SF1(Shi, Double_val) SF1(Chi, Double_val) SF1(expint_3, Double_val) SF1(Si, Double_val) SF1(Ci, Double_val) SF1(atanint, Double_val) /* FERMI-DIRAC functions */ SF1(fermi_dirac_m1, Double_val) SF1(fermi_dirac_0, Double_val) SF1(fermi_dirac_1, Double_val) SF1(fermi_dirac_2, Double_val) SF2(fermi_dirac_int, Int_val, Double_val) SF1(fermi_dirac_mhalf, Double_val) SF1(fermi_dirac_half, Double_val) SF1(fermi_dirac_3half, Double_val) SF2(fermi_dirac_inc_0, Double_val, Double_val) /* GAMMA function */ SF1(gamma, Double_val) SF1(lngamma, Double_val) CAMLprim value ml_gsl_sf_lngamma_sgn_e(value x) { gsl_sf_result res; double sgn; gsl_sf_lngamma_sgn_e(Double_val(x), &res, &sgn); { CAMLparam0(); CAMLlocal3(v,r,s); r=val_of_result(&res); s=copy_double(sgn); v=alloc_small(2, 0); Field(v, 0)=r; Field(v, 1)=s; CAMLreturn(v); } } SF1(gammastar, Double_val) SF1(gammainv, Double_val) CAMLprim value ml_gsl_sf_lngamma_complex_e(value zr, value zi) { gsl_sf_result lnr, arg; gsl_sf_lngamma_complex_e(Double_val(zr), Double_val(zi),&lnr, &arg); return val_of_result_pair (&lnr, &arg); } SF2(taylorcoeff, Int_val, Double_val) SF1(fact, Int_val) SF1(doublefact, Int_val) SF1(lnfact, Int_val) SF1(lndoublefact, Int_val) SF2(choose, Int_val, Int_val) SF2(lnchoose, Int_val, Int_val) SF2(poch, Double_val, Double_val) SF2(lnpoch, Double_val, Double_val) CAMLprim value ml_gsl_sf_lnpoch_sgn_e(value a, value x) { gsl_sf_result res; double sgn; gsl_sf_lnpoch_sgn_e(Double_val(a), Double_val(x), &res, &sgn); { CAMLparam0(); CAMLlocal3(v,r,s); r=val_of_result(&res); s=copy_double(sgn); v=alloc_small(2, 0); Field(v, 0)=r; Field(v, 1)=s; CAMLreturn(v); } } SF2(pochrel, Double_val, Double_val) SF2(gamma_inc_Q, Double_val, Double_val) SF2(gamma_inc_P, Double_val, Double_val) SF2(gamma_inc, Double_val, Double_val) SF2(beta, Double_val, Double_val) SF2(lnbeta, Double_val, Double_val) CAMLprim value ml_gsl_sf_lnbeta_sgn_e(value x, value y) { gsl_sf_result res; double sgn; gsl_sf_lnbeta_sgn_e(Double_val(x), Double_val(y), &res, &sgn); { CAMLparam0(); CAMLlocal3(v,r,s); r=val_of_result(&res); s=copy_double(sgn); v=alloc_small(2, 0); Field(v, 0)=r; Field(v, 1)=s; CAMLreturn(v); } } SF3(beta_inc, Double_val, Double_val, Double_val) /* GEGENBAUER functions */ SF2(gegenpoly_1, Double_val, Double_val) SF2(gegenpoly_2, Double_val, Double_val) SF2(gegenpoly_3, Double_val, Double_val) SF3(gegenpoly_n, Int_val, Double_val, Double_val) CAMLprim value ml_gsl_sf_gegenpoly_array(value lambda, value x, value r_arr) { gsl_sf_gegenpoly_array(Double_array_length(r_arr)-1, Double_val(lambda), Double_val(x), Double_array_val(r_arr)); return Val_unit; } /* HYPERGEOMETRIC functions */ /* FIXME */ /* LAGUERRE functions */ SF2(laguerre_1, Double_val, Double_val) SF2(laguerre_2, Double_val, Double_val) SF2(laguerre_3, Double_val, Double_val) SF3(laguerre_n, Int_val, Double_val, Double_val) /* LAMBERT W functions */ SF1(lambert_W0, Double_val) SF1(lambert_Wm1, Double_val) /* LEGENDRE functions */ SF1(legendre_P1, Double_val) SF1(legendre_P2, Double_val) SF1(legendre_P3, Double_val) SF2(legendre_Pl, Int_val, Double_val) CAMLprim value ml_gsl_sf_legendre_Pl_array(value x, value r_arr) { gsl_sf_legendre_Pl_array(Double_array_length(r_arr)-1, Double_val(x), Double_array_val(r_arr)); return Val_unit; } SF1(legendre_Q0, Double_val) SF1(legendre_Q1, Double_val) SF2(legendre_Ql, Int_val, Double_val) /* Associated Legendre Polynomials and Spherical Harmonics */ SF3(legendre_Plm, Int_val, Int_val, Double_val) CAMLprim value ml_gsl_sf_legendre_Plm_array(value lmax, value m, value x, value result_array) { gsl_sf_legendre_Plm_array(Int_val(lmax), Int_val(m), Double_val(x), Double_array_val(result_array)); return Val_unit; } SF3(legendre_sphPlm, Int_val, Int_val, Double_val) CAMLprim value ml_gsl_sf_legendre_sphPlm_array(value lmax, value m, value x, value result_array) { gsl_sf_legendre_sphPlm_array(Int_val(lmax), Int_val(m), Double_val(x), Double_array_val(result_array)); return Val_unit; } CAMLprim value ml_gsl_sf_legendre_array_size(value lmax, value m) { CAMLparam2(lmax, m); CAMLlocal1(ret); int gsl_ret; gsl_ret = gsl_sf_legendre_array_size(Int_val(lmax), Int_val(m)); ret = Val_int(gsl_ret); CAMLreturn(ret); } /* LOGARITHM and related functions */ SF1(log, Double_val) SF1(log_abs, Double_val) CAMLprim value ml_gsl_sf_complex_log_e(value zr, value zi) { gsl_sf_result lnr, theta; gsl_sf_complex_log_e(Double_val(zr), Double_val(zi), &lnr, &theta); return val_of_result_pair (&lnr, &theta); } SF1(log_1plusx, Double_val) SF1(log_1plusx_mx, Double_val) /* POWER function */ SF2(pow_int, Double_val, Int_val) /* PSI functions */ SF1(psi_int, Int_val) SF1(psi, Double_val) SF1(psi_1piy, Double_val) CAMLprim value ml_gsl_sf_complex_psi_e(value x, value y) { gsl_sf_result r_re, r_im; gsl_sf_complex_psi_e (Double_val(x), Double_val(y), &r_re, &r_im); return val_of_result_pair (&r_re, &r_im); } SF1(psi_1_int, Int_val) SF1(psi_1, Double_val) SF2(psi_n, Int_val, Double_val) /* SYNCHROTRON functions */ SF1(synchrotron_1, Double_val) SF1(synchrotron_2, Double_val) /* TRANSPORT functions */ SF1(transport_2, Double_val) SF1(transport_3, Double_val) SF1(transport_4, Double_val) SF1(transport_5, Double_val) /* TRIGONOMETRIC functions */ SF1(sin, Double_val) SF1(cos, Double_val) SF2(hypot, Double_val, Double_val) SF1(sinc, Double_val) CAMLprim value ml_gsl_sf_complex_sin_e(value zr, value zi) { gsl_sf_result szr, szi; gsl_sf_complex_sin_e(Double_val(zr), Double_val(zi), &szr, &szi); return val_of_result_pair (&szr, &szi); } CAMLprim value ml_gsl_sf_complex_cos_e(value zr, value zi) { gsl_sf_result szr, szi; gsl_sf_complex_cos_e(Double_val(zr), Double_val(zi), &szr, &szi); return val_of_result_pair (&szr, &szi); } CAMLprim value ml_gsl_sf_complex_logsin_e(value zr, value zi) { gsl_sf_result lszr, lszi; gsl_sf_complex_logsin_e(Double_val(zr), Double_val(zi), &lszr, &lszi); return val_of_result_pair (&lszr, &lszi); } SF1(lnsinh, Double_val) SF1(lncosh, Double_val) CAMLprim value ml_gsl_sf_polar_to_rect(value r, value theta) { gsl_sf_result x, y; gsl_sf_polar_to_rect(Double_val(r), Double_val(theta), &x, &y); return val_of_result_pair (&x, &y); } CAMLprim value ml_gsl_sf_rect_to_polar(value x, value y) { gsl_sf_result r, theta; gsl_sf_rect_to_polar(Double_val(x), Double_val(y), &r, &theta); return val_of_result_pair (&r, &theta); } ML1(gsl_sf_angle_restrict_symm, Double_val, copy_double) ML1(gsl_sf_angle_restrict_pos, Double_val, copy_double) ML2_res(gsl_sf_sin_err_e, Double_val, Double_val) ML2_res(gsl_sf_cos_err_e, Double_val, Double_val) /* ZETA functions */ SF1(zeta_int, Int_val) SF1(zeta, Double_val) SF2(hzeta, Double_val, Double_val) SF1(eta_int, Int_val) SF1(eta, Double_val) ocamlgsl-0.6.0/gsl_sf.mli.q0000664000076400007640000001701710607755005014266 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) (** Special functions *) open Gsl_fun (* AIRY functions *) << airy_Ai float mode >> << airy_Bi float mode >> << airy_Ai_scaled float mode >> << airy_Bi_scaled float mode >> << airy_Ai_deriv float mode >> << airy_Bi_deriv float mode >> << airy_Ai_deriv_scaled float mode >> << airy_Bi_deriv_scaled float mode >> << airy_zero_Ai int >> << airy_zero_Bi int >> (* BESSEL functions *) <:bessel< cyl J >> <:bessel< cyl Y >> <:bessel< cyl I >> <:bessel< cyl K >> <:bessel< cyl_scaled I >> <:bessel< cyl_scaled K >> <:bessel< sph j >> <:ext< bessel_jl_steed_array@ml_gsl_sf_bessel_jl_steed_array,float,float array,unit >> <:bessel< sph y >> <:bessel< sph_scaled i >> <:bessel< sph_scaled k >> << bessel_Jnu float float >> <:ext< bessel_sequence_Jnu_e@ml_gsl_sf_bessel_sequence_Jnu_e,float,mode,float array,unit>> << bessel_Ynu float float >> << bessel_Inu float float >> << bessel_Inu_scaled float float >> << bessel_Knu float float >> << bessel_lnKnu float float >> << bessel_Knu_scaled float float >> << bessel_zero_J0 int >> << bessel_zero_J1 int >> << bessel_zero_Jnu float int >> (* CLAUSEN functions *) << clausen float >> (* COULOMB functions *) << hydrogenicR_1 float float >> << hydrogenicR int int float float >> (* FIXME: COULOMB wave functions *) <:ext< coulomb_CL_e@ml_gsl_sf_coulomb_CL_e,float,float,result >> <:ext< coulomb_CL_array@ml_gsl_sf_coulomb_CL_array,float,float,float array,unit >> (* FIXME: coupling coeffs *) (* DAWSON functions *) << dawson float >> (* DEBYE functions *) << debye_1 float >> << debye_2 float >> << debye_3 float >> << debye_4 float >> << debye_5 float >> << debye_6 float >> (* DILOGARITHM *) << dilog float >> <:ext< complex_dilog_xy_e@ml_gsl_sf_complex_dilog_xy_e,float,float,result * result >> <:ext< complex_dilog_e@ml_gsl_sf_complex_dilog_e,float,float,result * result >> <:ext< complex_spence_xy_e@ml_gsl_sf_complex_spence_xy_e,float,float,result * result >> (* ELEMENTARY operations *) <:ext< multiply_e@ml_gsl_sf_multiply_e,float,float,result >> <:ext< multiply_err_e@ml_gsl_sf_multiply_err_e,x:float,dx:float,y:float,dy:float,result >> (* ELLIPTIC integrals *) << ellint_Kcomp float mode >> << ellint_Ecomp float mode >> << ellint_Pcomp float float mode >> << ellint_Dcomp float mode >> << ellint_F float float mode >> << ellint_E float float mode >> << ellint_P float float float mode >> << ellint_D float float float mode >> << ellint_RC float float mode >> << ellint_RD float float float mode >> << ellint_RF float float float mode >> << ellint_RJ float float float float mode >> (* FIXME: elljac_e *) (* ERROR function *) << erf float >> << erfc float >> << log_erfc float >> << erf_Z float >> << erf_Q float >> (* EXPONENTIAL functions *) << exp float >> <:ext< exp_e10@ml_gsl_sf_exp_e10_e,float,result_e10 >> << exp_mult float float >> <:ext< exp_mult_e10@ml_gsl_sf_exp_mult_e10_e,float,float,result_e10 >> << expm1 float >> << exprel float >> << exprel_2 float >> << exprel_n int float >> <:ext< exp_err_e@ml_gsl_sf_exp_err_e,x:float,dx:float,result >> <:ext< exp_err_e10@ml_gsl_sf_exp_err_e10_e,x:float,dx:float,result_e10 >> <:ext< exp_mult_err_e@ml_gsl_sf_exp_mult_err_e,x:float,dx:float,y:float,dy:float,result >> <:ext< exp_mult_err_e10_e@ml_gsl_sf_exp_mult_err_e10_e,x:float,dx:float,y:float,dy:float,result_e10 >> (* EXPONENTIAL integrals *) << expint_E1 float >> << expint_E2 float >> << expint_E1_scaled float >> << expint_E2_scaled float >> << expint_Ei float >> << expint_Ei_scaled float >> <:ext< shi@ml_gsl_sf_Shi@gsl_sf_Shi,float,float >> <:ext< chi@ml_gsl_sf_Chi@gsl_sf_Chi,float,float >> << expint_3 float >> <:ext< si@ml_gsl_sf_Si@gsl_sf_Si,float,float >> <:ext< ci@ml_gsl_sf_Ci@gsl_sf_Ci,float,float >> << atanint float >> (* fermi-dirac *) << fermi_dirac_m1 float >> << fermi_dirac_0 float >> << fermi_dirac_1 float >> << fermi_dirac_2 float >> << fermi_dirac_int int float >> << fermi_dirac_mhalf float >> << fermi_dirac_half float >> << fermi_dirac_3half float >> << fermi_dirac_inc_0 float float >> (* Gamma function *) << gamma float >> << lngamma float >> <:ext< lngamma_sgn_e@ml_gsl_sf_lngamma_sgn_e,float,result * float >> << gammastar float >> << gammainv float >> <:ext< lngamma_complex_e@ml_gsl_sf_lngamma_complex_e,float,float,result * result >> << taylorcoeff int float >> << fact int >> << doublefact int >> << lnfact int >> << lndoublefact int >> << choose int int >> << lnchoose int int >> << poch float float >> << lnpoch float float >> <:ext< lnpoch_sgn_e@ml_gsl_sf_lngamma_sgn_e,float,float,result * float >> << pochrel float float >> << gamma_inc_Q float float >> << gamma_inc_P float float >> << gamma_inc float float >> << beta float float >> << lnbeta float float >> <:ext< lnbeta_sgn_e@ml_gsl_sf_lnbeta_sgn_e,float,float,result * float >> << beta_inc float float float >> (* GEGENBAUER functions *) << gegenpoly_1 float float >> << gegenpoly_2 float float >> << gegenpoly_3 float float >> << gegenpoly_n int float float >> <:ext< gegenpoly_array@ml_gsl_sf_gegenpoly_array,float,float,float array,unit >> (* HYPERGEOMETRIC functions *) (* FIXME *) (* LAGUERRE functions *) << laguerre_1 float float >> << laguerre_2 float float >> << laguerre_3 float float >> << laguerre_n int float float >> (* LAMBERT W functions *) << lambert_W0 float >> << lambert_Wm1 float >> (* LEGENDRE functions *) << legendre_P1 float >> << legendre_P2 float >> << legendre_P3 float >> << legendre_Pl int float >> <:ext< legendre_Pl_array@ml_gsl_sf_legendre_Pl_array,float,float array,unit >> << legendre_Q0 float >> << legendre_Q1 float >> << legendre_Ql int float >> (* Associated LEGENDRE functions *) << legendre_Plm int int float >> <:ext< legendre_Plm_array@ml_gsl_sf_legendre_Plm_array,int,int,float,float array,unit >> << legendre_sphPlm int int float >> <:ext< legendre_sphPlm_array@ml_gsl_sf_legendre_sphPlm_array,int,int,float,float array,unit >> <:ext< legendre_array_size@ml_gsl_sf_legendre_array_size,int,int,int >> (* LOGARITHM and related functions *) << log float >> << log_abs float >> <:ext< log_complex_e@ml_gsl_sf_complex_log_e,float,float,result * result >> << log_1plusx float >> << log_1plusx_mx float >> (* POWER function *) << pow_int float int >> (* PSI function *) << psi_int int >> << psi float >> << psi_1piy float >> <:ext< psi_complex_e@ml_gsl_sf_complex_psi_e,float,float,result * result >> << psi_1_int int >> << psi_1 float >> << psi_n int float >> (* SYNCHROTRON functions *) << synchrotron_1 float >> << synchrotron_2 float >> (* TRANSPORT functions *) << transport_2 float >> << transport_3 float >> << transport_4 float >> << transport_5 float >> (* TRIGONOMETRIC functions *) << sin float >> << cos float >> << hypot float >> << sinc float >> <:ext< complex_sin_e@ml_gsl_sf_complex_sin_e,float,float,result * result >> <:ext< complex_cos_e@ml_gsl_sf_complex_cos_e,float,float,result * result >> <:ext< complex_logsin_e@ml_gsl_sf_complex_logsin_e,float,float,result * result >> << lnsinh float >> << lncosh float >> <:ext< rect_of_polar@ml_gsl_sf_polar_to_rect,r:float,theta:float,result * result >> <:ext< polar_of_rect@ml_gsl_sf_rect_to_polar,x:float,y:float,result * result >> <:ext< angle_restrict_symm@ml_gsl_sf_angle_restrict_symm,float,float >> <:ext< angle_restrict_pos@ml_gsl_sf_angle_restrict_pos,float,float >> <:ext< sin_err_e@ml_gsl_sf_sin_err_e,float,dx:float,result >> <:ext< cos_err_e@ml_gsl_sf_cos_err_e,float,dx:float,result >> (* ZETA functions *) << zeta_int int >> << zeta float >> << hzeta float float >> << eta_int int >> << eta float >> ocamlgsl-0.6.0/mlgsl_vector.c0000664000076400007640000000537410600031632014700 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #include #ifndef FUNCTION #error pb with include files #endif CAMLprim value FUNCTION(ml_gsl_vector,memcpy)(value a, value b) { _DECLARE_VECTOR2(a,b); _CONVERT_VECTOR2(a,b); FUNCTION(gsl_vector,memcpy)(&v_b, &v_a); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,add)(value a, value b) { _DECLARE_VECTOR2(a,b); _CONVERT_VECTOR2(a,b); FUNCTION(gsl_vector,add)(&v_a, &v_b); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,sub)(value a, value b) { _DECLARE_VECTOR2(a,b); _CONVERT_VECTOR2(a,b); FUNCTION(gsl_vector,sub)(&v_a, &v_b); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,mul)(value a, value b) { _DECLARE_VECTOR2(a,b); _CONVERT_VECTOR2(a,b); FUNCTION(gsl_vector,mul)(&v_a, &v_b); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,div)(value a, value b) { _DECLARE_VECTOR2(a,b); _CONVERT_VECTOR2(a,b); FUNCTION(gsl_vector,div)(&v_a, &v_b); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,scale)(value a, value x) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); FUNCTION(gsl_vector,scale)(&v_a, Double_val(x)); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,add_constant)(value a, value x) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); FUNCTION(gsl_vector,add_constant)(&v_a, Double_val(x)); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_vector,isnull)(value a) { int r; _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); r = FUNCTION(gsl_vector,isnull)(&v_a); return Val_bool(r); } CAMLprim value FUNCTION(ml_gsl_vector,max)(value a) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); return copy_double(FUNCTION(gsl_vector,max)(&v_a)); } CAMLprim value FUNCTION(ml_gsl_vector,min)(value a) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); return copy_double(FUNCTION(gsl_vector,min)(&v_a)); } CAMLprim value FUNCTION(ml_gsl_vector,minmax)(value a) { BASE_TYPE x,y; _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); FUNCTION(gsl_vector,minmax)(&v_a, &x, &y); return copy_two_double(x, y); } CAMLprim value FUNCTION(ml_gsl_vector,maxindex)(value a) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); return Val_int(FUNCTION(gsl_vector,max_index)(&v_a)); } CAMLprim value FUNCTION(ml_gsl_vector,minindex)(value a) { _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); return Val_int(FUNCTION(gsl_vector,min_index)(&v_a)); } CAMLprim value FUNCTION(ml_gsl_vector,minmaxindex)(value a) { size_t x,y; value v; _DECLARE_VECTOR(a); _CONVERT_VECTOR(a); FUNCTION(gsl_vector,minmax_index)(&v_a, &x, &y); v=alloc_small(2, 0); Field(v, 0) = Val_int(x); Field(v, 1) = Val_int(y); return v; } ocamlgsl-0.6.0/mlgsl_matrix.c0000664000076400007640000000572210600031632014677 0ustar olivoliv/* ocamlgsl - OCaml interface to GSL */ /* Copyright (©) 2002-2005 - Olivier Andrieu */ /* distributed under the terms of the GPL version 2 */ #ifndef FUNCTION #error pb with include files #endif CAMLprim value FUNCTION(ml_gsl_matrix,memcpy)(value A, value B) { _DECLARE_MATRIX2(A,B); _CONVERT_MATRIX2(A,B); FUNCTION(gsl_matrix,memcpy)(&m_B, &m_A); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,add)(value A, value B) { _DECLARE_MATRIX2(A,B); _CONVERT_MATRIX2(A,B); FUNCTION(gsl_matrix,add)(&m_A, &m_B); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,sub)(value A, value B) { _DECLARE_MATRIX2(A,B); _CONVERT_MATRIX2(A,B); FUNCTION(gsl_matrix,sub)(&m_A, &m_B); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,mul)(value A, value B) { _DECLARE_MATRIX2(A,B); _CONVERT_MATRIX2(A,B); FUNCTION(gsl_matrix,mul_elements)(&m_A, &m_B); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,div)(value A, value B) { _DECLARE_MATRIX2(A,B); _CONVERT_MATRIX2(A,B); FUNCTION(gsl_matrix,div_elements)(&m_A, &m_B); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,scale)(value A, value X) { _DECLARE_MATRIX(A); _DECLARE_BASE_TYPE(X); _CONVERT_MATRIX(A); _CONVERT_BASE_TYPE(X); FUNCTION(gsl_matrix,scale)(&m_A, conv_X); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,add_constant)(value A, value X) { _DECLARE_MATRIX(A); _DECLARE_BASE_TYPE(X); _CONVERT_MATRIX(A); _CONVERT_BASE_TYPE(X); FUNCTION(gsl_matrix,add_constant)(&m_A, conv_X); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,add_diagonal)(value A, value X) { _DECLARE_MATRIX(A); _DECLARE_BASE_TYPE(X); _CONVERT_MATRIX(A); _CONVERT_BASE_TYPE(X); FUNCTION(gsl_matrix,add_diagonal)(&m_A, conv_X); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,isnull)(value A) { int r; _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); r = FUNCTION(gsl_matrix,isnull)(&m_A); return Val_bool(r); } CAMLprim value FUNCTION(ml_gsl_matrix,swap_rows)(value A, value i, value j) { _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); FUNCTION(gsl_matrix,swap_rows)(&m_A, Int_val(i), Int_val(j)); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,swap_columns)(value A, value i, value j) { _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); FUNCTION(gsl_matrix,swap_columns)(&m_A, Int_val(i), Int_val(j)); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,swap_rowcol)(value A, value i, value j) { _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); FUNCTION(gsl_matrix,swap_rowcol)(&m_A, Int_val(i), Int_val(j)); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,transpose_memcpy)(value A, value B) { _DECLARE_MATRIX2(A, B); _CONVERT_MATRIX2(A, B); FUNCTION(gsl_matrix,transpose_memcpy)(&m_A, &m_B); return Val_unit; } CAMLprim value FUNCTION(ml_gsl_matrix,transpose)(value A) { _DECLARE_MATRIX(A); _CONVERT_MATRIX(A); FUNCTION(gsl_matrix,transpose)(&m_A); return Val_unit; } ocamlgsl-0.6.0/.depend0000664000076400007640000001756210607755017013317 0ustar olivolivgsl_error.cmo: gsl_error.cmi gsl_error.cmx: gsl_error.cmi gsl_ieee.cmo: gsl_ieee.cmi gsl_ieee.cmx: gsl_ieee.cmi gsl_math.cmo: gsl_math.cmi gsl_math.cmx: gsl_math.cmi gsl_complex.cmo: gsl_complex.cmi gsl_complex.cmx: gsl_complex.cmi gsl_vector.cmo: gsl_vector.cmi gsl_vector.cmx: gsl_vector.cmi gsl_vector_flat.cmo: gsl_vector_flat.cmi gsl_vector_flat.cmx: gsl_vector_flat.cmi gsl_vector_complex.cmo: gsl_complex.cmi gsl_vector_complex.cmi gsl_vector_complex.cmx: gsl_complex.cmx gsl_vector_complex.cmi gsl_vector_complex.cmi: gsl_complex.cmi gsl_vector_complex_flat.cmo: gsl_vector_flat.cmi gsl_complex.cmi \ gsl_vector_complex_flat.cmi gsl_vector_complex_flat.cmx: gsl_vector_flat.cmx gsl_complex.cmx \ gsl_vector_complex_flat.cmi gsl_vector_complex_flat.cmi: gsl_vector_flat.cmi gsl_complex.cmi gsl_matrix.cmo: gsl_matrix.cmi gsl_matrix.cmx: gsl_matrix.cmi gsl_matrix.cmi: gsl_vector.cmi gsl_matrix_flat.cmo: gsl_vector_flat.cmi gsl_matrix_flat.cmi gsl_matrix_flat.cmx: gsl_vector_flat.cmx gsl_matrix_flat.cmi gsl_matrix_flat.cmi: gsl_vector_flat.cmi gsl_matrix_complex.cmo: gsl_complex.cmi gsl_matrix_complex.cmi gsl_matrix_complex.cmx: gsl_complex.cmx gsl_matrix_complex.cmi gsl_matrix_complex.cmi: gsl_vector_complex.cmi gsl_complex.cmi gsl_matrix_complex_flat.cmo: gsl_vector_complex_flat.cmi gsl_complex.cmi \ gsl_matrix_complex_flat.cmi gsl_matrix_complex_flat.cmx: gsl_vector_complex_flat.cmx gsl_complex.cmx \ gsl_matrix_complex_flat.cmi gsl_matrix_complex_flat.cmi: gsl_vector_complex_flat.cmi gsl_complex.cmi gsl_vectmat.cmo: gsl_vector_flat.cmi gsl_vector_complex_flat.cmi \ gsl_vector_complex.cmi gsl_vector.cmi gsl_matrix_flat.cmi \ gsl_matrix_complex_flat.cmi gsl_matrix_complex.cmi gsl_matrix.cmi \ gsl_vectmat.cmi gsl_vectmat.cmx: gsl_vector_flat.cmx gsl_vector_complex_flat.cmx \ gsl_vector_complex.cmx gsl_vector.cmx gsl_matrix_flat.cmx \ gsl_matrix_complex_flat.cmx gsl_matrix_complex.cmx gsl_matrix.cmx \ gsl_vectmat.cmi gsl_vectmat.cmi: gsl_vector_flat.cmi gsl_vector_complex_flat.cmi \ gsl_vector_complex.cmi gsl_vector.cmi gsl_matrix_flat.cmi \ gsl_matrix_complex_flat.cmi gsl_matrix_complex.cmi gsl_matrix.cmi \ gsl_complex.cmi gsl_blas.cmo: gsl_vector_complex.cmi gsl_vector.cmi gsl_matrix_complex.cmi \ gsl_matrix.cmi gsl_complex.cmi gsl_blas.cmi gsl_blas.cmx: gsl_vector_complex.cmx gsl_vector.cmx gsl_matrix_complex.cmx \ gsl_matrix.cmx gsl_complex.cmx gsl_blas.cmi gsl_blas_flat.cmo: gsl_vector_flat.cmi gsl_vector_complex_flat.cmi \ gsl_matrix_flat.cmi gsl_matrix_complex_flat.cmi gsl_complex.cmi \ gsl_blas.cmi gsl_blas_flat.cmi gsl_blas_flat.cmx: gsl_vector_flat.cmx gsl_vector_complex_flat.cmx \ gsl_matrix_flat.cmx gsl_matrix_complex_flat.cmx gsl_complex.cmx \ gsl_blas.cmx gsl_blas_flat.cmi gsl_blas_gen.cmo: gsl_vectmat.cmi gsl_complex.cmi gsl_blas.cmi \ gsl_blas_gen.cmi gsl_blas_gen.cmx: gsl_vectmat.cmx gsl_complex.cmx gsl_blas.cmx \ gsl_blas_gen.cmi gsl_blas.cmi: gsl_vector_complex.cmi gsl_vector.cmi gsl_matrix_complex.cmi \ gsl_matrix.cmi gsl_complex.cmi gsl_blas_flat.cmi: gsl_vector_flat.cmi gsl_vector_complex_flat.cmi \ gsl_matrix_flat.cmi gsl_matrix_complex_flat.cmi gsl_complex.cmi \ gsl_blas.cmi gsl_blas_gen.cmi: gsl_vectmat.cmi gsl_complex.cmi gsl_blas.cmi gsl_fun.cmo: gsl_vector.cmi gsl_matrix.cmi gsl_fun.cmi gsl_fun.cmx: gsl_vector.cmx gsl_matrix.cmx gsl_fun.cmi gsl_fun.cmi: gsl_vector.cmi gsl_matrix.cmi gsl_permut.cmo: gsl_error.cmi gsl_complex.cmi gsl_permut.cmi gsl_permut.cmx: gsl_error.cmx gsl_complex.cmx gsl_permut.cmi gsl_sort.cmo: gsl_vector_flat.cmi gsl_vector.cmi gsl_permut.cmi gsl_sort.cmi gsl_sort.cmx: gsl_vector_flat.cmx gsl_vector.cmx gsl_permut.cmx gsl_sort.cmi gsl_sort.cmi: gsl_vector_flat.cmi gsl_vector.cmi gsl_permut.cmi gsl_linalg.cmo: gsl_vector_flat.cmi gsl_vectmat.cmi gsl_permut.cmi \ gsl_matrix.cmi gsl_fun.cmi gsl_complex.cmi gsl_linalg.cmi gsl_linalg.cmx: gsl_vector_flat.cmx gsl_vectmat.cmx gsl_permut.cmx \ gsl_matrix.cmx gsl_fun.cmx gsl_complex.cmx gsl_linalg.cmi gsl_linalg.cmi: gsl_vector_flat.cmi gsl_vector.cmi gsl_vectmat.cmi \ gsl_permut.cmi gsl_matrix_flat.cmi gsl_matrix.cmi gsl_fun.cmi \ gsl_complex.cmi gsl_eigen.cmo: gsl_vector_complex.cmi gsl_vector.cmi gsl_vectmat.cmi \ gsl_matrix_complex.cmi gsl_matrix.cmi gsl_eigen.cmi gsl_eigen.cmx: gsl_vector_complex.cmx gsl_vector.cmx gsl_vectmat.cmx \ gsl_matrix_complex.cmx gsl_matrix.cmx gsl_eigen.cmi gsl_eigen.cmi: gsl_vector_complex.cmi gsl_vector.cmi gsl_vectmat.cmi \ gsl_matrix_flat.cmi gsl_matrix_complex_flat.cmi gsl_matrix_complex.cmi \ gsl_matrix.cmi gsl_complex.cmi gsl_poly.cmo: gsl_complex.cmi gsl_poly.cmi gsl_poly.cmx: gsl_complex.cmx gsl_poly.cmi gsl_poly.cmi: gsl_complex.cmi gsl_interp.cmo: gsl_interp.cmi gsl_interp.cmx: gsl_interp.cmi gsl_rng.cmo: gsl_rng.cmi gsl_rng.cmx: gsl_rng.cmi gsl_qrng.cmo: gsl_qrng.cmi gsl_qrng.cmx: gsl_qrng.cmi gsl_randist.cmo: gsl_rng.cmi gsl_randist.cmi gsl_randist.cmx: gsl_rng.cmx gsl_randist.cmi gsl_randist.cmi: gsl_rng.cmi gsl_integration.cmo: gsl_fun.cmi gsl_integration.cmi gsl_integration.cmx: gsl_fun.cmx gsl_integration.cmi gsl_integration.cmi: gsl_fun.cmi gsl_fit.cmo: gsl_fun.cmi gsl_fit.cmi gsl_fit.cmx: gsl_fun.cmx gsl_fit.cmi gsl_fit.cmi: gsl_fun.cmi gsl_multifit.cmo: gsl_vector.cmi gsl_vectmat.cmi gsl_misc.cmo gsl_matrix.cmi \ gsl_math.cmi gsl_fun.cmi gsl_multifit.cmi gsl_multifit.cmx: gsl_vector.cmx gsl_vectmat.cmx gsl_misc.cmx gsl_matrix.cmx \ gsl_math.cmx gsl_fun.cmx gsl_multifit.cmi gsl_multifit.cmi: gsl_vector.cmi gsl_vectmat.cmi gsl_matrix.cmi gsl_fun.cmi gsl_multifit_nlin.cmo: gsl_vector.cmi gsl_matrix.cmi gsl_fun.cmi \ gsl_multifit_nlin.cmi gsl_multifit_nlin.cmx: gsl_vector.cmx gsl_matrix.cmx gsl_fun.cmx \ gsl_multifit_nlin.cmi gsl_multifit_nlin.cmi: gsl_vector.cmi gsl_matrix.cmi gsl_fun.cmi gsl_root.cmo: gsl_fun.cmi gsl_root.cmi gsl_root.cmx: gsl_fun.cmx gsl_root.cmi gsl_root.cmi: gsl_fun.cmi gsl_multiroot.cmo: gsl_vector.cmi gsl_matrix.cmi gsl_fun.cmi \ gsl_multiroot.cmi gsl_multiroot.cmx: gsl_vector.cmx gsl_matrix.cmx gsl_fun.cmx \ gsl_multiroot.cmi gsl_multiroot.cmi: gsl_vector.cmi gsl_matrix.cmi gsl_fun.cmi gsl_min.cmo: gsl_fun.cmi gsl_min.cmi gsl_min.cmx: gsl_fun.cmx gsl_min.cmi gsl_min.cmi: gsl_fun.cmi gsl_multimin.cmo: gsl_vector.cmi gsl_fun.cmi gsl_multimin.cmi gsl_multimin.cmx: gsl_vector.cmx gsl_fun.cmx gsl_multimin.cmi gsl_multimin.cmi: gsl_vector.cmi gsl_fun.cmi gsl_diff.cmo: gsl_fun.cmi gsl_diff.cmi gsl_diff.cmx: gsl_fun.cmx gsl_diff.cmi gsl_diff.cmi: gsl_fun.cmi gsl_cheb.cmo: gsl_fun.cmi gsl_cheb.cmi gsl_cheb.cmx: gsl_fun.cmx gsl_cheb.cmi gsl_cheb.cmi: gsl_fun.cmi gsl_sum.cmo: gsl_fun.cmi gsl_sum.cmi gsl_sum.cmx: gsl_fun.cmx gsl_sum.cmi gsl_sum.cmi: gsl_fun.cmi gsl_fft.cmo: gsl_complex.cmi gsl_fft.cmi gsl_fft.cmx: gsl_complex.cmx gsl_fft.cmi gsl_fft.cmi: gsl_complex.cmi gsl_monte.cmo: gsl_rng.cmi gsl_fun.cmi gsl_monte.cmi gsl_monte.cmx: gsl_rng.cmx gsl_fun.cmx gsl_monte.cmi gsl_monte.cmi: gsl_rng.cmi gsl_fun.cmi gsl_siman.cmo: gsl_rng.cmi gsl_misc.cmo gsl_siman.cmi gsl_siman.cmx: gsl_rng.cmx gsl_misc.cmx gsl_siman.cmi gsl_siman.cmi: gsl_rng.cmi gsl_odeiv.cmo: gsl_matrix.cmi gsl_odeiv.cmi gsl_odeiv.cmx: gsl_matrix.cmx gsl_odeiv.cmi gsl_odeiv.cmi: gsl_matrix.cmi gsl_histo.cmo: gsl_histo.cmi gsl_histo.cmx: gsl_histo.cmi gsl_stats.cmo: gsl_stats.cmi gsl_stats.cmx: gsl_stats.cmi gsl_wavelet.cmo: gsl_vector_flat.cmi gsl_vector.cmi gsl_vectmat.cmi \ gsl_matrix_flat.cmi gsl_matrix.cmi gsl_wavelet.cmi gsl_wavelet.cmx: gsl_vector_flat.cmx gsl_vector.cmx gsl_vectmat.cmx \ gsl_matrix_flat.cmx gsl_matrix.cmx gsl_wavelet.cmi gsl_wavelet.cmi: gsl_vector_flat.cmi gsl_vector.cmi gsl_vectmat.cmi \ gsl_matrix_flat.cmi gsl_matrix.cmi gsl_bspline.cmo: gsl_vector.cmi gsl_vectmat.cmi gsl_bspline.cmi gsl_bspline.cmx: gsl_vector.cmx gsl_vectmat.cmx gsl_bspline.cmi gsl_bspline.cmi: gsl_vectmat.cmi ocamlgsl-0.6.0/.depend_c0000664000076400007640000000721410607755017013612 0ustar olivolivmlgsl_error.o: mlgsl_error.c mlgsl_ieee.o: mlgsl_ieee.c wrappers.h mlgsl_math.o: mlgsl_math.c wrappers.h mlgsl_complex.o: mlgsl_complex.c mlgsl_complex.h wrappers.h mlgsl_vector_float.o: mlgsl_vector_float.c mlgsl_vector_float.h \ wrappers.h mlgsl_vector.h mlgsl_vector.c mlgsl_vector_double.o: mlgsl_vector_double.c mlgsl_vector_double.h \ mlgsl_vector.h wrappers.h mlgsl_vector.c mlgsl_matrix_float.o: mlgsl_matrix_float.c mlgsl_matrix_float.h \ wrappers.h mlgsl_matrix.h mlgsl_matrix.c mlgsl_matrix_double.o: mlgsl_matrix_double.c mlgsl_matrix_double.h \ mlgsl_matrix.h wrappers.h mlgsl_matrix.c mlgsl_matrix_complex.o: mlgsl_matrix_complex.c mlgsl_matrix_complex.h \ wrappers.h mlgsl_matrix.h mlgsl_matrix.c mlgsl_matrix_complex_float.o: mlgsl_matrix_complex_float.c \ mlgsl_matrix_complex_float.h wrappers.h mlgsl_matrix.h mlgsl_matrix.c mlgsl_blas.o: mlgsl_blas.c mlgsl_vector_double.h mlgsl_vector.h \ wrappers.h mlgsl_matrix_double.h mlgsl_matrix.h mlgsl_blas.h mlgsl_blas_float.o: mlgsl_blas_float.c mlgsl_vector_float.h wrappers.h \ mlgsl_vector.h mlgsl_matrix_float.h mlgsl_matrix.h mlgsl_blas.h mlgsl_blas_complex.o: mlgsl_blas_complex.c mlgsl_complex.h wrappers.h \ mlgsl_vector_complex.h mlgsl_vector.h mlgsl_matrix_complex.h \ mlgsl_matrix.h mlgsl_blas.h mlgsl_blas_complex_float.o: mlgsl_blas_complex_float.c mlgsl_complex.h \ wrappers.h mlgsl_vector_complex_float.h mlgsl_vector.h \ mlgsl_matrix_complex_float.h mlgsl_matrix.h mlgsl_blas.h mlgsl_fun.o: mlgsl_fun.c wrappers.h mlgsl_fun.h mlgsl_permut.o: mlgsl_permut.c wrappers.h mlgsl_permut.h mlgsl_sort.o: mlgsl_sort.c wrappers.h mlgsl_vector_double.h \ mlgsl_vector.h mlgsl_permut.h mlgsl_linalg.o: mlgsl_linalg.c mlgsl_matrix_double.h mlgsl_matrix.h \ wrappers.h mlgsl_vector_double.h mlgsl_vector.h mlgsl_permut.h mlgsl_linalg_complex.o: mlgsl_linalg_complex.c mlgsl_matrix_complex.h \ wrappers.h mlgsl_matrix.h mlgsl_vector_complex.h mlgsl_vector.h \ mlgsl_permut.h mlgsl_complex.h mlgsl_matrix_double.h \ mlgsl_vector_double.h mlgsl_eigen.o: mlgsl_eigen.c wrappers.h mlgsl_permut.h mlgsl_complex.h \ mlgsl_vector_complex.h mlgsl_vector.h mlgsl_matrix_complex.h \ mlgsl_matrix.h mlgsl_matrix_double.h mlgsl_vector_double.h mlgsl_poly.o: mlgsl_poly.c wrappers.h mlgsl_interp.o: mlgsl_interp.c wrappers.h mlgsl_rng.o: mlgsl_rng.c wrappers.h mlgsl_rng.h mlgsl_qrng.o: mlgsl_qrng.c wrappers.h mlgsl_randist.o: mlgsl_randist.c wrappers.h mlgsl_rng.h mlgsl_integration.o: mlgsl_integration.c mlgsl_fun.h wrappers.h mlgsl_fit.o: mlgsl_fit.c wrappers.h mlgsl_matrix_double.h mlgsl_matrix.h \ mlgsl_vector_double.h mlgsl_vector.h mlgsl_multifit.o: mlgsl_multifit.c wrappers.h mlgsl_fun.h \ mlgsl_vector_double.h mlgsl_vector.h mlgsl_matrix_double.h \ mlgsl_matrix.h mlgsl_roots.o: mlgsl_roots.c wrappers.h mlgsl_fun.h mlgsl_multiroots.o: mlgsl_multiroots.c wrappers.h mlgsl_fun.h \ mlgsl_vector_double.h mlgsl_vector.h mlgsl_matrix_double.h \ mlgsl_matrix.h mlgsl_min.o: mlgsl_min.c wrappers.h mlgsl_fun.h mlgsl_multimin.o: mlgsl_multimin.c wrappers.h mlgsl_fun.h \ mlgsl_vector_double.h mlgsl_vector.h mlgsl_matrix_double.h \ mlgsl_matrix.h mlgsl_diff.o: mlgsl_diff.c wrappers.h mlgsl_fun.h mlgsl_cheb.o: mlgsl_cheb.c wrappers.h mlgsl_fun.h mlgsl_sum.o: mlgsl_sum.c wrappers.h mlgsl_fft.o: mlgsl_fft.c wrappers.h mlgsl_monte.o: mlgsl_monte.c wrappers.h mlgsl_fun.h mlgsl_rng.h io.h mlgsl_odeiv.o: mlgsl_odeiv.c wrappers.h mlgsl_histo.o: mlgsl_histo.c wrappers.h mlgsl_stats.o: mlgsl_stats.c wrappers.h mlgsl_wavelet.o: mlgsl_wavelet.c mlgsl_matrix_double.h mlgsl_matrix.h \ wrappers.h mlgsl_bspline.o: mlgsl_bspline.c wrappers.h mlgsl_vector_double.h \ mlgsl_vector.h mlgsl_sf.o: mlgsl_sf.c wrappers.h ocamlgsl-0.6.0/gcc.mak0000664000076400007640000000212510600031632013251 0ustar olivoliv# -*- makefile -*- CC = gcc GSL_CONFIG := gsl-config GSLPREFIX := $(shell $(GSL_CONFIG) --prefix) GSLINCDIR := $(GSLPREFIX)/include GSLCFLAGS := $(filter-out -I/usr/include,$(shell $(GSL_CONFIG) --cflags)) GSLLIBS := $(filter -l%,$(shell $(GSL_CONFIG) --libs)) GSLLIBDIR := $(filter -L%,$(shell $(GSL_CONFIG) --libs)) CPPFLAGS += $(GSLCFLAGS) -DHAVE_INLINE -DHAVE_FENV CFLAGS = -g -O2 O=o A=a D=so SO=o DO=o EXE= DLLDEF= # For MSVC, a DLL .DEF file, we don't need it. ifdef DYNAMIC_LINKING MKDLL=$(OCAMLMKLIB) -oc $(1) $(2) $(GSLLIBS) $(GSLLIBDIR) MKLIB=$(OCAMLMKLIB) -oc $(1) $(2) $(GSLLIBS) $(GSLLIBDIR) MKCMA=$(OCAMLMKLIB) -oc $(1) -o $(2) $(3) $(GSLLIBS) $(GSLLIBDIR) MKCMXA=$(OCAMLMKLIB) -oc $(1) -o $(2) $(3) $(GSLLIBS) $(GSLLIBDIR) else MKDLL=$(error cannot make DLL) MKLIB=ar crus lib$(1).a $(2) MKCMA=$(OCAMLC) -a -o $(2).cma -custom $(3) -cclib -l$(1) $(addprefix -cclib ,$(GSLLIBS)) $(if $(GSLLIBDIR),-ccopt '$(GSLLIBDIR)') MKCMXA=$(OCAMLOPT) -a -o $(2).cmxa $(3) -cclib -l$(1) $(addprefix -cclib ,$(GSLLIBS)) $(if $(GSLLIBDIR),-ccopt '$(GSLLIBDIR)') endif SCFLAGS= DCFLAGS= ocamlgsl-0.6.0/msvc.mak0000664000076400007640000000210410607755006013501 0ustar olivoliv# -*- makefile -*- GSLPREFIX := "../gsl" GSLINCDIR := $(GSLPREFIX) GSLCFLAGS := /I$(GSLINCDIR) GSLLIBS := gsl.lib gslcblas.lib GSLLIBDIR := $(GSLPREFIX)/GSLDLL/Release CPPFLAGS = $(GSLCFLAGS) /I$(OCAMLDIR) /Dinline=__inline /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "GSL_DLL" CFLAGS = /W3 O=obj A=lib D=dll SO=s.obj DO=d.obj EXE=.exe DEF=dllmlgsl.def # if Visual Studio 2005 # USE_MSVC_2005=yes ifdef USE_MSVC_2005 MKDLL=link /nologo /dll /libpath:$(GSLLIBDIR) $(GSLLIBS) \ /libpath:$(OCAMLDIR) ocamlrun.lib libbigarray.lib \ /out:dll$(1).$(D) /implib:dll$(1).$(A) /def:$(3) $(2) \ && MT /manifest $(1).manifest /outputresource:$(1);\#2 else MKDLL=link /nologo /dll /libpath:$(GSLLIBDIR) $(GSLLIBS) \ /libpath:$(OCAMLDIR) ocamlrun.lib dllbigarray.lib \ /out:dll$(1).$(D) /implib:dll$(1).$(A) /def:$(3) $(2) endif MKLIB=lib /nologo /debugtype:CV /out:lib$(1).$(A) $(2) MKCMA=$(OCAMLC) -a -o $(2).cma -cclib -l$(1) -dllib -l$(1) $(3) MKCMXA=$(OCAMLOPT) -a -o $(2).cmxa -cclib -l$(1) $(3) SCFLAGS=/Fo$(1) /MT DCFLAGS=/Fo$(1) /MD /D "CAML_DLL" ocamlgsl-0.6.0/Makefile0000664000076400007640000002046610607755401013511 0ustar olivoliv# If you're compiling with cygwin, comment this out DYNAMIC_LINKING = true OCAMLC := ocamlc OCAMLOPT := ocamlopt CAMLP4O := camlp4o OCAMLDOC := ocamldoc OCAMLMKLIB := ocamlmklib OCAMLFIND := ocamlfind OCAML := ocaml OCAMLDIR := "$(shell $(OCAMLC) -where)" OCAMLDEP := ocamldep OCPP := ocpp FORT := fort AWK := gawk MNOCYGWIN ?= $(shell $(OCAMLC) -verbose foo.c 2>&1 | $(AWK) "NR==1 { print \$$3 }") ifeq ($(MNOCYGWIN),-mnocygwin) OCAML_BACKEND := mingw endif OCAML_BACKEND ?= $(shell $(OCAMLC) -verbose foo.c 2>&1 | $(AWK) "NR==1 { print \$$2 }") OCAML_VERSION ?= $(shell $(OCAMLC) -version) OCAMLBCFLAGS := -g OCAMLNCFLAGS := INSTALLDIR := $(OCAMLDIR)/gsl DESTDIR = AUTO_SRC := gsl_const.ml gsl_const.mli \ gsl_sf.ml gsl_sf.mli \ gsl_cdf.ml gsl_cdf.mli mlgsl_cdf.c SRC := wrappers.h gsl_misc.ml io.h \ gsl_error.ml gsl_error.mli mlgsl_error.c \ gsl_ieee.ml gsl_ieee.mli mlgsl_ieee.c \ gsl_math.ml gsl_math.mli mlgsl_math.c \ gsl_complex.ml gsl_complex.mli mlgsl_complex.c mlgsl_complex.h \ gsl_vector.ml gsl_vector.mli gsl_vector_flat.ml gsl_vector_flat.mli \ gsl_vector_complex.ml gsl_vector_complex.mli \ gsl_vector_complex_flat.ml gsl_vector_complex_flat.mli \ mlgsl_vector.h \ mlgsl_vector_float.c mlgsl_vector_float.h \ mlgsl_vector_double.c mlgsl_vector_double.h \ mlgsl_vector_complex.h mlgsl_vector_complex_float.h \ gsl_matrix.ml gsl_matrix.mli gsl_matrix_flat.ml gsl_matrix_flat.mli \ gsl_matrix_complex.ml gsl_matrix_complex.mli \ gsl_matrix_complex_flat.ml gsl_matrix_complex_flat.mli \ mlgsl_matrix.h \ mlgsl_matrix_float.c mlgsl_matrix_float.h \ mlgsl_matrix_double.c mlgsl_matrix_double.h \ mlgsl_matrix_complex.c mlgsl_matrix_complex.h \ mlgsl_matrix_complex_float.c mlgsl_matrix_complex_float.h \ gsl_vectmat.ml gsl_vectmat.mli \ gsl_blas.ml gsl_blas_flat.ml gsl_blas_gen.ml \ gsl_blas.mli gsl_blas_flat.mli gsl_blas_gen.mli \ mlgsl_blas.h mlgsl_blas.c \ mlgsl_blas_float.c mlgsl_blas_complex.c mlgsl_blas_complex_float.c \ gsl_fun.ml gsl_fun.mli mlgsl_fun.c mlgsl_fun.h \ gsl_permut.ml gsl_permut.mli mlgsl_permut.c mlgsl_permut.h \ gsl_sort.ml gsl_sort.mli mlgsl_sort.c \ gsl_linalg.ml gsl_linalg.mli mlgsl_linalg.c mlgsl_linalg_complex.c \ gsl_eigen.ml gsl_eigen.mli mlgsl_eigen.c \ gsl_poly.ml gsl_poly.mli mlgsl_poly.c \ gsl_interp.ml gsl_interp.mli mlgsl_interp.c \ gsl_rng.ml gsl_rng.mli mlgsl_rng.c mlgsl_rng.h \ gsl_qrng.ml gsl_qrng.mli mlgsl_qrng.c \ gsl_randist.ml gsl_randist.mli mlgsl_randist.c \ gsl_integration.ml gsl_integration.mli mlgsl_integration.c \ gsl_fit.ml gsl_fit.mli mlgsl_fit.c \ gsl_multifit.ml gsl_multifit.mli \ gsl_multifit_nlin.ml gsl_multifit_nlin.mli mlgsl_multifit.c \ gsl_root.ml gsl_root.mli mlgsl_roots.c \ gsl_multiroot.ml gsl_multiroot.mli mlgsl_multiroots.c \ gsl_min.ml gsl_min.mli mlgsl_min.c \ gsl_multimin.ml gsl_multimin.mli mlgsl_multimin.c \ gsl_diff.ml gsl_diff.mli mlgsl_diff.c \ gsl_cheb.ml gsl_cheb.mli mlgsl_cheb.c \ gsl_sum.ml gsl_sum.mli mlgsl_sum.c \ gsl_fft.ml gsl_fft.mli mlgsl_fft.c \ gsl_monte.ml gsl_monte.mli mlgsl_monte.c \ gsl_siman.ml gsl_siman.mli \ gsl_odeiv.ml gsl_odeiv.mli mlgsl_odeiv.c \ gsl_histo.ml gsl_histo.mli mlgsl_histo.c \ gsl_stats.ml gsl_stats.mli mlgsl_stats.c \ gsl_wavelet.ml gsl_wavelet.mli mlgsl_wavelet.c \ gsl_bspline.ml gsl_bspline.mli mlgsl_bspline.c \ mlgsl_sf.c \ $(AUTO_SRC) ifeq ($(OCAML_BACKEND),cl) include msvc.mak else ifeq ($(OCAML_BACKEND),gcc) include gcc.mak else include mingw.mak endif endif CMI := $(patsubst %.mli,%.cmi,$(filter %.mli,$(SRC))) MLOBJ := $(patsubst %.ml,%.cmo,$(filter %.ml,$(SRC))) MLOPTOBJ := $(MLOBJ:%.cmo=%.cmx) COBJ := $(patsubst %.c,%.$(O),$(filter %.c,$(SRC))) SOBJ := $(patsubst %.c,%.$(SO),$(filter %.c,$(SRC))) DOBJ := $(patsubst %.c,%.$(DO),$(filter %.c,$(SRC))) TRASH = ocamlgsl$(EXE) $(DEF) $(AUTO_SRC) do_cdf do_sf DISTSRC := $(filter-out $(AUTO_SRC),$(SRC)) gsl_sf.mli.q \ mlgsl_vector.c mlgsl_matrix.c \ .depend .depend_c gcc.mak msvc.mak \ Makefile .ocamlinit do_const.awk do_cdf.ml do_sf.ml \ NOTES README NEWS COPYING META ocamlgsl.spec \ $(wildcard examples/*.ml) examples/Makefile doc \ $(wildcard test/*.ml) $(wildcard ocamlgsl.info*) VERSION := 0.6.0 all : stubs gsl.cma gsl.cmxa $(CMI) STUBS = libmlgsl.$(A) ifdef DYNAMIC_LINKING STUBS += dllmlgsl.$(D) endif stubs : $(STUBS) libmlgsl.$(A) : $(SOBJ) $(call MKLIB,mlgsl,$^) # The Windows DLL 'exports' file (exports all non-static objects called ml_gsl*, removing underscores). $(DEF) : $(DOBJ) nm -P $^ | $(AWK) "BEGIN { print \"EXPORTS\" } \ /_ml_gsl/{if (\$$2 == \"T\") print(substr(\$$1,2,length(\$$1)))}" > $@ dllmlgsl.$(D) : $(DEF) $(DOBJ) $(call MKDLL,mlgsl,$(DOBJ),$(DEF)) gsl.cma : $(MLOBJ) $(call MKCMA,mlgsl,gsl,$^) gsl.cmxa : $(MLOPTOBJ) $(call MKCMXA,mlgsl,gsl,$^) top : libmlgsl.$(A) gsl.cma ocamlmktop -I . -o ocamlgsl$(EXE) bigarray.cma gsl.cma install : all mkdir -p $(DESTDIR)$(INSTALLDIR) cp $(STUBS) gsl.cma gsl.cmxa gsl.$(A) \ $(CMI) $(MLOPTOBJ) $(DESTDIR)$(INSTALLDIR) mkdir -p $(DESTDIR)$(OCAMLDIR)/stublibs if test -w $(DESTDIR)$(OCAMLDIR)/stublibs ; then \ ln -sf $(INSTALLDIR)/dllmlgsl.$(D) $(DESTDIR)$(OCAMLDIR)/stublibs ; fi install-findlib : all export FINDLIBDIR=$$($(OCAMLFIND) printconf destdir) ; \ test -d "$${FINDLIBDIR}/stublibs" && mkdir -p $(DESTDIR)$${FINDLIBDIR}/stublibs ; \ OCAMLFIND_DESTDIR=$(DESTDIR)$${FINDLIBDIR} \ $(OCAMLFIND) install gsl META \ libmlgsl.$(A) dllmlgsl.$(D) gsl.cma gsl.cmxa gsl.$(A) $(CMI) $(MLOPTOBJ) ocamlgsl.odoc : $(MLOBJ) $(CMI) $(OCAMLDOC) -v -dump $@ $(filter-out gsl_misc.%, $(filter %.mli, $(SRC))) doc : doc/index.html doc/index.html: ocamlgsl.odoc mkdir -p doc $(OCAMLDOC) -v -html -t 'ocamlgsl $(VERSION)' -d doc -load $< info : ocamlgsl.info ocamlgsl.info : ocamlgsl.odoc $(OCAMLDOC) -v -texi -t 'ocamlgsl $(VERSION)' -o ocamlgsl.texi -load $< makeinfo ocamlgsl.texi test : gsl.cma dllmlgsl.$(D) $(FORT) -I . test/*.test.ml do_sf : do_sf.ml $(OCAMLC) -o $@ str.cma $^ gsl_sf.ml : gsl_sf.mli.q do_sf ./do_sf < $< > $@ gsl_sf.mli : gsl_sf.mli.q do_sf ./do_sf < $< > $@ gsl_sf.cmo gsl_sf.cmx : gsl_sf.cmi gsl_sf.cmi : gsl_fun.cmi gsl_const.ml : $(AWK) -f do_const.awk > $@ \ $(GSLINCDIR)/gsl/gsl_const_cgsm.h \ $(GSLINCDIR)/gsl/gsl_const_mksa.h \ $(GSLINCDIR)/gsl/gsl_const_num.h gsl_const.mli : $(AWK) -f do_const.awk --mli > $@ \ $(GSLINCDIR)/gsl/gsl_const_cgsm.h \ $(GSLINCDIR)/gsl/gsl_const_mksa.h \ $(GSLINCDIR)/gsl/gsl_const_num.h gsl_const.cmo gsl_const.cmx : gsl_const.cmi do_cdf : do_cdf.ml $(OCAMLC) -o $@ str.cma $^ gsl_cdf.ml : do_cdf $(GSLINCDIR)/gsl/gsl_cdf.h ./do_cdf < $(GSLINCDIR)/gsl/gsl_cdf.h > $@ gsl_cdf.mli : do_cdf $(GSLINCDIR)/gsl/gsl_cdf.h ./do_cdf < $(GSLINCDIR)/gsl/gsl_cdf.h > $@ mlgsl_cdf.c : do_cdf $(GSLINCDIR)/gsl/gsl_cdf.h ./do_cdf --c < $(GSLINCDIR)/gsl/gsl_cdf.h > $@ gsl_cdf.cmo gsl_cdf.cmx : gsl_cdf.cmi %.cmo : %.ml $(OCAMLC) $(OCAMLBCFLAGS) -c $< %.cmx : %.ml $(OCAMLOPT) $(OCAMLNCFLAGS) -c $< %.cmi : %.mli $(OCAMLC) $< %.$(O) : %.c $(OCAMLC) -ccopt '$(CPPFLAGS) $(CFLAGS)' -c $< %.$(SO) : %.c $(OCAMLC) -ccopt '$(CPPFLAGS) $(CFLAGS) $(call SCFLAGS,$@)' -c $< %.$(DO) : %.c $(OCAMLC) -ccopt '$(CPPFLAGS) $(CFLAGS) $(call DCFLAGS,$@)' -c $< .depend : $(filter-out $(AUTO_SRC) %.c,$(SRC)) @echo "making ocaml deps..." -@$(OCAMLDEP) $^ > $@ .depend_c : $(filter-out $(AUTO_SRC), $(filter %.c,$(SRC))) ifneq ($(OCAML_BACKEND),cl) @echo "making C deps..." -@$(CC) -isystem $(OCAMLDIR) -isystem $(GSLINCDIR) -MM $^ > $@ endif .PHONY : clean realclean top all dist install doc test stubs dist : doc info export DIRNAME=$${PWD##*/} && \ cd .. && mv $$DIRNAME ocamlgsl-$(VERSION) && \ tar zcvf ocamlgsl-$(VERSION).tar.gz $(addprefix ocamlgsl-$(VERSION)/,$(DISTSRC)) && mv ocamlgsl-$(VERSION) $$DIRNAME clean : rm -f *.cm* *.$(SO) *.$(DO) *.$(D) *.$(A) core* $(TRASH) realclean : rm -f .depend* ocamlgsl.info* ocamlgsl.texi ocamlgsl.odoc -include .depend -include .depend_c ocamlgsl-0.6.0/.ocamlinit0000664000076400007640000000017510600031632014006 0ustar olivoliv#load "bigarray.cma" ;; #load "gsl.cma" ;; Gsl_error.init () ;; Printf.printf "\t\t GSL version %s\n\n" Gsl_error.version;; ocamlgsl-0.6.0/do_const.awk0000664000076400007640000000045410600031632014342 0ustar olivoliv BEGIN { print "(** Values of physical constants *)\n" if (ARGV[1] == "--mli") { MLI=1 delete ARGV[1] } } /^#define GSL_CONST_/ { if (MLI) printf "val %s : float\n", tolower(substr($2,11)) else printf "let %s = %s\n", tolower(substr($2,11)), substr($3,2,length($3)-2) } ocamlgsl-0.6.0/do_cdf.ml0000664000076400007640000000447610600031632013606 0ustar olivolivtype arg_type = | FLOAT | UINT let parse = let regexp_full = Str.regexp "double gsl_cdf_\\([^ ]+\\) (\\([^)]+\\));" in let regexp_arg = Str.regexp "const \\(double\\|unsigned int\\) \\([a-zA-Z0-9_]+\\)" in fun s -> if Str.string_match regexp_full s 0 then let fun_name = Str.matched_group 1 s in let args = begin let acc = ref [] in let i = ref (Str.group_beginning 2) in begin try while true do let _ = Str.search_forward regexp_arg s !i in let ty = match Str.matched_group 1 s with | "double" -> FLOAT | "unsigned int" -> UINT | _ -> assert false in let n = Str.matched_group 2 s in acc := (ty, n) :: !acc ; i := Str.match_end () done with Not_found -> () end ; List.rev !acc end in if List.length args > 5 then (Printf.eprintf "functions `%s' has more than 5 arguments, this is unsupported\n%!" fun_name ; None) else Some (fun_name, args) else None let may f = function | None -> () | Some v -> f v let all_float args = List.for_all (function (FLOAT, _) -> true | _ -> false) args let print_all_float fun_name oc args = if all_float args then Printf.fprintf oc " \"gsl_cdf_%s\" \"float\"" fun_name let print_ml_args oc args = List.iter (fun (ty, a) -> let l = String.lowercase a in match ty with | FLOAT -> Printf.fprintf oc "%s:float -> " l | UINT -> Printf.fprintf oc "%s:int -> " l) args let print_ml (fun_name, args) = Printf.printf "external %s : %afloat = \"ml_gsl_cdf_%s\"%a\n" fun_name print_ml_args args fun_name (print_all_float fun_name) args let print_c_args oc args = List.iter (fun (ty, _) -> match ty with | FLOAT -> output_string oc " Double_val," | UINT -> output_string oc " Unsigned_int_val,") args let print_c (fun_name, args) = Printf.printf "ML%d(gsl_cdf_%s,%a copy_double)\n\n" (List.length args) fun_name print_c_args args let c_output = Array.length Sys.argv > 1 && Sys.argv.(1) = "--c" let _ = if c_output then Printf.printf "#include \n#include \"wrappers.h\"\n\n" else Printf.printf "(** Cumulative distribution functions *)\n\n" ; try while true do may (if c_output then print_c else print_ml) (parse (read_line ())) done with End_of_file -> () ocamlgsl-0.6.0/do_sf.ml0000664000076400007640000001202510600036567013463 0ustar olivoliv(* ocamlgsl - OCaml interface to GSL *) (* Copyright (©) 2002-2005 - Olivier Andrieu *) (* distributed under the terms of the GPL version 2 *) let split ?(collapse=false) c s = let len = String.length s in let rec proc accu n = let n' = try String.index_from s n c with Not_found -> len in let accu' = if collapse && n' = n then accu else (String.sub s n (n' - n)) :: accu in if n' = len then List.rev accu' else proc accu' (succ n') in proc [] 0 let words_list s = split ~collapse:true ' ' s (** Quotation for externals : << fun1,arg1,arg2 >> -> external fun1 : arg1 -> arg2 = "fun1" << fun1@fun_c,arg1,arg2 >> -> external fun1 : arg1 -> arg2 = "fun_c" << fun1@fun_c@fun_f,float,float >> -> external fun1 : float -> float = "fun_c" "fun_f" "float" *) let ext_quot = let b = Buffer.create 256 in fun str -> Buffer.clear b ; match split ',' str with | [] -> failwith "ext_quot: empty quotation" | _ :: [] -> failwith "ext_quot: no arguments" | name_r :: (arg1 :: argr as args) -> let (name, name_c, name_float) = match split '@' name_r with | name :: [] -> name, name, "" | name :: name_c :: [] -> name, name_c, "" | name :: name_c :: name_f :: _ -> name, name_c, name_f | [] -> failwith "ext_quot: too many C function names" in begin Printf.bprintf b "external %s : " name ; Printf.bprintf b "%s" arg1 ; List.iter (fun a -> Printf.bprintf b " -> %s" a) argr ; Printf.bprintf b "\n = " ; if List.length args > 6 then Printf.bprintf b "\"%s_bc\" " name_c ; if (List.for_all ((=) "float") args) && name_float <> "" then ( if List.length args <= 6 then Printf.bprintf b "\"%s\"" name_c ; Printf.bprintf b " \"%s\" \"float\"" name_float ) else Printf.bprintf b "\"%s\"" name_c ; Printf.bprintf b "\n\n" end ; Buffer.contents b let sf_quot = let b = Buffer.create 256 in fun str -> let wl = words_list str in match wl with | [] -> failwith "sf_quot: empty quotation" | _ :: [] -> failwith "sf_quot: no arguments" | name :: args -> let quot = Buffer.clear b ; Printf.bprintf b "%s@ml_gsl_sf_%s%s," name name (if List.for_all ((=) "float") args then "@" ^ "gsl_sf_" ^ name else "") ; List.iter (fun a -> Printf.bprintf b "%s," a) args ; Printf.bprintf b "float" ; Buffer.contents b in let quot_res = Buffer.clear b ; Printf.bprintf b "%s_e@ml_gsl_sf_%s_e," name name ; List.iter (fun a -> Printf.bprintf b "%s," a) args ; Printf.bprintf b "result" ; Buffer.contents b in String.concat "" (List.map ext_quot [ quot ; quot_res ]) let bessel_quot str = match words_list str with | "cyl" :: letter :: _ -> String.concat "" [ sf_quot ("bessel_" ^ letter ^ "0 float") ; sf_quot ("bessel_" ^ letter ^ "1 float") ; sf_quot ("bessel_" ^ letter ^ "n int float") ; ext_quot (Printf.sprintf "bessel_%sn_array@ml_gsl_sf_bessel_%sn_array,\ int,float,float array,unit" letter letter) ; ] | "cyl_scaled" :: letter :: _ -> String.concat "" [ sf_quot ("bessel_" ^ letter ^ "0_scaled float") ; sf_quot ("bessel_" ^ letter ^ "1_scaled float") ; sf_quot ("bessel_" ^ letter ^ "n int float") ; ext_quot (Printf.sprintf "bessel_%sn_scaled_array@ml_gsl_sf_bessel_%sn_scaled_array,\ int,float,float array,unit" letter letter) ; ] | "sph" :: letter :: _ -> String.concat "" [ sf_quot ("bessel_" ^ letter ^ "0 float") ; sf_quot ("bessel_" ^ letter ^ "1 float") ; sf_quot ("bessel_" ^ letter ^ "2 float") ; sf_quot ("bessel_" ^ letter ^ "l int float") ; ext_quot (Printf.sprintf "bessel_%sl_array@ml_gsl_sf_bessel_%sl_array,\ int,float,float array,unit" letter letter) ; ] | "sph_scaled" :: letter :: _ -> String.concat "" [ sf_quot ("bessel_" ^ letter ^ "0_scaled float") ; sf_quot ("bessel_" ^ letter ^ "1_scaled float") ; sf_quot ("bessel_" ^ letter ^ "l_scaled int float") ; ext_quot (Printf.sprintf "bessel_%sl_scaled_array@ml_gsl_sf_bessel_%sl_scaled_array,\ int,float,float array,unit" letter letter) ; ] | _ -> failwith "bessel_quot: wrong args for quotation" let process_line = let quotation = Str.regexp "<\\(:[a-z]*\\)?<\\(.*\\)>>$" in fun l -> if Str.string_match quotation l 0 then begin let quot = try Str.matched_group 1 l with Not_found -> ":sf" in let data = Str.matched_group 2 l in match quot with | ":ext" -> ext_quot data | ":sf" -> sf_quot data | ":bessel" -> bessel_quot data | _ -> "(* quotation parse error *)" end else l let iter_lines f ic = try while true do f (input_line ic) done with End_of_file -> () let _ = iter_lines (fun l -> let nl = process_line l in print_string nl ; print_char '\n') stdin ocamlgsl-0.6.0/NOTES0000664000076400007640000000156210600031632012642 0ustar olivoliv COMPLETE : --------- * Fast Fourier Transforms * Random Number Generation * Random Number Distributions * Polynomials * Interpolation * Mathematical Functions * Least-Squares Fitting * One dimensional Root-Finding * One dimensional Minimization * Numerical Differentiation * Monte Carlo Integration * IEEE floating-point arithmetic * Numerical Integration * Quasi-Random Sequences * Chebyshev Approximations * Multidimensional Root-Finding * Multidimensional Minimization * Series Acceleration * Nonlinear Least-Squares Fitting * Simulated Annealing * Ordinary Differential Equations * Linear Algebra * Eigensystems * BLAS Support * Vectors and Matrices * Physical Constants * Statistics * Complex Numbers * Wavelet Transforms PARTIAL : -------- * Special Functions * Permutations * Histograms * Sorting NOT YET : -------- * Combinations * N-tuples * Discrete Hankel Transforms ocamlgsl-0.6.0/README0000664000076400007640000000463010607755255012733 0ustar olivoliv This is an interface to GSL (GNU scientific library), for the Objective Caml langage. * REQUIREMENTS - gsl >= 1.9 - ocaml >= 3.07 - awk and GNU make - gcc or MSVC The platform must not need to align doubles on double-word addresses, i.e. ARCH_ALIGN_DOUBLE must be undefined in * BUILDING & INSTALLING - have a look at the variables in Makefile and gcc.mak/msvc.mak. comment out DYNAMIC_LINKING if it isn't supported on your platform. - make - (optional) make install INSTALLDIR=/absolute/path/to/installdir or : make install-findlib to link : ocamlopt -I gsldir bigarray.cmxa gsl.cmxa my_prog.ml or : ocamlc -I gsldir -dllpath gsldir bigarray.cma gsl.cma my_prog.ml * CHANGES cf. the NEWS file to see what's changed between ocamlgsl versions. WARNING : the code is not heavily tested ! * DOCUMENTATION Check the GSL manual ! You can browse the module interfaces with the ocamldoc-generated HTML files in the doc/ directory. * VECTOR / MATRICES There are several datatypes for handling vectors and matrices. - modules Gsl_vector, Gsl_vector.Single, Gsl_vector_complex, Gsl_vector_complex.Single and the corresponding matrix modules use bigarrays with single or double precisions real or complex values. - modules Gsl_vector_flat, Gsl_vector_complex_flat and the corresponding matrix modules use a record wrapping a regular caml float array. This is the equivalent of the gsl_vector and gsl_matrix structs in GSL. - module Gsl_vectmat defines a sum type with polymorphic variants that regroups these two representations. For instance : Gsl_vectmat.v_add (`V v1) (`VF v2) adds a vector in a caml array to a bigarray. - modules Gsl_blas Gsl_blas_flat and Gsl_blas_gen provide a (quite incomplete) interface to CBLAS for these types. * ERROR HANDLING Errors in GSL functions are reported as exceptions : Gsl_error.Gsl_exn (errno, msg) You have to call Gsl_error.init () so as to initialize error reporting; otherwise, the default GSL error handler is used and aborts the program, leaving a core dump (not so helpful with caml). If a callback (for minimizers, solvers, etc.) raises an exception, ocamlgsl either return GSL_FAILURE or NaN to GSL, depending on the type of callback. In either case the original caml exception is not propagated. The GSL function will either return normally (but probably with values containing NaNs somewhere) or raise a Gsl_exn exception. ocamlgsl-0.6.0/NEWS0000664000076400007640000000704610607755225012553 0ustar olivolivin 0.6.0 - sync with GSL 1.9 - Nonsymmetric eigensystems in Gsl_eigen - Basis splines - misc. other things, cf. GSL 1.9 NEWS file in 0.5.3 - compile with ocaml 3.10 - fix GC bugs with C functions taking a callbak parameter (min, multimin, multifit, etc.) in 0.5.2 - fix Gsl_sf.legendre_array_size in 0.5.1 - fix wrong declaration of externals in gsl_wavelet (Will M. Farr) - rewrite the blurb about callbacks raising exceptions (see below) - drop the mode argument Gsl_cheb.eval ("not for casual use") - fix GC bug in Gsl_cheb in 0.5.0 - sync with GSL 1.8 - fix Gsl_cdf - wrap new functions: gsl_multifit_linear_est, gsl_linalg_cholesky_decomp_unit, gsl_ran_gamma_mt, gsl_ran_gaussian_ziggurat, gsl_sf_debye_5, gsl_sf_debye_6 - sync with GSL 1.7 - add Gsl_randist.binomial_knuth, add Gsl_multifit._linear_svd in 0.4.1 - make several record types 'private'. This disallows building bogus values that could crash the program. - remove several unsafe manual memory-management functions from module signatures - added Associated Legendre Polynomials and Spherical Harmonics in Gsl_sf (Will M. Farr) - fixed the type Gsl_fft.Complex.direction (Joe Shirron) - fixed the type of Gsl_randist.negative_binomial and negative_binomial_pdf (Martin Willensdorfer) in 0.4.0 - sync with GSL 1.6 - new module Gsl_wavelet for DWT - new module Gsl_sort - in Gsl_linalg, support for LQ and P^T LQ decompositions - add a mode argument in Gsl_cheb.eval - add RK2SIMP in Gsl_odeiv.step_kind - a couple of other small additions - bugfix for functions in Gsl_sf returning a result_e10 - better support for Cygwin (James Scott, Lexifi) in 0.3.5 - improve build system a bit so that it works better on cygwin (thanks to Brian Wilfley) - fix bugs in Gsl_odeiv (thanks to Will M. Farr) in 0.3.4 - fix a GC bug in the error handler, simplify exception raising code - add Qrng.dimension and Qrng.sample in 0.3.3 - report an error when building on a platform with ARCH_ALIGN_DOUBLE defined - findlib support in 0.3.2 - complex functions (contributed by Paul Pelzl) in 0.3.1 : - bugfix in Gsl_interp.eval_array - mlgsl_ieee.c now compiles with gcc 2.9x - build system improvements in 0.3.0 : - sync with GSL 1.4 - new module Gsl_cdf for cumulative distributions - new function Gsl_randist.binomial_tpe - compiles with MSVC (contributed by Lexifi) - memory bugfix in adaptative integration routines - bugfix in Gsl_ieee.set_mode, added FPU status word querying - changed arguments order in Gsl_matrix.transpose : first arg is destination, second is source in 0.2.2 : - sync with GSL 1.3 - new multidimensional minimizer (Nelder Mead Simplex algorithm) - new random distributions : Dirichlet and multinomial - new function Gsl_math.fcmp for approximate floating point values comparisons - fixed some potential problems with the GC in 0.2.1 : - Gsl_linalg.matmult is now Gsl_linalg.matmult - Gsl_matrix.mul is now Gsl_matrix.mul_elements (same for Gsl_matrix.div) - vector/matrix macros work with gcc 2.9x (old_gcc target in Makefile) in 0.2 : - rewrote the vector/matrix modules to add single precision bigarrays and complex values - added complex functions in Gsl_linalg and Gsl_eigen - added Ordinary Differential Equations - added Simulated Annealing - added Statistics and Histograms in 0.1.1 : - fixed install target in Makefile - fixed several C stub function names - fixed a bug in ext_quot in quot.ml ocamlgsl-0.6.0/COPYING0000664000076400007640000004311110600031632013056 0ustar olivoliv GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ocamlgsl-0.6.0/META0000664000076400007640000000017410607755005012514 0ustar olivolivdescription = "GSL bindings" requires = "bigarray" version = "0.6.0" archive(byte) = "gsl.cma" archive(native) = "gsl.cmxa" ocamlgsl-0.6.0/ocamlgsl.spec0000664000076400007640000000251310607755460014524 0ustar olivolivSummary: OCaml interface for gsl Name: ocamlgsl Version: 0.6.0 Release: 1 URL: http://oandrieu.nerim.net/ocaml/#gsl Source: %name-%version.tar.gz License: GPL Group: Development/Libraries BuildRoot: %{_tmppath}/buildroot/%name-%version Requires: gsl >= 1.9 Buildrequires: gsl-devel >= 1.9 %description An Objective Caml / GSL interface. %define ocamldir %(ocamlc -where) %prep %setup -q %build make %install rm -rf %buildroot make DESTDIR=%buildroot INSTALLDIR=%ocamldir/gsl install mkdir -p %buildroot/%{_infodir} install -m 644 ocamlgsl.info* %buildroot/%{_infodir} %clean rm -rf %buildroot %post if test -x /sbin/install-info ; then /sbin/install-info %{_infodir}/ocamlgsl.info %{_infodir}/dir fi %preun if test -x /sbin/install-info ; then /sbin/install-info --delete ocamlgsl %{_infodir}/dir fi %files %defattr(-,root,root) %doc doc README NOTES COPYING %ocamldir/gsl %ocamldir/stublibs/* %{_infodir}/*.info* %changelog * Fri Apr 13 2007 Olivier Andrieu - 0.6.0-1 - Updated to 0.6.0 * Mon Oct 2 2006 Olivier Andrieu - 0.5.0-1 - Updated to 0.5.0 * Sun Oct 1 2006 Olivier Andrieu - 0.4.1-1 - Updated to 0.4.1 * Tue Oct 21 2003 Olivier Andrieu 0.3.0-1 - Updated to 0.3.0 * Wed Nov 20 2002 Olivier Andrieu 0.2-1 - Initial build. ocamlgsl-0.6.0/examples/blas.ml0000664000076400007640000000140110600031632015110 0ustar olivoliv let a = [| 0.11; 0.12; 0.13; 0.21; 0.22; 0.23; |] let b = [| 1011.; 1012.; 1021.; 1022.; 1031.; 1032.; |] let mA = Gsl_matrix.of_array a 2 3 let mB = Gsl_matrix.of_array b 3 2 let mC = Gsl_matrix.create ~init:0. 2 2 let mfA = Gsl_matrix_flat.of_array a 2 3 let mfB = Gsl_matrix_flat.of_array b 3 2 let mfC = Gsl_matrix_flat.create ~init:0. 2 2 open Gsl_blas let _ = Gsl_blas.gemm NoTrans NoTrans 1.0 mA mB 0. mC ; Printf.printf "[ %g, %g\n" mC.{0,0} mC.{0, 1} ; Printf.printf " %g, %g ]\n" mC.{1,0} mC.{1, 1} ; print_newline () ; Gsl_blas_flat.gemm NoTrans NoTrans 1.0 mfA mfB 0. mfC ; let mfC' = Gsl_matrix_flat.to_arrays mfC in Printf.printf "[ %g, %g\n" mfC'.(0).(0) mfC'.(0).(1) ; Printf.printf " %g, %g ]\n" mfC'.(1).(0) mfC'.(1).(1) ocamlgsl-0.6.0/examples/bspline.ml0000664000076400007640000000277610607755005015661 0ustar olivolivlet n = 200 let ncoeffs = 8 let nbreak = ncoeffs -2 open Printf let _ = let rng = Gsl_rng.make (Gsl_rng.default ()) in (* allocate a cubic bspline workspace (k = 4) *) let bw = Gsl_bspline.make ~k:4 ~nbreak in let x = Gsl_vector.create n and y = Gsl_vector.create n and w = Gsl_vector.create n and mX = Gsl_matrix.create n ncoeffs and vB = Gsl_vector.create ncoeffs in begin (* this is the data to be fitted *) printf "#m=0,S=0\n" ; let sigma = 0.1 in for i = 0 to n - 1 do let xi = 15. /. float (n-1) *. float i in let yi = cos xi *. exp (-0.1 *. xi) in let dy = Gsl_randist.gaussian rng ~sigma in x.{i} <- xi ; y.{i} <- yi +. dy ; w.{i} <- 1. /. (sigma *. sigma) ; printf "%f %f\n" xi yi done end ; (* use uniform breakpoints on [0, 15] *) Gsl_bspline.knots_uniform 0. 15. bw ; (* construct the fit matrix X *) for i = 0 to n -1 do (* compute B_j(xi) for all j *) Gsl_bspline._eval x.{i} (`V vB) bw ; (* fill in row i of X *) for j = 0 to ncoeffs - 1 do mX.{i,j} <- vB.{j} done done ; (* do the fit *) let c, cov, chisq = Gsl_multifit.linear ~weight:(`V w) (`M mX) (`V y) in (* output the smoothed curve *) begin printf "#m=1,S=0\n" ; let xi = ref 0. in while !xi < 15. do Gsl_bspline._eval !xi (`V vB) bw ; let yi = Gsl_multifit.linear_est ~x:(`V vB) ~c:(`V c) ~cov:(`M cov) in printf "%f %f\n" !xi yi.Gsl_fun.res ; xi := !xi +. 0.1 done end ocamlgsl-0.6.0/examples/cheb.ml0000664000076400007640000000104410600031632015073 0ustar olivolivlet f x = if x < 0.5 then 0.25 else 0.75 let test n = let cs = Gsl_cheb.make 40 in Gsl_cheb.init cs f 0. 1. ; begin let coefs = Gsl_cheb.coefs cs in Printf.printf "coefs = [" ; for i=0 to 40 do Printf.printf " %f;" coefs.(i) done ; Printf.printf " ]\n" end ; for i=0 to pred n do let x = float i /. float n in let r10 = Gsl_cheb.eval cs ~order:10 x in let r40 = Gsl_cheb.eval cs x in Printf.printf "%g %g %g %g\n" x (f x) r10 r40 done let _ = Gsl_error.init (); test 1000 ocamlgsl-0.6.0/examples/const.ml0000664000076400007640000000064210600031632015323 0ustar olivoliv let () = let au = Gsl_const.mksa_astronomical_unit in let c = Gsl_const.mksa_speed_of_light in let min = Gsl_const.mksa_minute in let r_earth = 1.00 *. au in let r_mars = 1.52 *. au in Printf.printf "light travel time from Earth to Mars:\n" ; Printf.printf "minimum = %.1f minutes\n" ((r_mars -. r_earth) /. c /. min) ; Printf.printf "maximum = %.1f minutes\n" ((r_mars +. r_earth) /. c /. min) ocamlgsl-0.6.0/examples/diff.ml0000664000076400007640000000122210600031632015100 0ustar olivolivopen Gsl_fun let f x = (* raise Exit ;*) x ** 1.5 let test () = let gslfun = f in Printf.printf "f(x) = x^(3/2)\n" ; flush stdout ; begin let { res=result; err=abserr } = Gsl_diff.central gslfun 2.0 in Printf.printf "x = 2.0\n" ; Printf.printf "f'(x) = %.10f +/- %.5f\n" result abserr ; Printf.printf "exact = %.10f\n\n" (1.5 *. sqrt 2.0) end ; flush stdout ; begin let { res=result; err=abserr } = Gsl_diff.forward gslfun 0.0 in Printf.printf "x = 0.0\n" ; Printf.printf "f'(x) = %.10f +/- %.5f\n" result abserr ; Printf.printf "exact = %.10f\n\n" 0.0 end let _ = Gsl_error.init (); test () ocamlgsl-0.6.0/examples/eigen.ml0000664000076400007640000000216310607755005015302 0ustar olivoliv let data n = let d = Gsl_matrix.create n n in for i=0 to pred n do for j=0 to pred n do d.{i, j} <- 1. /. (float (i+j+1)) done done ; d let _ = Printf.printf "Real Symmetric Matrices\n" ; let d = data 4 in let (eval, evec) as eigen = Gsl_eigen.symmv (`M d) in Gsl_eigen.symmv_sort eigen Gsl_eigen.ABS_ASC ; for i=0 to 3 do Printf.printf "eigenvalue = %g\n" eval.{i} ; Printf.printf "eigenvector = \n" ; for j=0 to 3 do Printf.printf "\t%g\n" evec.{j, i} done done ; print_newline () let _ = Printf.printf "Real Nonsymmetric Matrices\n" ; let data = [| -1. ; 1. ; -1. ; 1. ; -8. ; 4. ; -2. ; 1. ; 27. ; 9. ; 3. ; 1. ; 64. ; 16. ; 4. ; 1. |] in let (eval, evec) as eigen = Gsl_eigen.nonsymmv (`A (data, 4, 4)) in Gsl_eigen.nonsymmv_sort eigen Gsl_eigen.ABS_DESC ; for i=0 to 3 do let { Complex.re = re ; im = im} = eval.{i} in Printf.printf "eigenvalue = %g + %gi\n" re im ; Printf.printf "eigenvector = \n" ; for j=0 to 3 do let { Complex.re = re ; im = im} = evec.{j, i} in Printf.printf "\t%g + %gi\n" re im done done ocamlgsl-0.6.0/examples/fit.ml0000664000076400007640000000156510600031632014764 0ustar olivolivlet x = [| 1970.; 1980.; 1990.; 2000. |];; let y = [| 12.; 11.; 14.; 13. |];; let w = [| 0.1; 0.2; 0.3; 0.4 |];; open Gsl_fun open Gsl_fit let _ = let coefs = Gsl_fit.linear ~weight:w x y in Printf.printf "#best fit: Y = %g + %G X\n" coefs.c0 coefs.c1 ; Printf.printf "# covariance matrix:\n" ; Printf.printf "# [ %g, %g\n# %g, %g]\n" coefs.cov00 coefs.cov01 coefs.cov01 coefs.cov11 ; Printf.printf "# chisq = %g\n" coefs.sumsq ; for i=0 to 3 do Printf.printf "data: %g %g %g\n" x.(i) y.(i) (1. /. sqrt(w.(i))) done ; Printf.printf "\n" ; for i=(-30) to 129 do let xf = x.(0) +. (float i /. 100.) *. (x.(3) -. x.(0)) in let { res = yf; err = yf_err } = Gsl_fit.linear_est xf coefs in Printf.printf "fit: %g %g\n" xf yf ; Printf.printf "hi : %g %g\n" xf (yf +. yf_err) ; Printf.printf "lo : %g %g\n" xf (yf -. yf_err) ; done ocamlgsl-0.6.0/examples/histo.ml0000664000076400007640000000143310600031632015322 0ustar olivoliv let pprint_histo { Gsl_histo.n = n ; Gsl_histo.range = r ; Gsl_histo.bin = b } = for i=0 to pred n do Printf.printf "%g %g %g\n" r.(i) r.(succ i) b.(i) done let main xmin xmax n = let h = Gsl_histo.make n in Gsl_histo.set_ranges_uniform h ~xmin ~xmax ; begin try while true do Scanf.scanf "%g" (fun x -> Gsl_histo.accumulate h x) done with End_of_file -> () end ; pprint_histo h let _ = if Array.length Sys.argv <> 4 then ( Printf.printf "Usage: gsl-histogram xmin xmax n\n" ; Printf.printf "Computes a histogram of the data on \ stdin using n bins from xmin to xmax\n" ; exit 1 ) ; main (float_of_string Sys.argv.(1)) (float_of_string Sys.argv.(2)) (int_of_string Sys.argv.(3)) ocamlgsl-0.6.0/examples/integration.ml0000664000076400007640000000116110600031632016515 0ustar olivolivlet f alpha x = Gc.major (); (log (alpha *. x)) /. (sqrt x) let compute f expected = let ws = Gsl_integration.make_ws 1000 in let gslfun = f in let {Gsl_fun.res = res ; Gsl_fun.err = err } = Gsl_integration.qags gslfun ~a:0. ~b:1. ~epsabs:0. ~epsrel:1e-7 ws in Printf.printf "result = % .18f\n" res ; Printf.printf "exact result = % .18f\n" expected ; Printf.printf "estimated error = % .18f\n" err ; Printf.printf "actual error = % .18f\n" (res -. expected) ; Printf.printf "intervals = %d\n" (Gsl_integration.size ws) let _ = Gsl_error.init (); compute (f 1.0) (-4.) ocamlgsl-0.6.0/examples/interp.ml0000664000076400007640000000160510600031632015476 0ustar olivoliv let _ = Gsl_error.init ();; let check_return_status = function | Unix.WEXITED 0 -> true | _ -> false open Gsl_interp let print_data oc i = Printf.fprintf oc "#m=0,S=2\n" ; for j=0 to 9 do Printf.fprintf oc "%g %g\n" i.xa.(j) i.ya.(j) done let print_interp oc i = Printf.fprintf oc "#m=1,S=0\n" ; let xi = ref i.xa.(0) in let yi = ref 0. in while !xi < i.xa.(9) do yi := Gsl_interp.eval i !xi ; Printf.fprintf oc "%g %g\n" !xi !yi ; xi := !xi +. 0.1 done let x = Array.init 10 (fun i -> float i +. 0.5 *. sin (float i)) let y = Array.init 10 (fun i -> float i +. cos (float (i*i))) let _ = let i = Gsl_interp.make_interp Gsl_interp.CSPLINE x y in let oc = Unix.open_process_out "graph -T X" in print_data oc i ; print_interp oc i ; flush oc ; if not (check_return_status (Unix.close_process_out oc)) then prerr_endline "Oops !" ocamlgsl-0.6.0/examples/linalg.ml0000664000076400007640000000061010600031632015436 0ustar olivoliv let mA = [| 0.18; 0.60; 0.57; 0.96; 0.41; 0.24; 0.99; 0.58; 0.14; 0.30; 0.97; 0.66; 0.51; 0.13; 0.19; 0.85; |] let vB = [| 1.0; 2.0; 3.0; 4.0; |] let test () = let x = Gsl_linalg.solve_LU ~protect:true (`A (mA, 4, 4)) (`A vB) in Printf.printf "x = \n" ; Array.iter (fun v -> Printf.printf " %g\n" v) x let _ = Gsl_error.init () ; Gsl_error.handle_exn test () ocamlgsl-0.6.0/examples/min.ml0000664000076400007640000000176510600031632014767 0ustar olivoliv let f x = Gc.major (); cos x +. 1. let max_iter = 25 let find_min s m_expected = Printf.printf "using %s method\n" (Gsl_min.name s) ; Printf.printf "%5s [%9s, %9s] %9s %10s %9s\n" "iter" "lower" "upper" "min" "err" "err(est)" ; flush stdout; let rec proc i = function | true -> () | false when i > max_iter -> Printf.printf "Did not converge after %d iterations.\n" max_iter | _ -> let (a, b) = Gsl_min.interval s in let m = Gsl_min.minimum s in let status = Gsl_min.test_interval a b 1e-3 0. in if i=3 then Gc.full_major () ; if status then Printf.printf "Converged:\n" ; Printf.printf "%5d [%.7f, %.7f] %.7f %+.7f %.7f\n" i a b m (m -. m_expected) (b -. a) ; flush stdout; Gsl_min.iterate s ; proc (succ i) status in proc 0 false let _ = let gslfun = f in List.iter (fun k -> let s = Gsl_min.make k gslfun ~min:2. ~lo:0. ~up:6. in find_min s Gsl_math.pi ; print_newline ()) [ Gsl_min.GOLDENSECTION ; Gsl_min.BRENT ] ocamlgsl-0.6.0/examples/monte.ml0000664000076400007640000000422210600031632015315 0ustar olivolivopen Gsl_math let _ = Gsl_error.init () let exact = let e = Gsl_sf.gamma(0.25) ** 4. /. (4. *. pi ** 3.) in Printf.printf "computing exact: %.9f\n" e ; e let g = let a = 1. /. (pi *. pi *. pi) in fun x -> a /. (1. -. cos x.(0) *. cos x.(1) *. cos x.(2)) let display_results title { Gsl_fun.res=result; Gsl_fun.err=error } = Printf.printf "%s ==================\n" title ; Printf.printf "result = % .6f\n" result ; Printf.printf "sigma = % .6f\n" error ; Printf.printf "exact = % .6f\n" exact ; Printf.printf "error = % .6f = %.1g sigma\n" (result -. exact) ((abs_float (result -. exact)) /. error) let compute rng = let lo = [| 0.; 0.; 0.; |] in let up = [| pi; pi; pi |] in let gslfun = g in let calls = 500000 in begin let res = Gsl_monte.integrate Gsl_monte.PLAIN gslfun ~lo ~up calls rng in display_results "PLAIN" res ; print_newline () end ; begin let res = Gsl_monte.integrate Gsl_monte.MISER gslfun ~lo ~up calls rng in display_results "MISER" res ; print_newline () end ; begin let state = Gsl_monte.make_vegas_state 3 in let params = Gsl_monte.get_vegas_params state in let oc = open_out "truc" in Gsl_monte.set_vegas_params state { params with Gsl_monte.verbose = 0 ; Gsl_monte.ostream = Some oc } ; let res = Gsl_monte.integrate_vegas gslfun ~lo ~up 10000 rng state in display_results "VEGAS warm-up" res ; Printf.printf "converging...\n" ; flush stdout ; let rec proc () = let { Gsl_fun.res=result; Gsl_fun.err=err } as res = Gsl_monte.integrate_vegas gslfun ~lo ~up (calls / 5) rng state in let { Gsl_monte.chisq = chisq } = Gsl_monte.get_vegas_info state in Printf.printf "result = % .6f sigma = % .6f chisq/dof = %.1f\n" result err chisq ; flush stdout ; if (abs_float (chisq -. 1.)) > 0.5 then proc () else res in let res_final = proc () in display_results "VEGAS final" res_final ; close_out oc end let _ = Gsl_rng.env_setup (); let rng = Gsl_rng.make (Gsl_rng.default ()) in Printf.printf "using %s RNG\n" (Gsl_rng.name rng) ; print_newline () ; compute rng ocamlgsl-0.6.0/examples/multifit-data.ml0000664000076400007640000000051210600031632016735 0ustar olivolivlet _ = Gsl_error.init () ; Gsl_rng.env_setup () let rng = Gsl_rng.make (Gsl_rng.default ()) let _ = let x = ref 0.1 in while !x < 2. do let y0 = exp !x in let sigma = 0.1 *. y0 in let dy = Gsl_randist.gaussian rng ~sigma in Printf.printf "%.1f %g %g\n" !x (y0 +. dy) sigma ; x := !x +. 0.1 done ocamlgsl-0.6.0/examples/multifit.ml0000664000076400007640000000415210600031632016032 0ustar olivolivlet _ = Gsl_error.init () let read_lines () = let acc = ref [] in let cnt = ref 0 in begin try while true do acc := (read_line ()) :: !acc ; incr cnt ; done; with End_of_file -> () end ; Printf.printf "read %d points\n" !cnt ; List.rev !acc exception Wrong_format let parse_input = let lexer = Genlex.make_lexer [] in let parse_data = parser | [< 'Genlex.Float a; 'Genlex.Float b; 'Genlex.Float c >] -> (a, b, c) in fun line -> try parse_data (lexer (Stream.of_string line)) with Stream.Failure | Stream.Error _ -> raise Wrong_format let parse_data lines = let n = List.length lines in let x = Array.make n 0. in let y = Array.make n 0. in let w = Array.make n 0. in let _ = List.fold_left (fun i line -> let (xi, yi, ei) = parse_input line in Printf.printf "%3g %.5g +/- %g\n" xi yi ei ; x.(i) <- xi ; y.(i) <- yi ; w.(i) <- (1. /. (ei *. ei)) ; succ i) 0 lines in print_newline (); (x, y, w) let setup (x, y, w) = let n = Array.length x in let x' = Gsl_matrix.create n 3 in let y' = Gsl_vector.of_array y in let w' = Gsl_vector.of_array w in for i=0 to pred n do let xi = x.(i) in x'.{i, 0} <- 1.0 ; x'.{i, 1} <- xi ; x'.{i, 2} <- xi *. xi ; done ; (x', y', w') let fit (x, y, w) = let (c, cov, chisq) = Gsl_multifit.linear ~weight:(`V w) (`M x) (`V y) in Printf.printf "# best fit: Y = %g + %g X + %g X^2\n" c.{0} c.{1} c.{2} ; Printf.printf "# covariance matrix:\n" ; Printf.printf "[ %+.5e, %+.5e, %+.5e \n" cov.{0,0} cov.{0,1} cov.{0,2} ; Printf.printf " %+.5e, %+.5e, %+.5e \n" cov.{1,0} cov.{1,1} cov.{1,2} ; Printf.printf " %+.5e, %+.5e, %+.5e ]\n" cov.{2,0} cov.{2,1} cov.{2,2} ; Printf.printf "# chisq = %g\n" chisq let fit_alt (x, y, w) = let (c, cov, chisq) = Gsl_multifit.fit_poly ~weight:w ~x ~y 3 in assert(Array.length c = 4) ; Printf.printf "# best fit: Y = %g + %g X + %g X^2 + %g X^3\n" c.(0) c.(1) c.(2) c.(3) ; Printf.printf "# chisq = %g\n" chisq let _ = let data = parse_data (read_lines ()) in fit (setup data) ; print_newline () ; fit_alt data ; ocamlgsl-0.6.0/examples/multifit_nlin.ml0000664000076400007640000000560210606753064017073 0ustar olivolivopen Gsl_fun let expb y sigma = let expb_f ~x ~f = let n = Gsl_vector.length f in assert(Array.length y = n); assert(Array.length sigma = n); let a = x.{0} in let lambda = x.{1} in let b = x.{2} in for i=0 to pred n do (* model Yi = A * exp(-lambda * i) + b *) let yi = a *. exp (-. lambda *. (float i)) +. b in f.{i} <- (yi -. y.(i)) /. sigma.(i) done in let expb_df ~x ~j = let (n,p) = Gsl_matrix.dims j in assert(Gsl_vector.length x = p); assert(Array.length sigma = n); let a = x.{0} in let lambda = x.{1} in for i=0 to pred n do (* Jacobian matrix J(i,j) = dfi / dxj, *) (* where fi = (Yi - yi)/sigma[i], *) (* Yi = A * exp(-lambda * i) + b *) (* and the xj are the parameters (A,lambda,b) *) let e = exp (-. lambda *. float i) in let s = sigma.(i) in j.{i, 0} <- e /. s ; j.{i, 1} <- float (-i) *. a *. e /. s ; j.{i, 2} <- 1. /. s done in let expb_fdf ~x ~f ~j = expb_f x f ; expb_df x j in { multi_f = expb_f ; multi_df = expb_df ; multi_fdf = expb_fdf ; } let n = 40 let p = 3 let maxiter = 500 let epsabs = 1e-4 let epsrel = 1e-4 let data () = Gsl_rng.env_setup () ; let r = Gsl_rng.make (Gsl_rng.default ()) in let sigma = Array.make n 0.1 in let y = Array.init n (fun t -> let yt = 1. +. 5. *. exp (-0.1 *. float t) +. (Gsl_randist.gaussian r ~sigma:sigma.(t)) in Printf.printf "data: %d %g %g\n" t yt sigma.(t) ; yt) in (y, sigma) let print_state n p = let x = Gsl_vector.create p in let f = Gsl_vector.create n in fun iter s -> Gsl_multifit_nlin.get_state s ~x ~f () ; Printf.printf "iter: %3u x = %15.8f % 15.8f % 15.8f |f(x)| = %g\n" iter x.{0} x.{1} x.{2} (Gsl_blas.nrm2 f) let solv (y, sigma) xinit = let n = Array.length y in assert(Array.length sigma = n) ; let print_state = print_state n p in let s = Gsl_multifit_nlin.make Gsl_multifit_nlin.LMSDER ~n ~p (expb y sigma) (Gsl_vector.of_array xinit) in Printf.printf "\nsolver: %s\n" (Gsl_multifit_nlin.name s) ; print_state 0 s ; let rec proc iter = Gsl_multifit_nlin.iterate s ; print_state iter s ; let status = Gsl_multifit_nlin.test_delta s ~epsabs ~epsrel in match status with | true -> Printf.printf "\nstatus = converged\n" | false when iter >= maxiter -> Printf.printf "\nstatus = too many iterations\n" | false -> proc (succ iter) in proc 1 ; let pos = Gsl_vector.create 3 in Gsl_multifit_nlin.position s pos ; let covar = Gsl_matrix.create p p in Gsl_multifit_nlin.covar s 0. covar ; Printf.printf "A = %.5f +/- %.5f\n" pos.{0} (sqrt covar.{0, 0}) ; Printf.printf "lambda = %.5f +/- %.5f\n" pos.{1} (sqrt covar.{1, 1}) ; Printf.printf "b = %.5f +/- %.5f\n" pos.{2} (sqrt covar.{2, 2}) let _ = solv (data ()) [| 1.0; 0.; 0.; |] ocamlgsl-0.6.0/examples/multimin.ml0000664000076400007640000000542510606752664016064 0ustar olivolivopen Gsl_fun let _ = Gsl_error.init () let parab a b = let f ~x = let xa = x.{0} -. a in let yb = x.{1} -. b in 10. *. xa *. xa +. 20. *. yb *. yb +. 30. in let df ~x ~g = g.{0} <- 20. *. (x.{0} -. a) ; g.{1} <- 40. *. (x.{1} -. b) in let fdf ~x ~g = let xa = x.{0} -. a in let yb = x.{1} -. b in g.{0} <- 20. *. xa ; g.{1} <- 40. *. yb ; 10. *. xa *. xa +. 20. *. yb *. yb +. 30. in { multim_f = f; multim_df = df ; multim_fdf = fdf ; } let epsabs = 1e-3 let maxiter = 50 let print_state n = let x = Gsl_vector.create n in let g = Gsl_vector.create n in fun mini iter -> let f = Gsl_multimin.Deriv.minimum ~x ~g mini in Printf.printf "%5d x=%.5f y=%.5f f=%10.5f g0=%.5g g1=%.5g\n" iter x.{0} x.{1} f g.{0} g.{1} let mini kind gf start ~step ~tol= let minim = Gsl_multimin.Deriv.make kind 2 gf ~x:(Gsl_vector.of_array start) ~step ~tol in let print_state = print_state 2 in let rec proc iter = Gsl_multimin.Deriv.iterate minim ; let status = Gsl_multimin.Deriv.test_gradient minim epsabs in match status with | true -> Printf.printf "Minimum found at:\n" ; print_state minim iter | false when iter >= maxiter -> print_state minim iter ; Printf.printf "Too many iterations\n" ; | false -> print_state minim iter ; proc (succ iter) in Printf.printf "minimizer: %s\n" (Gsl_multimin.Deriv.name minim) ; proc 1 let print_state_simplex n = let x = Gsl_vector.create n in fun mini iter -> let f = Gsl_multimin.NoDeriv.minimum ~x mini in let ssval = Gsl_multimin.NoDeriv.size mini in Printf.printf "%5d x=%10.3f y=%10.3f f()=%-10.3f ssize=%.3f\n" iter x.{0} x.{1} f ssval let mini_simplex kind gf ~start ~step_size = let minim = Gsl_multimin.NoDeriv.make kind 2 gf ~x:(Gsl_vector.of_array start) ~step_size:(Gsl_vector.of_array step_size) in let print_state = print_state_simplex 2 in let rec proc iter = Gsl_multimin.NoDeriv.iterate minim ; let status = Gsl_multimin.NoDeriv.test_size minim epsabs in match status with | true -> Printf.printf "Minimum found at:\n" ; print_state minim iter | false when iter >= maxiter -> print_state minim iter ; Printf.printf "Too many iterations\n" ; | false -> print_state minim iter ; proc (succ iter) in Printf.printf "minimizer: %s\n" (Gsl_multimin.NoDeriv.name minim) ; proc 1 open Gsl_multimin.Deriv let _ = List.iter (fun kind -> mini kind (parab 1. 2.) [| 5. ; 7. |] 0.01 1e-4 ; print_newline () ; flush stdout) [ CONJUGATE_FR ; CONJUGATE_PR ; VECTOR_BFGS ; STEEPEST_DESCENT ; ] ; mini_simplex Gsl_multimin.NoDeriv.NM_SIMPLEX (parab 1. 2.).multim_f ~start:[| 5. ; 7. |] ~step_size:[| 1. ; 1. |] ocamlgsl-0.6.0/examples/multiroot.ml0000664000076400007640000000522610606752727016263 0ustar olivolivopen Gsl_fun let _ = Gsl_error.init () let f a b ~x ~f:y = let x0 = x.{0} in let x1 = x.{1} in y.{0} <- a *. (1. -. x0) ; y.{1} <- b *. (x1 -. x0 *. x0) let df a b ~x ~j = let x0 = x.{0} in j.{0,0} <- ~-. a ; j.{0,1} <- 0. ; j.{1,0} <- -2. *. b *. x0 ; j.{1,1} <- b let fdf a b ~x ~f:y ~j = f a b ~x ~f:y ; df a b ~x ~j let print_state n = let x = Gsl_vector.create n in let f = Gsl_vector.create n in fun iter solv -> Gsl_multiroot.NoDeriv.get_state solv ~x ~f () ; Printf.printf "iter = %3u x = %+ .3f %+ .3f f(x) = %+ .3e %+ .3e\n" iter x.{0} x.{1} f.{0} f.{1} ; flush stdout let epsabs = 1e-7 let maxiter = 1000 let solve kind n gf x_init = let solv = Gsl_multiroot.NoDeriv.make kind n gf (Gsl_vector.of_array x_init) in Printf.printf "solver: %s\n" (Gsl_multiroot.NoDeriv.name solv) ; let print_state = print_state n in print_state 0 solv ; let rec proc iter = Gsl_multiroot.NoDeriv.iterate solv ; print_state iter solv ; let status = Gsl_multiroot.NoDeriv.test_residual solv epsabs in match status with | true -> Printf.printf "status = converged\n" | false when iter >= maxiter -> Printf.printf "status = too many iterations\n" | false -> proc (succ iter) in proc 1 open Gsl_multiroot.NoDeriv let _ = List.iter (fun kind -> solve kind 2 (f 1. 10.) [| -10.; -5. |] ; print_newline ()) [ HYBRIDS ; HYBRID ; DNEWTON ; BROYDEN ; ] let print_state_deriv n = let x = Gsl_vector.create n in let f = Gsl_vector.create n in fun iter solv -> Gsl_multiroot.Deriv.get_state solv ~x ~f () ; Printf.printf "iter = %3u x = %+ .3f %+ .3f f(x) = %+ .3e %+ .3e\n" iter x.{0} x.{1} f.{0} f.{1} ; flush stdout let solve_deriv kind n gf x_init = let solv = Gsl_multiroot.Deriv.make kind n gf (Gsl_vector.of_array x_init) in Printf.printf "solver: %s\n" (Gsl_multiroot.Deriv.name solv) ; let print_state = print_state_deriv n in print_state 0 solv ; let rec proc iter = Gsl_multiroot.Deriv.iterate solv ; print_state iter solv ; let status = Gsl_multiroot.Deriv.test_residual solv epsabs in match status with | true -> Printf.printf "status = converged\n" | false when iter >= maxiter -> Printf.printf "status = too many iterations\n" | false -> proc (succ iter) in proc 1 open Gsl_multiroot.Deriv let _ = let gf = { multi_f = f 1. 10. ; multi_df = df 1. 10. ; multi_fdf = fdf 1. 10. ; } in List.iter (fun kind -> solve_deriv kind 2 gf [| -10.; -5. |] ; print_newline ()) [ HYBRIDSJ ; HYBRIDJ ; NEWTON ; GNEWTON ; ] ocamlgsl-0.6.0/examples/odeiv.ml0000664000076400007640000000625610607755005015330 0ustar olivoliv let f mu t y f = let y0 = y.(0) and y1 = y.(1) in f.(0) <- y1 ; f.(1) <- -. y0 -. mu *. y1 *. (y0 *. y0 -. 1.) let jac mu t y dfdy dfdt = let y0 = y.(0) and y1 = y.(1) in dfdy.{0, 0} <- 0. ; dfdy.{0, 1} <- 1. ; dfdy.{1, 0} <- -. 2. *. mu *. y0 *. y1 -. 1. ; dfdy.{1, 1} <- -. mu *. (y0 *. y0 -. 1.) ; dfdt.(0) <- 0. ; dfdt.(1) <- 0. let integ mu = let step = Gsl_odeiv.make_step Gsl_odeiv.RK8PD ~dim:2 in let control = Gsl_odeiv.make_control_y_new ~eps_abs:1e-6 ~eps_rel:0. in let evolve = Gsl_odeiv.make_evolve 2 in let system = Gsl_odeiv.make_system (f mu) ~jac:(jac mu) 2 in let (t, t1, h, y) = (0., 100., 1e-6, [| 1.; 0. |]) in let rec loop data t h = if t < t1 then begin let (t, h) = Gsl_odeiv.evolve_apply evolve control step system ~t ~t1 ~h ~y in loop ((t, y.(0), y.(1)) :: data) t h end else List.rev data in loop [] t h let integ2 mu = let step = Gsl_odeiv.make_step Gsl_odeiv.RK8PD ~dim:2 in let control = Gsl_odeiv.make_control_y_new ~eps_abs:1e-6 ~eps_rel:0. in let evolve = Gsl_odeiv.make_evolve 2 in let system = Gsl_odeiv.make_system (f mu) ~jac:(jac mu) 2 in let t1 = 100. in let y = [| 1.; 0. |] in let state = ref (0., 1e-6) in let rec loop ti y = function | (t, h) when t < ti -> let new_state = Gsl_odeiv.evolve_apply evolve control step system ~t ~t1:ti ~h ~y in loop ti y new_state | state -> state in let data = ref [] in for i=1 to 100 do let ti = float i *. t1 /. 100. in state := loop ti y !state ; let (t, _) = !state in data := (t, y.(0), y.(1)) :: !data done ; List.rev !data let integ3 mu = let step = Gsl_odeiv.make_step Gsl_odeiv.RK4 ~dim:2 in let system = Gsl_odeiv.make_system (f mu) ~jac:(jac mu) 2 in let t1 = 100. in let t = ref 0. in let h = 1e-2 in let y = [| 1.; 0. |] in let yerr = Array.make 2 0. in let dydt_in = Array.make 2 0. in let dydt_out = Array.make 2 0. in let dfdy = Gsl_matrix.create 2 2 in let data = ref [] in jac mu t y dfdy dydt_in ; while !t < t1 do Gsl_odeiv.step_apply step ~t:!t ~h ~y ~yerr ~dydt_in ~dydt_out system ; Array.blit dydt_out 0 dydt_in 0 2 ; t := !t +. h ; data := (!t, y.(0), y.(1)) :: !data ; done ; List.rev !data let with_temp_file f = let tmp = Filename.temp_file "gnuplot_" ".tmp" in let res = try f tmp with exn -> Sys.remove tmp ; raise exn in Sys.remove tmp ; res let gnuplot script = with_temp_file (fun tmp -> let script_c = open_out tmp in List.iter (fun s -> Printf.fprintf script_c "%s\n" s) script ; close_out script_c ; match Unix.system (Printf.sprintf "gnuplot %s" tmp) with | Unix.WEXITED 0 -> () | _ -> prerr_endline "hmm, problems with gnuplot ?" ) let main () = Gsl_error.init () ; if Array.length Sys.argv < 2 then exit 1 ; let data = match int_of_string Sys.argv.(1) with | 3 -> integ3 10. | 2 -> integ2 10. | _ -> integ 10. in let points = List.map (fun (_, x, y) -> Printf.sprintf "%.5f %.5f" x y) data in gnuplot (List.concat [ [ "plot '-' with lines" ] ; points ; [ "e" ; "pause -1" ] ]) let _ = main () ocamlgsl-0.6.0/examples/permut.ml0000664000076400007640000000134410600031632015511 0ustar olivolivopen Bigarray let _ = Gsl_error.init () ; Random.self_init () let print_arr arr = Array.iter (fun i -> Printf.printf "% 4d " i) arr ; print_newline () let print_barr arr = for i=0 to pred (Array1.dim arr) do Printf.printf "% 4d " arr.{i} done ; print_newline () let _ = let p = Gsl_permut.make 5 in Gsl_permut.next p ; print_string "permut :" ; print_arr (Gsl_permut.to_array p) ; let a = Array.init 5 (fun _ -> Random.int 10) in print_string "arr :" ; print_arr a ; Gsl_permut.permute p a ; print_string "arr :" ; print_arr a ; let a1 = Array1.of_array int c_layout a in print_string "arr1 :" ; print_barr a1 ; Gsl_permut.permute_barr p a1 ; print_string "arr1 :" ; print_barr a1 ocamlgsl-0.6.0/examples/qrng.ml0000664000076400007640000000027710600031632015150 0ustar olivolivlet _ = let qrng = Gsl_qrng.make Gsl_qrng.SOBOL 2 in let tmp = Array.make 2 0. in for i=0 to 1023 do Gsl_qrng.get qrng tmp ; Printf.printf "%.5f %.5f\n" tmp.(0) tmp.(1) done ocamlgsl-0.6.0/examples/rng.ml0000664000076400007640000000132110600031632014756 0ustar olivoliv let _ = Gsl_error.init () ; Gsl_rng.env_setup () let rng = Gsl_rng.make (Gsl_rng.default ()) let _ = Printf.printf "# generator type: %s\n" (Gsl_rng.name rng) ; Printf.printf "# seed = %nu\n" (Gsl_rng.default_seed ()) ; Printf.printf "# min value = %nu\n" (Gsl_rng.min rng) ; Printf.printf "# max value = %nu\n" (Gsl_rng.max rng) ; Printf.printf "# first value = %nu\n" (Gsl_rng.get rng) let sigma = 3. let _ = Printf.printf "# gaussian with sigma=%g\n" sigma ; for i=1 to 10 do let x = Gsl_randist.gaussian rng ~sigma in Printf.printf "%+.7f\n" x done (* Local Variables: *) (* compile-command: "ocamlopt -o rng -I .. gsl.cmxa rng.ml" *) (* End: *) ocamlgsl-0.6.0/examples/root.ml0000664000076400007640000000402510606752760015201 0ustar olivoliv let _ = Gsl_error.init () let quad a b c x = (* Gc.major () ; *) (a *. x +. b) *. x +. c let quad_deriv a b x = 2. *. a *. x +. b let quad_fdf a b c x = let y = (a *. x +. b) *. x +. c in let dy = 2. *. a *. x +. b in (y, dy) let (a, b, c) = (1., 0., -5.0) let r_expected = sqrt 5.0 open Gsl_root.Bracket let find_f ?(max_iter=100) s = Printf.printf "\nusing %s method\n" (name s) ; Printf.printf "%5s [%9s, %9s] %9s %10s %9s\n" "iter" "lower" "upper" "root" "err" "err(est)" ; let rec proc i = function | true -> () | _ when i >= max_iter -> () | _ -> iterate s ; let r = root s in let (x_lo, x_hi) = interval s in let status = Gsl_root.test_interval x_lo x_hi 0. 0.001 in if status then Printf.printf "Converged:\n" ; Printf.printf "%5d [%.7f, %.7f] %.7f %+.7f %.7f\n" i x_lo x_hi r (r -. r_expected) (x_hi -. x_lo) ; proc (succ i) status in proc 1 false open Gsl_root.Polish let find_fdf ?(max_iter=100) s x_init = Printf.printf "\nusing %s method\n" (name s) ; Printf.printf "%-5s %10s %10s %10s\n" "iter" "root" "err" "err(est)" ; let rec proc i x0 = function | true -> () | _ when i >= max_iter -> () | _ -> iterate s ; let x = root s in let status = Gsl_root.test_delta x x0 0. 1e-3 in if status then Printf.printf "Converged:\n" ; Printf.printf "%5d %10.7f %+10.7f %10.7f\n" i x (x -. r_expected) (x -. x0) ; proc (succ i) x status in proc 1 x_init false let _ = let gslfun = quad a b c in List.iter (fun t -> let s = Gsl_root.Bracket.make t gslfun 0. 5. in find_f s) [ Gsl_root.Bracket.BISECTION ; Gsl_root.Bracket.FALSEPOS ; Gsl_root.Bracket.BRENT ] let _ = print_newline () ; flush stdout let _ = let gslfun_fdf = { Gsl_fun.f = quad a b c ; Gsl_fun.df = quad_deriv a b ; Gsl_fun.fdf = quad_fdf a b c ; } in List.iter (fun t -> let s = Gsl_root.Polish.make t gslfun_fdf 5. in find_fdf s 5.) [ Gsl_root.Polish.NEWTON ; Gsl_root.Polish.SECANT ; Gsl_root.Polish.STEFFENSON ] ocamlgsl-0.6.0/examples/siman.ml0000664000076400007640000000126210600031632015303 0ustar olivoliv let energ x = (exp (~-. ((x -. 1.) ** 2.))) *. sin (8. *. x) let step rng x step_size = let u = Gsl_rng.uniform rng in x +. 2. *. (u -. 0.5) *. step_size let print x = Printf.sprintf "%12g" x let _ = Gsl_error.init () ; Gsl_rng.env_setup () ; let rng = Gsl_rng.make (Gsl_rng.default ()) in let params = { Gsl_siman.iters_fixed_T = 10 ; Gsl_siman.step_size = 10. ; Gsl_siman.k = 1. ; Gsl_siman.t_initial = 2e-3 ; Gsl_siman.mu_t = 1.005 ; Gsl_siman.t_min = 2e-6 ; } in let res = Gsl_siman.solve rng 15.5 ~energ_func:energ ~step_func:step (* ~print_func:print *) params in Printf.printf "result = %12g\n" res ocamlgsl-0.6.0/examples/siman_tsp.ml0000664000076400007640000001001410600031632016164 0ustar olivoliv type city = { name : string ; lat : float ; long : float ; } let cities = Array.map (fun (n,la,lo) -> { name = n; lat = la; long = lo }) [| ("Santa Fe", 35.68, 105.95) ; ("Phoenix", 33.54, 112.07) ; ("Albuquerque", 35.12, 106.62) ; ("Clovis", 34.41, 103.20) ; ("Durango", 37.29, 107.87) ; ("Dallas", 32.79, 96.77) ; ("Tesuque", 35.77, 105.92) ; ("Grants", 35.15, 107.84) ; ("Los Alamos", 35.89, 106.28) ; ("Las Cruces", 32.34, 106.76) ; ("Cortez", 37.35, 108.58) ; ("Gallup", 35.52, 108.74) ; |] let city_distance { lat = la1; long = lo1 } { lat = la2; long = lo2 } = let earth_radius = 6375. in let pi_180 = Gsl_math.pi /. 180. in let sla1 = sin (la1 *. pi_180) in let cla1 = cos (la1 *. pi_180) in let slo1 = sin (lo1 *. pi_180) in let clo1 = cos (lo1 *. pi_180) in let sla2 = sin (la2 *. pi_180) in let cla2 = cos (la2 *. pi_180) in let slo2 = sin (lo2 *. pi_180) in let clo2 = cos (lo2 *. pi_180) in let dot_prod = (cla1 *. clo1) *. (cla2 *. clo2) +. (cla1 *. slo1) *. (cla2 *. slo2) +. sla1 *. sla2 in earth_radius *. acos dot_prod let prepare_distance_matrix cities = let nb = Array.length cities in let mat = Array.make_matrix nb nb 0. in for i=0 to pred nb do for j= succ i to pred nb do let dist = city_distance cities.(i) cities.(j) in mat.(i).(j) <- dist ; mat.(j).(i) <- dist done done ; mat let print_distance_matrix mat = let nb = Array.length mat in for i=0 to pred nb do Printf.printf "# " ; for j=0 to pred nb do Printf.printf "%15.8f " mat.(i).(j) done ; print_newline () done ; flush stdout let energ_func dist_mat route = let nb = Array.length route in let e = ref 0. in for i=0 to pred nb do e := !e +. dist_mat.(route.(i)).(route.( (succ i) mod nb )) done ; !e let step_func rng route step_size = let nb = Array.length route in let x1 = (Gsl_rng.uniform_int rng (pred nb)) + 1 in let x2 = ref x1 in while !x2 = x1 do x2 := (Gsl_rng.uniform_int rng (pred nb)) + 1 done ; let route = Array.copy route in let swap = route.(x1) in route.(x1) <- route.(!x2) ; route.(!x2) <- swap ; route let print_func route = let nb = Array.length route in print_string " [" ; for i=0 to pred nb do Printf.printf " %d " route.(i) done ; print_string "]\n" let main () = let rng = Gsl_rng.make (Gsl_rng.default ()) in let nb = Array.length cities in let matrix = prepare_distance_matrix cities in let route_init = Array.init nb (fun i -> i) in Printf.printf "# initial order of cities:\n" ; for i=0 to pred nb do Printf.printf "# \"%s\"\n" cities.(route_init.(i)).name done ; Printf.printf "# distance matrix is:\n" ; print_distance_matrix matrix ; Printf.printf "# initial coordinates of cities (longitude and latitude)\n" ; for i=0 to pred nb do let c = route_init.(i) in Printf.printf "### initial_city_coord: %g %g \"%s\"\n" (~-. (cities.(c).long)) cities.(c).lat cities.(c).name done ; flush stdout ; let siman_params = { Gsl_siman.iters_fixed_T = 2000 ; Gsl_siman.step_size = 1. ; Gsl_siman.k = 1. ; Gsl_siman.t_initial = 5000. ; Gsl_siman.mu_t = 1.002 ; Gsl_siman.t_min = 5e-1 } in let final_route = Gsl_siman.solve rng route_init ~energ_func:(energ_func matrix) ~step_func (* ~print_func *) siman_params in Printf.printf "# final order of cities:\n" ; for i=0 to pred nb do Printf.printf "# \"%s\"\n" cities.(final_route.(i)).name done ; Printf.printf "# final coordinates of cities (longitude and latitude)\n" ; for i=0 to pred nb do let c = final_route.(i) in Printf.printf "### final_city_coord: %g %g \"%s\"\n" (~-. (cities.(c).long)) cities.(c).lat cities.(c).name done ; flush stdout let _ = Gsl_error.init () ; Gsl_rng.env_setup () ; Gsl_ieee.env_setup () ; Gsl_error.handle_exn main () ocamlgsl-0.6.0/examples/stats.ml0000664000076400007640000000225310600031632015333 0ustar olivoliv let _ = let data = [| 17.2; 18.1; 16.5; 18.3; 12.6 |] in let mean = Gsl_stats.mean data in let variance = Gsl_stats.variance data in let largest = Gsl_stats.max data in let smallest = Gsl_stats.min data in Printf.printf "The dataset is %g, %g, %g, %g, %g\n" data.(0) data.(1) data.(2) data.(3) data.(4) ; Printf.printf "The sample mean is %g\n" mean ; Printf.printf "The estimated variance is %g\n" variance ; Printf.printf "The largest value is %g\n" largest ; Printf.printf "The smallest value is %g\n" smallest let _ = let data = [| 17.2; 18.1; 16.5; 18.3; 12.6 |] in Printf.printf "Original dataset is %g, %g, %g, %g, %g\n" data.(0) data.(1) data.(2) data.(3) data.(4) ; Array.sort compare data ; Printf.printf "Sorted dataset is %g, %g, %g, %g, %g\n" data.(0) data.(1) data.(2) data.(3) data.(4) ; let median = Gsl_stats.quantile_from_sorted_data data 0.5 in let upperq = Gsl_stats.quantile_from_sorted_data data 0.75 in let lowerq = Gsl_stats.quantile_from_sorted_data data 0.25 in Printf.printf "The median is %g\n" median ; Printf.printf "The upper quartile is %g\n" upperq ; Printf.printf "The lower quartile is %g\n" lowerq ocamlgsl-0.6.0/examples/sum.ml0000664000076400007640000000257710600031632015012 0ustar olivoliv let _ = Gsl_error.init () let zeta2 = Gsl_math.pi *. Gsl_math.pi /. 6. let zeta_terms n = let t = Array.make n 0. in let sum = ref 0. in for i=0 to pred n do let np1 = float (i + 1) in t.(i) <- 1. /. (np1 *. np1) ; sum := !sum +. t.(i) done ; (t, !sum) let print_res sum nbterms sum_accel sum_plain nbterms_accel = Printf.printf "term-by-term sum = % .16f using %d terms\n" sum nbterms ; Printf.printf "term-by-term sum = % .16f using %d terms\n" sum_plain nbterms_accel ; Printf.printf "exact value = % .16f\n" zeta2 ; Printf.printf "accelerated sum = % .16f using %d terms\n" sum_accel.Gsl_fun.res nbterms_accel ; Printf.printf "estimated error = % .16f\n" sum_accel.Gsl_fun.err ; Printf.printf "actual error = % .16f\n" (sum_accel.Gsl_fun.res -. zeta2) let _ = let n = 20 in let (t, sum) = zeta_terms n in let ws = Gsl_sum.make n in let res = Gsl_sum.accel t ws in let { Gsl_sum.sum_plain = sum_plain ; Gsl_sum.terms_used = nbterms_used } = Gsl_sum.get_info ws in print_res sum n res sum_plain nbterms_used ; print_newline (); print_endline "\"truncated\" version:" ; let ws = Gsl_sum.Trunc.make n in let res = Gsl_sum.Trunc.accel t ws in let { Gsl_sum.Trunc.sum_plain = sum_plain ; Gsl_sum.Trunc.terms_used = nbterms_used } = Gsl_sum.Trunc.get_info ws in print_res sum n res sum_plain nbterms_used ocamlgsl-0.6.0/examples/wavelet.ml0000664000076400007640000000204710600031632015645 0ustar olivolivlet read_file init do_line finish f = let ic = open_in f in let acc = ref init in begin try while true do let l = input_line ic in acc := do_line !acc l done with | End_of_file -> close_in ic | exn -> close_in ic ; raise exn end ; finish !acc let read_data_file = read_file [] (fun acc l -> float_of_string l :: acc) (fun acc -> Array.of_list (List.rev acc)) let main f = let data = read_data_file f in let n = Array.length data in Printf.eprintf "read %d values\n%!" n ; let w = Gsl_wavelet.make Gsl_wavelet.DAUBECHIES 4 in Gsl_wavelet.transform_forward w data ; let high = Gsl_sort.vector_flat_largest_index 20 (Gsl_vector_flat.view_array (Array.map abs_float data)) in let high_coeff = Array.make n 0. in for i = 0 to 20 - 1 do let j = high.{i} in high_coeff.(j) <- data.(j) done ; Gsl_wavelet.transform_inverse w high_coeff ; Array.iter (fun f -> Printf.printf "%g\n" f) high_coeff let _ = Gsl_error.init () ; Gsl_error.handle_exn main "ecg.dat" ocamlgsl-0.6.0/examples/Makefile0000664000076400007640000000220410607755005015315 0ustar olivoliv OCAMLC := ocamlc.opt OCAMLOPT := ocamlopt.opt CAMLP4O := camlp4o.opt OCAMLBCFLAGS := -g OCAMLNCFLAGS := -unsafe SRC := cheb.ml diff.ml fit.ml integration.ml interp.ml min.ml monte.ml \ multifit-data.ml multifit.ml permut.ml qrng.ml rng.ml root.ml \ linalg.ml blas.ml multiroot.ml multimin.ml sum.ml multifit_nlin.ml \ eigen.ml siman.ml siman_tsp.ml odeiv.ml stats.ml const.ml histo.ml \ wavelet.ml bspline.ml PROGS := $(patsubst %.ml,%.test,$(SRC)) PROGS_OPT := $(patsubst %.ml,%.test.opt,$(SRC)) LIBS = bigarray.cma gsl.cma LIBSOPT = $(LIBS:%.cma=%.cmxa) MLGSLDIR = .. all : $(PROGS) $(PROGS_OPT) multifit.test multifit.test.opt : PP=-pp "$(CAMLP4O)" interp.test interp.test.opt : LIBS += unix.cma odeiv.test odeiv.test.opt : LIBS += unix.cma %.test : %.ml $(MLGSLDIR)/gsl.cma $(MLGSLDIR)/libmlgsl.a $(OCAMLC) $(PP) $(OCAMLBCFLAGS) -o $@ -I $(MLGSLDIR) -dllpath $(MLGSLDIR) $(LIBS) $< %.test.opt : %.ml $(MLGSLDIR)/gsl.cmxa $(MLGSLDIR)/libmlgsl.a $(OCAMLOPT) $(PP) $(OCAMLNCFLAGS) -o $@ -I $(MLGSLDIR) $(LIBSOPT) $< .PHONY : clean all clean : rm -f *.cm* *.[ao] *.so core *.test *.test.opt $(TRASH) ocamlgsl-0.6.0/doc/0000775000076400007640000000000010600040534012571 5ustar olivolivocamlgsl-0.6.0/doc/Gsl_monte.html0000664000076400007640000003326210607755605015437 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_monte

Module Gsl_monte


module Gsl_monte: sig .. end
Monte Carlo Integration


High-level interface



type kind =
| PLAIN
| MISER
| VEGAS
val integrate : kind ->
Gsl_fun.monte_fun ->
lo:float array -> up:float array -> int -> Gsl_rng.t -> Gsl_fun.result

Low-level interface



PLAIN algorithm


type plain_state 
val make_plain_state : int -> plain_state
val init_plain : plain_state -> unit
val integrate_plain : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> plain_state -> Gsl_fun.result

MISER algorithm


type miser_state 

type miser_params = {
   estimate_frac : float;
   min_calls : int;
   min_calls_per_bisection : int;
   miser_alpha : float;
   dither : float;
}
val make_miser_state : int -> miser_state
val init_miser : miser_state -> unit
val integrate_miser : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> miser_state -> Gsl_fun.result
val get_miser_params : miser_state -> miser_params
val set_miser_params : miser_state -> miser_params -> unit

VEGAS algorithm


type vegas_state 

type vegas_info = {
   result : float;
   sigma : float;
   chisq : float;
}
type vegas_mode =
| STRATIFIED
| IMPORTANCE_ONLY
| IMPORTANCE

type vegas_params = {
   vegas_alpha : float; (*1.5*)
   iterations : int; (*5*)
   stage : int;
   mode : vegas_mode;
   verbose : int;
   ostream : Pervasives.out_channel option;
}
val make_vegas_state : int -> vegas_state
val init_vegas : vegas_state -> unit
val integrate_vegas : Gsl_fun.monte_fun ->
lo:float array ->
up:float array -> int -> Gsl_rng.t -> vegas_state -> Gsl_fun.result
val get_vegas_info : vegas_state -> vegas_info
val get_vegas_params : vegas_state -> vegas_params
val set_vegas_params : vegas_state -> vegas_params -> unit
ocamlgsl-0.6.0/doc/Gsl_blas.Single.html0000664000076400007640000003161010607755600016444 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Single

Module Gsl_blas.Single


module Single: sig .. end


LEVEL 1


val sdsdot : alpha:float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
val dsdot : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
val dot : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
val nrm2 : Gsl_vector.Single.vector -> float
val asum : Gsl_vector.Single.vector -> float
val iamax : Gsl_vector.Single.vector -> int
val swap : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
val copy : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
val axpy : float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
val rot : Gsl_vector.Single.vector ->
Gsl_vector.Single.vector -> float -> float -> unit
val scal : float -> Gsl_vector.Single.vector -> unit

LEVEL 2


val gemv : Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
x:Gsl_vector.Single.vector ->
beta:float -> y:Gsl_vector.Single.vector -> unit
val trmv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
val trsv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
val symv : Gsl_blas.uplo ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
x:Gsl_vector.Single.vector ->
beta:float -> y:Gsl_vector.Single.vector -> unit
val dger : alpha:float ->
x:Gsl_vector.Single.vector ->
y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
val syr : Gsl_blas.uplo ->
alpha:float ->
x:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
val syr2 : Gsl_blas.uplo ->
alpha:float ->
x:Gsl_vector.Single.vector ->
y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit

LEVEL 3


val gemm : ta:Gsl_blas.transpose ->
tb:Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
b:Gsl_matrix.Single.matrix ->
beta:float -> c:Gsl_matrix.Single.matrix -> unit
val symm : Gsl_blas.side ->
Gsl_blas.uplo ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
b:Gsl_matrix.Single.matrix ->
beta:float -> c:Gsl_matrix.Single.matrix -> unit
val syrk : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
beta:float -> c:Gsl_matrix.Single.matrix -> unit
val syr2k : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix.Single.matrix ->
b:Gsl_matrix.Single.matrix ->
beta:float -> c:Gsl_matrix.Single.matrix -> unit
val trmm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:float ->
a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
val trsm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:float ->
a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
ocamlgsl-0.6.0/doc/type_Gsl_multimin.html0000664000076400007640000002632710607755605017220 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin sig
  module Deriv :
    sig
      type kind =
          CONJUGATE_FR
        | CONJUGATE_PR
        | VECTOR_BFGS
        | VECTOR_BFGS2
        | STEEPEST_DESCENT
      type t
      val make :
        Gsl_multimin.Deriv.kind ->
        int ->
        Gsl_fun.multim_fun_fdf ->
        x:Gsl_vector.vector ->
        step:float -> tol:float -> Gsl_multimin.Deriv.t
      external name : Gsl_multimin.Deriv.t -> string
        = "ml_gsl_multimin_fdfminimizer_name"
      external iterate : Gsl_multimin.Deriv.t -> unit
        = "ml_gsl_multimin_fdfminimizer_iterate"
      external restart : Gsl_multimin.Deriv.t -> unit
        = "ml_gsl_multimin_fdfminimizer_restart"
      external minimum :
        ?x:Gsl_vector.vector ->
        ?dx:Gsl_vector.vector ->
        ?g:Gsl_vector.vector -> Gsl_multimin.Deriv.t -> float
        = "ml_gsl_multimin_fdfminimizer_minimum"
      external test_gradient : Gsl_multimin.Deriv.t -> float -> bool
        = "ml_gsl_multimin_test_gradient"
    end
  module NoDeriv :
    sig
      type kind = NM_SIMPLEX
      type t
      val make :
        Gsl_multimin.NoDeriv.kind ->
        int ->
        Gsl_fun.multim_fun ->
        x:Gsl_vector.vector ->
        step_size:Gsl_vector.vector -> Gsl_multimin.NoDeriv.t
      external name : Gsl_multimin.NoDeriv.t -> string
        = "ml_gsl_multimin_fminimizer_name"
      external iterate : Gsl_multimin.NoDeriv.t -> unit
        = "ml_gsl_multimin_fminimizer_iterate"
      external minimum :
        ?x:Gsl_vector.vector -> Gsl_multimin.NoDeriv.t -> float
        = "ml_gsl_multimin_fminimizer_minimum"
      external size : Gsl_multimin.NoDeriv.t -> float
        = "ml_gsl_multimin_fminimizer_size"
      external test_size : Gsl_multimin.NoDeriv.t -> float -> bool
        = "ml_gsl_multimin_test_size"
    end
end
ocamlgsl-0.6.0/doc/Gsl_eigen.html0000664000076400007640000003315210607755603015400 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_eigen

Module Gsl_eigen


module Gsl_eigen: sig .. end
Eigensystems


Real Symmetric Matrices


type symm_ws 
val make_symm_ws : int -> symm_ws
val _symm : Gsl_vectmat.mat -> Gsl_vectmat.vec -> symm_ws -> unit
val symm : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vector.vector
type symmv_ws 
val make_symmv_ws : int -> symmv_ws
val _symmv : Gsl_vectmat.mat ->
Gsl_vectmat.vec -> Gsl_vectmat.mat -> symmv_ws -> unit
val symmv : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vector.vector * Gsl_matrix.matrix

type sort =
| VAL_ASC
| VAL_DESC
| ABS_ASC
| ABS_DESC
val symmv_sort : Gsl_vector.vector * Gsl_matrix.matrix -> sort -> unit

Complex Hermitian Matrices


type herm_ws 
val make_herm_ws : int -> herm_ws
val _herm : Gsl_vectmat.cmat -> Gsl_vectmat.vec -> herm_ws -> unit
val herm : ?protect:bool ->
[< `CA of Gsl_complex.complex_array * int * int
| `CM of Gsl_matrix_complex.matrix
| `CMF of Gsl_matrix_complex_flat.matrix ] ->
Gsl_vector.vector
type hermv_ws 
val make_hermv_ws : int -> hermv_ws
val _hermv : Gsl_vectmat.cmat ->
Gsl_vectmat.vec -> Gsl_vectmat.cmat -> hermv_ws -> unit
val hermv : ?protect:bool ->
[< `CA of Gsl_complex.complex_array * int * int
| `CM of Gsl_matrix_complex.matrix
| `CMF of Gsl_matrix_complex_flat.matrix ] ->
Gsl_vector.vector * Gsl_matrix_complex.matrix
val hermv_sort : Gsl_vector.vector * Gsl_matrix_complex.matrix -> sort -> unit

Real Nonsymmetric Matrices


type nonsymm_ws 
val make_nonsymm_ws : int -> nonsymm_ws
val _nonsymm : Gsl_vectmat.mat -> Gsl_vectmat.cvec -> nonsymm_ws -> unit
val _nonsymm_Z : Gsl_vectmat.mat ->
Gsl_vectmat.cvec -> Gsl_vectmat.mat -> nonsymm_ws -> unit
val nonsymm : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vector_complex.vector
type nonsymmv_ws 
val make_nonsymmv_ws : int -> nonsymmv_ws
val _nonsymmv : Gsl_vectmat.mat ->
Gsl_vectmat.cvec -> Gsl_vectmat.cmat -> nonsymmv_ws -> unit
val _nonsymmv_Z : Gsl_vectmat.mat ->
Gsl_vectmat.cvec ->
Gsl_vectmat.cmat -> Gsl_vectmat.mat -> nonsymmv_ws -> unit
val nonsymmv : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vector_complex.vector * Gsl_matrix_complex.matrix
val nonsymmv_sort : Gsl_vector_complex.vector * Gsl_matrix_complex.matrix ->
sort -> unit
ocamlgsl-0.6.0/doc/Gsl_const.html0000664000076400007640000007452410607755606015452 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_const

Module Gsl_const


module Gsl_const: sig .. end
Values of physical constants

val cgsm_speed_of_light : float
val cgsm_gravitational_constant : float
val cgsm_plancks_constant_h : float
val cgsm_plancks_constant_hbar : float
val cgsm_astronomical_unit : float
val cgsm_light_year : float
val cgsm_parsec : float
val cgsm_grav_accel : float
val cgsm_electron_volt : float
val cgsm_mass_electron : float
val cgsm_mass_muon : float
val cgsm_mass_proton : float
val cgsm_mass_neutron : float
val cgsm_rydberg : float
val cgsm_boltzmann : float
val cgsm_bohr_magneton : float
val cgsm_nuclear_magneton : float
val cgsm_electron_magnetic_moment : float
val cgsm_proton_magnetic_moment : float
val cgsm_molar_gas : float
val cgsm_standard_gas_volume : float
val cgsm_minute : float
val cgsm_hour : float
val cgsm_day : float
val cgsm_week : float
val cgsm_inch : float
val cgsm_foot : float
val cgsm_yard : float
val cgsm_mile : float
val cgsm_nautical_mile : float
val cgsm_fathom : float
val cgsm_mil : float
val cgsm_point : float
val cgsm_texpoint : float
val cgsm_micron : float
val cgsm_angstrom : float
val cgsm_hectare : float
val cgsm_acre : float
val cgsm_barn : float
val cgsm_liter : float
val cgsm_us_gallon : float
val cgsm_quart : float
val cgsm_pint : float
val cgsm_cup : float
val cgsm_fluid_ounce : float
val cgsm_tablespoon : float
val cgsm_teaspoon : float
val cgsm_canadian_gallon : float
val cgsm_uk_gallon : float
val cgsm_miles_per_hour : float
val cgsm_kilometers_per_hour : float
val cgsm_knot : float
val cgsm_pound_mass : float
val cgsm_ounce_mass : float
val cgsm_ton : float
val cgsm_metric_ton : float
val cgsm_uk_ton : float
val cgsm_troy_ounce : float
val cgsm_carat : float
val cgsm_unified_atomic_mass : float
val cgsm_gram_force : float
val cgsm_pound_force : float
val cgsm_kilopound_force : float
val cgsm_poundal : float
val cgsm_calorie : float
val cgsm_btu : float
val cgsm_therm : float
val cgsm_horsepower : float
val cgsm_bar : float
val cgsm_std_atmosphere : float
val cgsm_torr : float
val cgsm_meter_of_mercury : float
val cgsm_inch_of_mercury : float
val cgsm_inch_of_water : float
val cgsm_psi : float
val cgsm_poise : float
val cgsm_stokes : float
val cgsm_faraday : float
val cgsm_electron_charge : float
val cgsm_gauss : float
val cgsm_stilb : float
val cgsm_lumen : float
val cgsm_lux : float
val cgsm_phot : float
val cgsm_footcandle : float
val cgsm_lambert : float
val cgsm_footlambert : float
val cgsm_curie : float
val cgsm_roentgen : float
val cgsm_rad : float
val cgsm_solar_mass : float
val cgsm_bohr_radius : float
val cgsm_newton : float
val cgsm_dyne : float
val cgsm_joule : float
val cgsm_erg : float
val cgsm_stefan_boltzmann_constant : float
val cgsm_thomson_cross_section : float
val mksa_speed_of_light : float
val mksa_gravitational_constant : float
val mksa_plancks_constant_h : float
val mksa_plancks_constant_hbar : float
val mksa_astronomical_unit : float
val mksa_light_year : float
val mksa_parsec : float
val mksa_grav_accel : float
val mksa_electron_volt : float
val mksa_mass_electron : float
val mksa_mass_muon : float
val mksa_mass_proton : float
val mksa_mass_neutron : float
val mksa_rydberg : float
val mksa_boltzmann : float
val mksa_bohr_magneton : float
val mksa_nuclear_magneton : float
val mksa_electron_magnetic_moment : float
val mksa_proton_magnetic_moment : float
val mksa_molar_gas : float
val mksa_standard_gas_volume : float
val mksa_minute : float
val mksa_hour : float
val mksa_day : float
val mksa_week : float
val mksa_inch : float
val mksa_foot : float
val mksa_yard : float
val mksa_mile : float
val mksa_nautical_mile : float
val mksa_fathom : float
val mksa_mil : float
val mksa_point : float
val mksa_texpoint : float
val mksa_micron : float
val mksa_angstrom : float
val mksa_hectare : float
val mksa_acre : float
val mksa_barn : float
val mksa_liter : float
val mksa_us_gallon : float
val mksa_quart : float
val mksa_pint : float
val mksa_cup : float
val mksa_fluid_ounce : float
val mksa_tablespoon : float
val mksa_teaspoon : float
val mksa_canadian_gallon : float
val mksa_uk_gallon : float
val mksa_miles_per_hour : float
val mksa_kilometers_per_hour : float
val mksa_knot : float
val mksa_pound_mass : float
val mksa_ounce_mass : float
val mksa_ton : float
val mksa_metric_ton : float
val mksa_uk_ton : float
val mksa_troy_ounce : float
val mksa_carat : float
val mksa_unified_atomic_mass : float
val mksa_gram_force : float
val mksa_pound_force : float
val mksa_kilopound_force : float
val mksa_poundal : float
val mksa_calorie : float
val mksa_btu : float
val mksa_therm : float
val mksa_horsepower : float
val mksa_bar : float
val mksa_std_atmosphere : float
val mksa_torr : float
val mksa_meter_of_mercury : float
val mksa_inch_of_mercury : float
val mksa_inch_of_water : float
val mksa_psi : float
val mksa_poise : float
val mksa_stokes : float
val mksa_faraday : float
val mksa_electron_charge : float
val mksa_gauss : float
val mksa_stilb : float
val mksa_lumen : float
val mksa_lux : float
val mksa_phot : float
val mksa_footcandle : float
val mksa_lambert : float
val mksa_footlambert : float
val mksa_curie : float
val mksa_roentgen : float
val mksa_rad : float
val mksa_solar_mass : float
val mksa_bohr_radius : float
val mksa_newton : float
val mksa_dyne : float
val mksa_joule : float
val mksa_erg : float
val mksa_stefan_boltzmann_constant : float
val mksa_thomson_cross_section : float
val mksa_vacuum_permittivity : float
val mksa_vacuum_permeability : float
val mksa_debye : float
val num_fine_structure : float
val num_avogadro : float
val num_yotta : float
val num_zetta : float
val num_exa : float
val num_peta : float
val num_tera : float
val num_giga : float
val num_mega : float
val num_kilo : float
val num_milli : float
val num_micro : float
val num_nano : float
val num_pico : float
val num_femto : float
val num_atto : float
val num_zepto : float
val num_yocto : float
ocamlgsl-0.6.0/doc/Gsl_permut.html0000664000076400007640000001573110607755603015630 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_permut

Module Gsl_permut


module Gsl_permut: sig .. end
Permutations

type permut = (int, Bigarray.int_elt, Bigarray.c_layout) Bigarray.Array1.t 
val of_array : int array -> permut
val to_array : permut -> int array
val init : permut -> unit
val create : int -> permut
val make : int -> permut
val swap : permut -> int -> int -> unit
val size : permut -> int
val valid : permut -> bool
val reverse : permut -> unit
val inverse : permut -> permut
val next : permut -> unit
val prev : permut -> unit
val permute : permut -> 'a array -> unit
val permute_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit
val permute_inverse : permut -> 'a array -> unit
val permute_inverse_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit
ocamlgsl-0.6.0/doc/Gsl_vector_complex.html0000664000076400007640000002051210607755576017347 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex

Module Gsl_vector_complex


module Gsl_vector_complex: sig .. end
Vector of complex numbers implemented with a Bigarray

type complex_double_vector_bigarr = (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout) Bigarray.Array1.t 
type vector = complex_double_vector_bigarr 
val create : ?init:Gsl_complex.complex -> int -> vector
val of_array : Gsl_complex.complex array -> vector
val to_array : vector -> Gsl_complex.complex array
val of_complex_array : Gsl_complex.complex_array -> vector
val to_complex_array : vector -> Gsl_complex.complex_array
val length : vector -> int
val get : vector -> int -> Gsl_complex.complex
val set : vector -> int -> Gsl_complex.complex -> unit
val set_all : vector -> Gsl_complex.complex -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : src:vector -> dst:vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit
val subvector : vector -> off:int -> len:int -> vector
module Single: sig .. end
ocamlgsl-0.6.0/doc/type_Gsl_math.html0000664000076400007640000001616310607755576016317 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_math sig
  val e : float
  val log2e : float
  val log10e : float
  val sqrt2 : float
  val sqrt1_2 : float
  val sqrt3 : float
  val pi : float
  val pi_2 : float
  val pi_4 : float
  val sqrtpi : float
  val i_2_sqrtpi : float
  val i_1_pi : float
  val i_2_pi : float
  val ln10 : float
  val ln2 : float
  val lnpi : float
  val euler : float
  val pow_int : float -> int -> float
  external log1p : float -> float = "ml_gsl_log1p" "gsl_log1p" "float"
  external expm1 : float -> float = "ml_gsl_expm1" "gsl_expm1" "float"
  external hypot : float -> float -> float = "ml_gsl_hypot" "gsl_hypot"
    "float"
  external acosh : float -> float = "ml_gsl_acosh" "gsl_acosh" "float"
  external asinh : float -> float = "ml_gsl_asinh" "gsl_asinh" "float"
  external atanh : float -> float = "ml_gsl_atanh" "gsl_atanh" "float"
  external fcmp : float -> float -> epsilon:float -> int = "ml_gsl_fcmp"
end
ocamlgsl-0.6.0/doc/Gsl_cdf.html0000664000076400007640000003763310607755610015053 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_cdf

Module Gsl_cdf


module Gsl_cdf: sig .. end
Cumulative distribution functions

val ugaussian_P : x:float -> float
val ugaussian_Q : x:float -> float
val ugaussian_Pinv : p:float -> float
val ugaussian_Qinv : q:float -> float
val gaussian_P : x:float -> sigma:float -> float
val gaussian_Q : x:float -> sigma:float -> float
val gaussian_Pinv : p:float -> sigma:float -> float
val gaussian_Qinv : q:float -> sigma:float -> float
val gamma_P : x:float -> a:float -> b:float -> float
val gamma_Q : x:float -> a:float -> b:float -> float
val gamma_Pinv : p:float -> a:float -> b:float -> float
val gamma_Qinv : q:float -> a:float -> b:float -> float
val cauchy_P : x:float -> a:float -> float
val cauchy_Q : x:float -> a:float -> float
val cauchy_Pinv : p:float -> a:float -> float
val cauchy_Qinv : q:float -> a:float -> float
val laplace_P : x:float -> a:float -> float
val laplace_Q : x:float -> a:float -> float
val laplace_Pinv : p:float -> a:float -> float
val laplace_Qinv : q:float -> a:float -> float
val rayleigh_P : x:float -> sigma:float -> float
val rayleigh_Q : x:float -> sigma:float -> float
val rayleigh_Pinv : p:float -> sigma:float -> float
val rayleigh_Qinv : q:float -> sigma:float -> float
val chisq_P : x:float -> nu:float -> float
val chisq_Q : x:float -> nu:float -> float
val chisq_Pinv : p:float -> nu:float -> float
val chisq_Qinv : q:float -> nu:float -> float
val exponential_P : x:float -> mu:float -> float
val exponential_Q : x:float -> mu:float -> float
val exponential_Pinv : p:float -> mu:float -> float
val exponential_Qinv : q:float -> mu:float -> float
val exppow_P : x:float -> a:float -> b:float -> float
val exppow_Q : x:float -> a:float -> b:float -> float
val tdist_P : x:float -> nu:float -> float
val tdist_Q : x:float -> nu:float -> float
val tdist_Pinv : p:float -> nu:float -> float
val tdist_Qinv : q:float -> nu:float -> float
val fdist_P : x:float -> nu1:float -> nu2:float -> float
val fdist_Q : x:float -> nu1:float -> nu2:float -> float
val fdist_Pinv : p:float -> nu1:float -> nu2:float -> float
val fdist_Qinv : q:float -> nu1:float -> nu2:float -> float
val beta_P : x:float -> a:float -> b:float -> float
val beta_Q : x:float -> a:float -> b:float -> float
val beta_Pinv : p:float -> a:float -> b:float -> float
val beta_Qinv : q:float -> a:float -> b:float -> float
val flat_P : x:float -> a:float -> b:float -> float
val flat_Q : x:float -> a:float -> b:float -> float
val flat_Pinv : p:float -> a:float -> b:float -> float
val flat_Qinv : q:float -> a:float -> b:float -> float
val lognormal_P : x:float -> zeta:float -> sigma:float -> float
val lognormal_Q : x:float -> zeta:float -> sigma:float -> float
val lognormal_Pinv : p:float -> zeta:float -> sigma:float -> float
val lognormal_Qinv : q:float -> zeta:float -> sigma:float -> float
val gumbel1_P : x:float -> a:float -> b:float -> float
val gumbel1_Q : x:float -> a:float -> b:float -> float
val gumbel1_Pinv : p:float -> a:float -> b:float -> float
val gumbel1_Qinv : q:float -> a:float -> b:float -> float
val gumbel2_P : x:float -> a:float -> b:float -> float
val gumbel2_Q : x:float -> a:float -> b:float -> float
val gumbel2_Pinv : p:float -> a:float -> b:float -> float
val gumbel2_Qinv : q:float -> a:float -> b:float -> float
val weibull_P : x:float -> a:float -> b:float -> float
val weibull_Q : x:float -> a:float -> b:float -> float
val weibull_Pinv : p:float -> a:float -> b:float -> float
val weibull_Qinv : q:float -> a:float -> b:float -> float
val pareto_P : x:float -> a:float -> b:float -> float
val pareto_Q : x:float -> a:float -> b:float -> float
val pareto_Pinv : p:float -> a:float -> b:float -> float
val pareto_Qinv : q:float -> a:float -> b:float -> float
val logistic_P : x:float -> a:float -> float
val logistic_Q : x:float -> a:float -> float
val logistic_Pinv : p:float -> a:float -> float
val logistic_Qinv : q:float -> a:float -> float
val binomial_P : k:int -> p:float -> n:int -> float
val binomial_Q : k:int -> p:float -> n:int -> float
val poisson_P : k:int -> mu:float -> float
val poisson_Q : k:int -> mu:float -> float
val geometric_P : k:int -> p:float -> float
val geometric_Q : k:int -> p:float -> float
val negative_binomial_P : k:int -> p:float -> n:float -> float
val negative_binomial_Q : k:int -> p:float -> n:float -> float
val pascal_P : k:int -> p:float -> n:int -> float
val pascal_Q : k:int -> p:float -> n:int -> float
ocamlgsl-0.6.0/doc/Gsl_linalg.html0000664000076400007640000011353510607755603015563 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_linalg

Module Gsl_linalg


module Gsl_linalg: sig .. end
Simple linear algebra operations


Simple matrix multiplication


val matmult : a:Gsl_vectmat.mat ->
?transpa:bool ->
b:Gsl_vectmat.mat -> ?transpb:bool -> Gsl_vectmat.mat -> unit
matmult a ~transpa b ~transpb c stores in matrix c the product of matrices a and b. transpa or transpb allow transposition of either matrix, so it can compute a.b or Trans(a).b or a.Trans(b) or Trans(a).Trans(b) .

See also Gsl_blas.gemm.


LU decomposition



Low-level functions


val _LU_decomp : Gsl_vectmat.mat -> Gsl_permut.permut -> int
val _LU_solve : Gsl_vectmat.mat ->
Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _LU_svx : Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.vec -> unit
val _LU_refine : a:Gsl_vectmat.mat ->
lu:Gsl_vectmat.mat ->
Gsl_permut.permut ->
b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
val _LU_invert : Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.mat -> unit
val _LU_det : Gsl_vectmat.mat -> int -> float
val _LU_lndet : Gsl_vectmat.mat -> float
val _LU_sgndet : Gsl_vectmat.mat -> int -> int

Higher-level functions



With these, the arguments are protected (copied) and necessary intermediate datastructures are allocated;
val decomp_LU : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vectmat.mat * Gsl_permut.permut * int
val solve_LU : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
[< `A of float array
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
float array
val det_LU : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
float
val invert_LU : ?protect:bool ->
?result:Gsl_vectmat.mat ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_vectmat.mat

Complex LU decomposition


val complex_LU_decomp : Gsl_vectmat.cmat -> Gsl_permut.permut -> int
val complex_LU_solve : Gsl_vectmat.cmat ->
Gsl_permut.permut -> b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> unit
val complex_LU_svx : Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cvec -> unit
val complex_LU_refine : a:Gsl_vectmat.cmat ->
lu:Gsl_vectmat.cmat ->
Gsl_permut.permut ->
b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> res:Gsl_vectmat.cvec -> unit
val complex_LU_invert : Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cmat -> unit
val complex_LU_det : Gsl_vectmat.cmat -> int -> Gsl_complex.complex
val complex_LU_lndet : Gsl_vectmat.cmat -> float
val complex_LU_sgndet : Gsl_vectmat.cmat -> int -> Gsl_complex.complex

QR decomposition


val _QR_decomp : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
val _QR_solve : Gsl_vectmat.mat ->
Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QR_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QR_lssolve : Gsl_vectmat.mat ->
Gsl_vectmat.vec ->
b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
val _QR_QTvec : Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _QR_Qvec : Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _QR_Rsolve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QR_Rsvx : Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit
val _QR_unpack : Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> unit
val _QR_QRsolve : Gsl_vectmat.mat ->
r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QR_update : Gsl_vectmat.mat ->
r:Gsl_vectmat.mat -> w:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _R_solve : r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit

QR Decomposition with Column Pivoting


val _QRPT_decomp : a:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
val _QRPT_decomp2 : a:Gsl_vectmat.mat ->
q:Gsl_vectmat.mat ->
r:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
val _QRPT_solve : qr:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec ->
p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QRPT_svx : qr:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
val _QRPT_QRsolve : q:Gsl_vectmat.mat ->
r:Gsl_vectmat.mat ->
p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QRPT_update : q:Gsl_vectmat.mat ->
r:Gsl_vectmat.mat ->
p:Gsl_permut.permut -> u:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _QRPT_Rsolve : qr:Gsl_vectmat.mat ->
p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _QRPT_Rsvx : qr:Gsl_vectmat.mat -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit

Singular Value Decomposition


val _SV_decomp : a:Gsl_vectmat.mat ->
v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit
val _SV_decomp_mod : a:Gsl_vectmat.mat ->
x:Gsl_vectmat.mat ->
v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit
val _SV_decomp_jacobi : a:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> unit
val _SV_solve : u:Gsl_vectmat.mat ->
v:Gsl_vectmat.mat ->
s:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit

LQ decomposition


val _LQ_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit
val _LQ_solve_T : lq:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _LQ_svx_T : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _LQ_lssolve_T : lq:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec ->
b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
val _LQ_Lsolve_T : lq:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _LQ_Lsvx_T : lq:Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit
val _L_solve_T : l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _LQ_vecQ : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _LQ_vecQT : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
val _LQ_unpack : lq:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> unit
val _LQ_update : q:Gsl_vectmat.mat ->
r:Gsl_vectmat.mat -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit
val _LQ_LQsolve : q:Gsl_vectmat.mat ->
l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit

P^T L Q decomposition


val _PTLQ_decomp : a:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
val _PTLQ_decomp2 : a:Gsl_vectmat.mat ->
q:Gsl_vectmat.mat ->
r:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
val _PTLQ_solve_T : qr:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec ->
Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _PTLQ_svx_T : lq:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
val _PTLQ_LQsolve_T : q:Gsl_vectmat.mat ->
l:Gsl_vectmat.mat ->
Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _PTLQ_Lsolve_T : lq:Gsl_vectmat.mat ->
Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _PTLQ_Lsvx_T : lq:Gsl_vectmat.mat -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
val _PTLQ_update : q:Gsl_vectmat.mat ->
l:Gsl_vectmat.mat ->
Gsl_permut.permut -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit

Cholesky decomposition


val cho_decomp : Gsl_vectmat.mat -> unit
val cho_solve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val cho_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
val cho_decomp_unit : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit

Tridiagonal Decomposition of Real Symmetric Matrices


val symmtd_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit
val symmtd_unpack : a:Gsl_vectmat.mat ->
tau:Gsl_vectmat.vec ->
q:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
val symmtd_unpack_T : a:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit

Tridiagonal Decomposition of Hermitian Matrices


val hermtd_decomp : a:Gsl_vectmat.cmat -> tau:Gsl_vectmat.cvec -> unit
val hermtd_unpack : a:Gsl_vectmat.cmat ->
tau:Gsl_vectmat.cvec ->
q:Gsl_vectmat.cmat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
val hermtd_unpack_T : a:Gsl_vectmat.cmat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit

Bidiagonalization


val bidiag_decomp : a:Gsl_vectmat.mat -> tau_u:Gsl_vectmat.vec -> tau_v:Gsl_vectmat.vec -> unit
val bidiag_unpack : a:Gsl_vectmat.mat ->
tau_u:Gsl_vectmat.vec ->
u:Gsl_vectmat.mat ->
tau_v:Gsl_vectmat.vec ->
v:Gsl_vectmat.mat ->
diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit
val bidiag_unpack2 : a:Gsl_vectmat.mat ->
tau_u:Gsl_vectmat.vec -> tau_v:Gsl_vectmat.vec -> v:Gsl_vectmat.mat -> unit
val bidiag_unpack_B : a:Gsl_vectmat.mat ->
diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit

Householder solver


val _HH_solve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val _HH_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
val solve_HH : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
[< `A of float array
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
float array

Tridiagonal Systems


val solve_symm_tridiag : diag:Gsl_vectmat.vec ->
offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val solve_tridiag : diag:Gsl_vectmat.vec ->
abovediag:Gsl_vectmat.vec ->
belowdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val solve_symm_cyc_tridiag : diag:Gsl_vectmat.vec ->
offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
val solve_cyc_tridiag : diag:Gsl_vectmat.vec ->
abovediag:Gsl_vectmat.vec ->
belowdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit

Exponential


val _exponential : Gsl_vectmat.mat -> Gsl_vectmat.mat -> Gsl_fun.mode -> unit
val exponential : ?mode:Gsl_fun.mode ->
[< `A of float array * int * int
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
[ `M of Gsl_matrix.matrix ]
ocamlgsl-0.6.0/doc/type_Gsl_poly.html0000664000076400007640000001564310607755604016343 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_poly sig
  type poly = float array
  external eval : Gsl_poly.poly -> float -> float = "ml_gsl_poly_eval"
  type quad_sol = Quad_0 | Quad_2 of float * float
  external solve_quadratic :
    a:float -> b:float -> c:float -> Gsl_poly.quad_sol
    = "ml_gsl_poly_solve_quadratic"
  external complex_solve_quadratic :
    a:float ->
    b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex
    = "ml_gsl_poly_complex_solve_quadratic"
  type cubic_sol =
      Cubic_0
    | Cubic_1 of float
    | Cubic_3 of float * float * float
  external solve_cubic : a:float -> b:float -> c:float -> Gsl_poly.cubic_sol
    = "ml_gsl_poly_solve_cubic"
  external complex_solve_cubic :
    a:float ->
    b:float ->
    c:float ->
    Gsl_complex.complex * Gsl_complex.complex * Gsl_complex.complex
    = "ml_gsl_poly_complex_solve_cubic"
  val solve : Gsl_poly.poly -> Gsl_complex.complex_array
end
ocamlgsl-0.6.0/doc/type_Gsl_odeiv.html0000664000076400007640000003033710607755606016465 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_odeiv sig
  type system
  val make_system :
    (float -> float array -> float array -> unit) ->
    ?jac:(float -> float array -> Gsl_matrix.matrix -> float array -> unit) ->
    int -> Gsl_odeiv.system
  type step
  type step_kind =
      RK2
    | RK4
    | RKF45
    | RKCK
    | RK8PD
    | RK2IMP
    | RK2SIMP
    | RK4IMP
    | BSIMP
    | GEAR1
    | GEAR2
  val make_step : Gsl_odeiv.step_kind -> dim:int -> Gsl_odeiv.step
  external step_reset : Gsl_odeiv.step -> unit = "ml_gsl_odeiv_step_reset"
  external step_name : Gsl_odeiv.step -> string = "ml_gsl_odeiv_step_name"
  external step_order : Gsl_odeiv.step -> int = "ml_gsl_odeiv_step_order"
  external step_apply :
    Gsl_odeiv.step ->
    t:float ->
    h:float ->
    y:float array ->
    yerr:float array ->
    ?dydt_in:float array -> ?dydt_out:float array -> Gsl_odeiv.system -> unit
    = "ml_gsl_odeiv_step_apply_bc" "ml_gsl_odeiv_step_apply"
  type control
  val make_control_standard_new :
    eps_abs:float ->
    eps_rel:float -> a_y:float -> a_dydt:float -> Gsl_odeiv.control
  val make_control_y_new :
    eps_abs:float -> eps_rel:float -> Gsl_odeiv.control
  val make_control_yp_new :
    eps_abs:float -> eps_rel:float -> Gsl_odeiv.control
  val make_control_scaled_new :
    eps_abs:float ->
    eps_rel:float ->
    a_y:float -> a_dydt:float -> scale_abs:float array -> Gsl_odeiv.control
  external control_name : Gsl_odeiv.control -> string
    = "ml_gsl_odeiv_control_name"
  type hadjust = HADJ_DEC | HADJ_NIL | HADJ_INC
  external control_hadjust :
    Gsl_odeiv.control ->
    Gsl_odeiv.step ->
    y:float array ->
    yerr:float array ->
    dydt:float array -> h:float -> Gsl_odeiv.hadjust * float
    = "ml_gsl_odeiv_control_hadjust_bc" "ml_gsl_odeiv_control_hadjust"
  type evolve
  val make_evolve : int -> Gsl_odeiv.evolve
  external evolve_reset : Gsl_odeiv.evolve -> unit
    = "ml_gsl_odeiv_evolve_reset"
  external evolve_apply :
    Gsl_odeiv.evolve ->
    Gsl_odeiv.control ->
    Gsl_odeiv.step ->
    Gsl_odeiv.system ->
    t:float -> t1:float -> h:float -> y:float array -> float * float
    = "ml_gsl_odeiv_evolve_apply_bc" "ml_gsl_odeiv_evolve_apply"
end
ocamlgsl-0.6.0/doc/Gsl_error.html0000664000076400007640000004653110607755576015460 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_error

Module Gsl_error


module Gsl_error: sig .. end
Error reporting

val version : string
version of GSL library

type errno =
| CONTINUE (*iteration has not converged*)
| FAILURE
| EDOM (*input domain error, e.g sqrt(-1)*)
| ERANGE (*output range error, e.g. exp(1e100)*)
| EFAULT (*invalid pointer*)
| EINVAL (*invalid argument supplied by user*)
| EFAILED (*generic failure*)
| EFACTOR (*factorization failed*)
| ESANITY (*sanity check failed - shouldn't happen*)
| ENOMEM (*malloc failed*)
| EBADFUNC (*problem with user-supplied function*)
| ERUNAWAY (*iterative process is out of control*)
| EMAXITER (*exceeded max number of iterations*)
| EZERODIV (*tried to divide by zero*)
| EBADTOL (*user specified an invalid tolerance*)
| ETOL (*failed to reach the specified tolerance*)
| EUNDRFLW (*underflow*)
| EOVRFLW (*overflow*)
| ELOSS (*loss of accuracy*)
| EROUND (*failed because of roundoff error*)
| EBADLEN (*matrix, vector lengths are not conformant*)
| ENOTSQR (*matrix not square*)
| ESING (*apparent singularity detected*)
| EDIVERGE (*integral or series is divergent*)
| EUNSUP (*requested feature is not supported by the hardware*)
| EUNIMPL (*requested feature not (yet) implemented*)
| ECACHE (*cache limit exceeded*)
| ETABLE (*table limit exceeded*)
| ENOPROG (*iteration is not making progress towards solution*)
| ENOPROGJ (*jacobian evaluations are not improving the solution*)
| ETOLF (*cannot reach the specified tolerance in F*)
| ETOLX (*cannot reach the specified tolerance in X*)
| ETOLG (*cannot reach the specified tolerance in gradient*)
| EOF (*end of file*)
exception Gsl_exn of (errno * string)
val init : unit -> unit
val uninit : unit -> unit
val strerror : errno -> string
val string_of_errno : errno -> string
val pprint_exn : exn -> string
val handle_exn : ('a -> 'b) -> 'a -> 'b
ocamlgsl-0.6.0/doc/Gsl_bspline.html0000664000076400007640000001252710607755606015753 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_bspline

Module Gsl_bspline


module Gsl_bspline: sig .. end
Basis Splines

type ws 
val make : k:int -> nbreak:int -> ws
val ncoeffs : ws -> int
val knots : [< Gsl_vectmat.vec ] -> ws -> unit
val knots_uniform : a:float -> b:float -> ws -> unit
val _eval : float -> [< Gsl_vectmat.vec ] -> ws -> unit
val eval : ws -> float -> [> Gsl_vectmat.vec ]
ocamlgsl-0.6.0/doc/type_Gsl_multiroot.Deriv.html0000664000076400007640000001676410607755605020474 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot.Deriv sig
  type kind = HYBRIDSJ | HYBRIDJ | NEWTON | GNEWTON
  type t
  val make :
    Gsl_multiroot.Deriv.kind ->
    int ->
    Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> Gsl_multiroot.Deriv.t
  external name : Gsl_multiroot.Deriv.t -> string
    = "ml_gsl_multiroot_fdfsolver_name"
  external iterate : Gsl_multiroot.Deriv.t -> unit
    = "ml_gsl_multiroot_fdfsolver_iterate"
  external root : Gsl_multiroot.Deriv.t -> Gsl_vector.vector -> unit
    = "ml_gsl_multiroot_fdfsolver_root"
  external get_state :
    Gsl_multiroot.Deriv.t ->
    ?x:Gsl_vector.vector ->
    ?f:Gsl_vector.vector ->
    ?j:Gsl_matrix.matrix -> ?dx:Gsl_vector.vector -> unit -> unit
    = "ml_gsl_multiroot_fdfsolver_get_state_bc"
    "ml_gsl_multiroot_fdfsolver_get_state"
  external test_delta :
    Gsl_multiroot.Deriv.t -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_multiroot_test_delta_fdf"
  external test_residual : Gsl_multiroot.Deriv.t -> epsabs:float -> bool
    = "ml_gsl_multiroot_test_residual_fdf"
end
ocamlgsl-0.6.0/doc/Gsl_poly.html0000664000076400007640000001727010607755604015300 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_poly

Module Gsl_poly


module Gsl_poly: sig .. end
Polynomials

type poly = float array 

Polynomial Evaluation


val eval : poly -> float -> float

Quadratic Equations



type quad_sol =
| Quad_0
| Quad_2 of float * float
val solve_quadratic : a:float -> b:float -> c:float -> quad_sol
val complex_solve_quadratic : a:float -> b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex

Cubic Equations



type cubic_sol =
| Cubic_0
| Cubic_1 of float
| Cubic_3 of float * float * float
val solve_cubic : a:float -> b:float -> c:float -> cubic_sol
val complex_solve_cubic : a:float ->
b:float ->
c:float -> Gsl_complex.complex * Gsl_complex.complex * Gsl_complex.complex

General Polynomial Equations


val solve : poly -> Gsl_complex.complex_array
ocamlgsl-0.6.0/doc/Gsl_sort.html0000664000076400007640000001546410607755603015306 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sort

Module Gsl_sort


module Gsl_sort: sig .. end
Sorting

val vector : Gsl_vector.vector -> unit
val vector_index : Gsl_vector.vector -> Gsl_permut.permut
val vector_smallest : int -> Gsl_vector.vector -> float array
val vector_largest : int -> Gsl_vector.vector -> float array
val vector_smallest_index : int -> Gsl_vector.vector -> Gsl_permut.permut
val vector_largest_index : int -> Gsl_vector.vector -> Gsl_permut.permut
val vector_flat : Gsl_vector_flat.vector -> unit
val vector_flat_index : Gsl_vector_flat.vector -> Gsl_permut.permut
val vector_flat_smallest : int -> Gsl_vector_flat.vector -> float array
val vector_flat_largest : int -> Gsl_vector_flat.vector -> float array
val vector_flat_smallest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut
val vector_flat_largest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut
ocamlgsl-0.6.0/doc/type_Gsl_multifit.html0000664000076400007640000001671510607755604017216 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multifit sig
  type ws
  val make : n:int -> p:int -> Gsl_multifit.ws
  external _linear :
    ?weight:Gsl_vectmat.vec ->
    x:Gsl_vectmat.mat ->
    y:Gsl_vectmat.vec ->
    c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> Gsl_multifit.ws -> float
    = "ml_gsl_multifit_linear_bc" "ml_gsl_multifit_linear"
  external _linear_svd :
    ?weight:Gsl_vectmat.vec ->
    x:Gsl_vectmat.mat ->
    y:Gsl_vectmat.vec ->
    tol:float ->
    c:Gsl_vectmat.vec ->
    cov:Gsl_vectmat.mat -> Gsl_multifit.ws -> int * float
    = "ml_gsl_multifit_linear_svd_bc" "ml_gsl_multifit_linear_svd"
  val linear :
    ?weight:Gsl_vectmat.vec ->
    Gsl_vectmat.mat ->
    Gsl_vectmat.vec -> Gsl_vector.vector * Gsl_matrix.matrix * float
  external linear_est :
    x:Gsl_vectmat.vec ->
    c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> Gsl_fun.result
    = "ml_gsl_multifit_linear_est"
  val fit_poly :
    ?weight:float array ->
    x:float array ->
    y:float array -> int -> float array * float array array * float
end
ocamlgsl-0.6.0/doc/Gsl_matrix_complex.Single.html0000664000076400007640000002602510607755577020577 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex.Single

Module Gsl_matrix_complex.Single


module Single: sig .. end

type complex_float_mat_bigarr = (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout) Bigarray.Array2.t 
type matrix = complex_float_mat_bigarr 
val create : ?init:Gsl_complex.complex -> int -> int -> matrix
val dims : matrix -> int * int
val of_array : Gsl_complex.complex array -> int -> int -> matrix
val of_arrays : Gsl_complex.complex array array -> matrix
val to_array : matrix -> Gsl_complex.complex array
val to_arrays : matrix -> Gsl_complex.complex array array
val of_complex_array : Gsl_complex.complex_array -> int -> int -> matrix
val to_complex_array : matrix -> Gsl_complex.complex_array
val get : matrix -> int -> int -> Gsl_complex.complex
val set : matrix -> int -> int -> Gsl_complex.complex -> unit
val set_all : matrix -> Gsl_complex.complex -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix ->
dst:matrix -> unit
val copy : matrix -> matrix
val row : matrix -> int -> Gsl_vector_complex.Single.vector
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> Gsl_complex.complex -> unit
val add_constant : matrix -> Gsl_complex.complex -> unit
val add_diagonal : matrix -> Gsl_complex.complex -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
ocamlgsl-0.6.0/doc/Gsl_math.html0000664000076400007640000001732210607755576015254 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_math

Module Gsl_math


module Gsl_math: sig .. end
Mathematical constants and some simple functions


Constants


val e : float
e
val log2e : float
log_2 (e)
val log10e : float
log_10 (e)
val sqrt2 : float
sqrt(2)
val sqrt1_2 : float
sqrt(1/2)
val sqrt3 : float
sqrt(3)
val pi : float
pi
val pi_2 : float
pi/2
val pi_4 : float
pi/4
val sqrtpi : float
sqrt(pi)
val i_2_sqrtpi : float
2/sqrt(pi)
val i_1_pi : float
1/pi
val i_2_pi : float
2/pi
val ln10 : float
ln(10)
val ln2 : float
ln(2)
val lnpi : float
ln(pi)
val euler : float
Euler constant

Simple Functions


val pow_int : float -> int -> float
val log1p : float -> float
val expm1 : float -> float
val hypot : float -> float -> float
val acosh : float -> float
val asinh : float -> float
val atanh : float -> float
val fcmp : float -> float -> epsilon:float -> int
ocamlgsl-0.6.0/doc/Gsl_matrix_complex_flat.html0000664000076400007640000003326210607755577020366 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex_flat

Module Gsl_matrix_complex_flat


module Gsl_matrix_complex_flat: sig .. end
Matrices of complex number simplemented with float array


type complex_mat_flat = private {
   data : float array;
   off : int;
   dim1 : int;
   dim2 : int;
   tda : int;
}
type matrix = complex_mat_flat 
val create : ?init:Gsl_complex.complex -> int -> int -> matrix
val dims : matrix -> int * int
val of_arrays : Gsl_complex.complex array array -> matrix
val of_array : Gsl_complex.complex array -> int -> int -> matrix
val to_arrays : matrix -> Gsl_complex.complex array array
val to_array : matrix -> Gsl_complex.complex array
val of_complex_array : float array -> int -> int -> matrix
val to_complex_array : matrix -> Gsl_complex.complex_array
val get : matrix -> int -> int -> Gsl_complex.complex
val set : matrix -> int -> int -> Gsl_complex.complex -> unit
val set_all : matrix -> Gsl_complex.complex -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix ->
dst:matrix -> unit
val copy : matrix -> matrix
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> float -> unit
val add_constant : matrix -> float -> unit
val add_diagonal : matrix -> Gsl_complex.complex -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
val submatrix : matrix ->
k1:int -> k2:int -> n1:int -> n2:int -> matrix
val row : matrix -> int -> Gsl_vector_complex_flat.vector
val column : matrix -> int -> Gsl_vector_complex_flat.vector
val diagonal : matrix -> Gsl_vector_complex_flat.vector
val subdiagonal : matrix -> int -> Gsl_vector_complex_flat.vector
val superdiagonal : matrix -> int -> Gsl_vector_complex_flat.vector
val view_complex_array : Gsl_complex.complex_array ->
?off:int -> int -> ?tda:int -> int -> matrix
val view_vector : Gsl_vector_complex_flat.vector ->
?off:int -> int -> ?tda:int -> int -> matrix
ocamlgsl-0.6.0/doc/type_Gsl_complex.html0000664000076400007640000005542710607755576017043 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_complex sig
  type complex = Complex.t = { re : float; im : float; }
  val complex : re:float -> im:float -> Gsl_complex.complex
  type complex_array = float array
  val set : Gsl_complex.complex_array -> int -> Gsl_complex.complex -> unit
  val get : Gsl_complex.complex_array -> int -> Gsl_complex.complex
  val unpack : Gsl_complex.complex_array -> Gsl_complex.complex array
  val pack : Gsl_complex.complex array -> Gsl_complex.complex_array
  val mult : Gsl_complex.complex_array -> Gsl_complex.complex_array -> unit
  val rect : float -> float -> Gsl_complex.complex
  val polar : float -> float -> Gsl_complex.complex
  val arg : Gsl_complex.complex -> float
  val abs : Gsl_complex.complex -> float
  val abs2 : Gsl_complex.complex -> float
  external logabs : Gsl_complex.complex -> float = "ml_gsl_complex_logabs"
  val add : Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
  val sub : Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
  val mul : Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
  val div : Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
  val add_real : Gsl_complex.complex -> float -> Gsl_complex.complex
  val sub_real : Gsl_complex.complex -> float -> Gsl_complex.complex
  val mul_real : Gsl_complex.complex -> float -> Gsl_complex.complex
  val div_real : Gsl_complex.complex -> float -> Gsl_complex.complex
  val add_imag : Gsl_complex.complex -> float -> Gsl_complex.complex
  val sub_imag : Gsl_complex.complex -> float -> Gsl_complex.complex
  val mul_imag : Gsl_complex.complex -> float -> Gsl_complex.complex
  val div_imag : Gsl_complex.complex -> float -> Gsl_complex.complex
  val conjugate : Gsl_complex.complex -> Gsl_complex.complex
  val inverse : Gsl_complex.complex -> Gsl_complex.complex
  val negative : Gsl_complex.complex -> Gsl_complex.complex
  external sqrt : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_sqrt"
  external sqrt_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_sqrt_real"
  external pow :
    Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_pow"
  external pow_real : Gsl_complex.complex -> float -> Gsl_complex.complex
    = "ml_gsl_complex_pow_real"
  external exp : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_exp"
  external log : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_log"
  external log10 : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_log10"
  external log_b :
    Gsl_complex.complex -> Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_log_b"
  external sin : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_sin"
  external cos : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_cos"
  external tan : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_tan"
  external sec : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_sec"
  external csc : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_csc"
  external cot : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_cot"
  external arcsin : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arcsin"
  external arcsin_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arcsin_real"
  external arccos : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccos"
  external arccos_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arccos_real"
  external arctan : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arctan"
  external arcsec : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arcsec"
  external arcsec_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arcsec_real"
  external arccsc : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccsc"
  external arccsc_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arccsc_real"
  external arccot : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccot"
  external sinh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_sinh"
  external cosh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_cosh"
  external tanh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_tanh"
  external sech : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_sech"
  external csch : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_csch"
  external coth : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_coth"
  external arcsinh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arcsinh"
  external arccosh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccosh"
  external arccosh_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arccosh_real"
  external arctanh : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arctanh"
  external arctanh_real : float -> Gsl_complex.complex
    = "ml_gsl_complex_arctanh_real"
  external arcsech : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arcsech"
  external arccsch : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccsch"
  external arccoth : Gsl_complex.complex -> Gsl_complex.complex
    = "ml_gsl_complex_arccoth"
end
ocamlgsl-0.6.0/doc/type_Gsl_matrix.Single.html0000664000076400007640000003263410607755577020114 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix.Single sig
  type float_mat_bigarr =
      (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t
  type matrix = Gsl_matrix.Single.float_mat_bigarr
  val create : ?init:float -> int -> int -> Gsl_matrix.Single.matrix
  val dims : Gsl_matrix.Single.matrix -> int * int
  val of_array : float array -> int -> int -> Gsl_matrix.Single.matrix
  val of_arrays : float array array -> Gsl_matrix.Single.matrix
  val to_array : Gsl_matrix.Single.matrix -> float array
  val to_arrays : Gsl_matrix.Single.matrix -> float array array
  val get : Gsl_matrix.Single.matrix -> int -> int -> float
  val set : Gsl_matrix.Single.matrix -> int -> int -> float -> unit
  val set_all : Gsl_matrix.Single.matrix -> float -> unit
  val set_zero : Gsl_matrix.Single.matrix -> unit
  val set_id : Gsl_matrix.Single.matrix -> unit
  val memcpy :
    src:Gsl_matrix.Single.matrix -> dst:Gsl_matrix.Single.matrix -> unit
  val copy : Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix
  val row : Gsl_matrix.Single.matrix -> int -> Gsl_vector.Single.vector
  external add : Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_add"
  external sub : Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_sub"
  external mul_elements :
    Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_mul"
  external div_elements :
    Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_div"
  external scale : Gsl_matrix.Single.matrix -> float -> unit
    = "ml_gsl_matrix_float_scale"
  external add_constant : Gsl_matrix.Single.matrix -> float -> unit
    = "ml_gsl_matrix_float_add_constant"
  external add_diagonal : Gsl_matrix.Single.matrix -> float -> unit
    = "ml_gsl_matrix_float_add_diagonal"
  external is_null : Gsl_matrix.Single.matrix -> bool
    = "ml_gsl_matrix_float_isnull"
  external swap_rows : Gsl_matrix.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_float_swap_rows"
  external swap_columns : Gsl_matrix.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_float_swap_columns"
  external swap_rowcol : Gsl_matrix.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_float_swap_rowcol"
  external transpose :
    Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_transpose_memcpy"
  external transpose_in_place : Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_matrix_float_transpose"
end
ocamlgsl-0.6.0/doc/Gsl_fun.html0000664000076400007640000002633010607755603015101 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fun

Module Gsl_fun


module Gsl_fun: sig .. end
Callbacks and types for error estimates


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.
val smash : result_e10 -> result

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 
type multi_fun = x:Gsl_vector.vector -> f:Gsl_vector.vector -> unit 

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

type multim_fun_fdf = {
   multim_f : x:Gsl_vector.vector -> float;
   multim_df : x:Gsl_vector.vector -> g:Gsl_vector.vector -> unit;
   multim_fdf : x:Gsl_vector.vector -> g:Gsl_vector.vector -> float;
} ocamlgsl-0.6.0/doc/Gsl_blas_gen.Complex.html0000664000076400007640000003566010607755602017476 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_gen.Complex

Module Gsl_blas_gen.Complex


module Complex: sig .. end

val dotu : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
val dotc : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
val nrm2 : [< Gsl_vectmat.cvec ] -> float
val asum : [< Gsl_vectmat.cvec ] -> float
val iamax : [< Gsl_vectmat.cvec ] -> int
val swap : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
val copy : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
val axpy : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
val scal : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> unit
val zdscal : float -> [< Gsl_vectmat.cvec ] -> unit
val gemv : Gsl_blas_gen.transpose ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
x:[< Gsl_vectmat.cvec ] ->
beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
val trmv : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
Gsl_blas_gen.diag ->
a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
val trsv : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
Gsl_blas_gen.diag ->
a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
val hemv : Gsl_blas_gen.uplo ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
x:[< Gsl_vectmat.cvec ] ->
beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
val geru : alpha:Gsl_complex.complex ->
x:[< Gsl_vectmat.cvec ] ->
y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
val gerc : alpha:Gsl_complex.complex ->
x:[< Gsl_vectmat.cvec ] ->
y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
val her : Gsl_blas_gen.uplo ->
alpha:float -> x:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
val her2 : Gsl_blas_gen.uplo ->
alpha:Gsl_complex.complex ->
x:[< Gsl_vectmat.cvec ] ->
y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
val gemm : ta:Gsl_blas_gen.transpose ->
tb:Gsl_blas_gen.transpose ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
b:[< Gsl_vectmat.cmat ] ->
beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
val symm : Gsl_blas_gen.side ->
Gsl_blas_gen.uplo ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
b:[< Gsl_vectmat.cmat ] ->
beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
val syrk : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
val syr2k : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
b:[< Gsl_vectmat.cmat ] ->
beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
val trmm : Gsl_blas_gen.side ->
Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
Gsl_blas_gen.diag ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
val trsm : Gsl_blas_gen.side ->
Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
Gsl_blas_gen.diag ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
val hemm : Gsl_blas_gen.side ->
Gsl_blas_gen.uplo ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
b:[< Gsl_vectmat.cmat ] ->
beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
val herk : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
alpha:float ->
a:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
val her2k : Gsl_blas_gen.uplo ->
Gsl_blas_gen.transpose ->
alpha:Gsl_complex.complex ->
a:[< Gsl_vectmat.cmat ] ->
b:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
ocamlgsl-0.6.0/doc/type_Gsl_matrix_complex.Single.html0000664000076400007640000003735310607755577021646 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex.Single sig
  type complex_float_mat_bigarr =
      (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout)
      Bigarray.Array2.t
  type matrix = Gsl_matrix_complex.Single.complex_float_mat_bigarr
  val create :
    ?init:Gsl_complex.complex ->
    int -> int -> Gsl_matrix_complex.Single.matrix
  val dims : Gsl_matrix_complex.Single.matrix -> int * int
  val of_array :
    Gsl_complex.complex array ->
    int -> int -> Gsl_matrix_complex.Single.matrix
  val of_arrays :
    Gsl_complex.complex array array -> Gsl_matrix_complex.Single.matrix
  val to_array :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex array
  val to_arrays :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex array array
  val of_complex_array :
    Gsl_complex.complex_array ->
    int -> int -> Gsl_matrix_complex.Single.matrix
  val to_complex_array :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex_array
  val get :
    Gsl_matrix_complex.Single.matrix -> int -> int -> Gsl_complex.complex
  val set :
    Gsl_matrix_complex.Single.matrix ->
    int -> int -> Gsl_complex.complex -> unit
  val set_all :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
  val set_zero : Gsl_matrix_complex.Single.matrix -> unit
  val set_id : Gsl_matrix_complex.Single.matrix -> unit
  val memcpy :
    src:Gsl_matrix_complex.Single.matrix ->
    dst:Gsl_matrix_complex.Single.matrix -> unit
  val copy :
    Gsl_matrix_complex.Single.matrix -> Gsl_matrix_complex.Single.matrix
  val row :
    Gsl_matrix_complex.Single.matrix ->
    int -> Gsl_vector_complex.Single.vector
  external add :
    Gsl_matrix_complex.Single.matrix ->
    Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_add"
  external sub :
    Gsl_matrix_complex.Single.matrix ->
    Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_sub"
  external mul_elements :
    Gsl_matrix_complex.Single.matrix ->
    Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_mul"
  external div_elements :
    Gsl_matrix_complex.Single.matrix ->
    Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_div"
  external scale :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_float_scale"
  external add_constant :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_float_add_constant"
  external add_diagonal :
    Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_float_add_diagonal"
  external is_null : Gsl_matrix_complex.Single.matrix -> bool
    = "ml_gsl_matrix_complex_float_isnull"
  external swap_rows : Gsl_matrix_complex.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_float_swap_rows"
  external swap_columns :
    Gsl_matrix_complex.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_float_swap_columns"
  external swap_rowcol :
    Gsl_matrix_complex.Single.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_float_swap_rowcol"
  external transpose :
    Gsl_matrix_complex.Single.matrix ->
    Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_transpose_memcpy"
  external transpose_in_place : Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_matrix_complex_float_transpose"
end
ocamlgsl-0.6.0/doc/type_Gsl_matrix_complex.html0000664000076400007640000006772010607755577020427 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex sig
  type complex_mat_bigarr =
      (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout)
      Bigarray.Array2.t
  type matrix = Gsl_matrix_complex.complex_mat_bigarr
  val create :
    ?init:Gsl_complex.complex -> int -> int -> Gsl_matrix_complex.matrix
  val dims : Gsl_matrix_complex.matrix -> int * int
  val of_array :
    Gsl_complex.complex array -> int -> int -> Gsl_matrix_complex.matrix
  val of_arrays :
    Gsl_complex.complex array array -> Gsl_matrix_complex.matrix
  val to_array : Gsl_matrix_complex.matrix -> Gsl_complex.complex array
  val to_arrays :
    Gsl_matrix_complex.matrix -> Gsl_complex.complex array array
  val of_complex_array :
    Gsl_complex.complex_array -> int -> int -> Gsl_matrix_complex.matrix
  val to_complex_array :
    Gsl_matrix_complex.matrix -> Gsl_complex.complex_array
  val get : Gsl_matrix_complex.matrix -> int -> int -> Gsl_complex.complex
  val set :
    Gsl_matrix_complex.matrix -> int -> int -> Gsl_complex.complex -> unit
  val set_all : Gsl_matrix_complex.matrix -> Gsl_complex.complex -> unit
  val set_zero : Gsl_matrix_complex.matrix -> unit
  val set_id : Gsl_matrix_complex.matrix -> unit
  val memcpy :
    src:Gsl_matrix_complex.matrix -> dst:Gsl_matrix_complex.matrix -> unit
  val copy : Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix
  val row : Gsl_matrix_complex.matrix -> int -> Gsl_vector_complex.vector
  external add :
    Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_add"
  external sub :
    Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_sub"
  external mul_elements :
    Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_mul"
  external div_elements :
    Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_div"
  external scale : Gsl_matrix_complex.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_scale"
  external add_constant :
    Gsl_matrix_complex.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_add_constant"
  external add_diagonal :
    Gsl_matrix_complex.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_add_diagonal"
  external is_null : Gsl_matrix_complex.matrix -> bool
    = "ml_gsl_matrix_complex_isnull"
  external swap_rows : Gsl_matrix_complex.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_rows"
  external swap_columns : Gsl_matrix_complex.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_columns"
  external swap_rowcol : Gsl_matrix_complex.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_rowcol"
  external transpose :
    Gsl_matrix_complex.matrix -> Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_transpose_memcpy"
  external transpose_in_place : Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_matrix_complex_transpose"
  module Single :
    sig
      type complex_float_mat_bigarr =
          (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout)
          Bigarray.Array2.t
      type matrix = Gsl_matrix_complex.Single.complex_float_mat_bigarr
      val create :
        ?init:Gsl_complex.complex ->
        int -> int -> Gsl_matrix_complex.Single.matrix
      val dims : Gsl_matrix_complex.Single.matrix -> int * int
      val of_array :
        Gsl_complex.complex array ->
        int -> int -> Gsl_matrix_complex.Single.matrix
      val of_arrays :
        Gsl_complex.complex array array -> Gsl_matrix_complex.Single.matrix
      val to_array :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex array
      val to_arrays :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex array array
      val of_complex_array :
        Gsl_complex.complex_array ->
        int -> int -> Gsl_matrix_complex.Single.matrix
      val to_complex_array :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex_array
      val get :
        Gsl_matrix_complex.Single.matrix -> int -> int -> Gsl_complex.complex
      val set :
        Gsl_matrix_complex.Single.matrix ->
        int -> int -> Gsl_complex.complex -> unit
      val set_all :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
      val set_zero : Gsl_matrix_complex.Single.matrix -> unit
      val set_id : Gsl_matrix_complex.Single.matrix -> unit
      val memcpy :
        src:Gsl_matrix_complex.Single.matrix ->
        dst:Gsl_matrix_complex.Single.matrix -> unit
      val copy :
        Gsl_matrix_complex.Single.matrix -> Gsl_matrix_complex.Single.matrix
      val row :
        Gsl_matrix_complex.Single.matrix ->
        int -> Gsl_vector_complex.Single.vector
      external add :
        Gsl_matrix_complex.Single.matrix ->
        Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_add"
      external sub :
        Gsl_matrix_complex.Single.matrix ->
        Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_sub"
      external mul_elements :
        Gsl_matrix_complex.Single.matrix ->
        Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_mul"
      external div_elements :
        Gsl_matrix_complex.Single.matrix ->
        Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_div"
      external scale :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
        = "ml_gsl_matrix_complex_float_scale"
      external add_constant :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
        = "ml_gsl_matrix_complex_float_add_constant"
      external add_diagonal :
        Gsl_matrix_complex.Single.matrix -> Gsl_complex.complex -> unit
        = "ml_gsl_matrix_complex_float_add_diagonal"
      external is_null : Gsl_matrix_complex.Single.matrix -> bool
        = "ml_gsl_matrix_complex_float_isnull"
      external swap_rows :
        Gsl_matrix_complex.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_complex_float_swap_rows"
      external swap_columns :
        Gsl_matrix_complex.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_complex_float_swap_columns"
      external swap_rowcol :
        Gsl_matrix_complex.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_complex_float_swap_rowcol"
      external transpose :
        Gsl_matrix_complex.Single.matrix ->
        Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_transpose_memcpy"
      external transpose_in_place : Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_matrix_complex_float_transpose"
    end
end
ocamlgsl-0.6.0/doc/type_Gsl_interp.html0000664000076400007640000002472610607755604016663 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_interp sig
  type t
  type accel
  type interp_type =
      LINEAR
    | POLYNOMIAL
    | CSPLINE
    | CSPLINE_PERIODIC
    | AKIMA
    | AKIMA_PERIODIC
  val make : Gsl_interp.interp_type -> int -> Gsl_interp.t
  val init : Gsl_interp.t -> float array -> float array -> unit
  external name : Gsl_interp.t -> string = "ml_gsl_interp_name"
  external min_size : Gsl_interp.t -> int = "ml_gsl_interp_min_size"
  val make_accel : unit -> Gsl_interp.accel
  external i_eval :
    Gsl_interp.t ->
    float array -> float array -> float -> Gsl_interp.accel -> float
    = "ml_gsl_interp_eval"
  external i_eval_deriv :
    Gsl_interp.t ->
    float array -> float array -> float -> Gsl_interp.accel -> float
    = "ml_gsl_interp_eval_deriv"
  external i_eval_deriv2 :
    Gsl_interp.t ->
    float array -> float array -> float -> Gsl_interp.accel -> float
    = "ml_gsl_interp_eval_deriv2"
  external i_eval_integ :
    Gsl_interp.t ->
    float array -> float array -> float -> float -> Gsl_interp.accel -> float
    = "ml_gsl_interp_eval_integ_bc" "ml_gsl_interp_eval_integ"
  type interp = {
    interp : Gsl_interp.t;
    accel : Gsl_interp.accel;
    xa : float array;
    ya : float array;
    size : int;
    i_type : Gsl_interp.interp_type;
  }
  val make_interp :
    Gsl_interp.interp_type -> float array -> float array -> Gsl_interp.interp
  val eval : Gsl_interp.interp -> float -> float
  external eval_array :
    Gsl_interp.interp -> float array -> float array -> unit
    = "ml_gsl_interp_eval_array"
  val eval_deriv : Gsl_interp.interp -> float -> float
  val eval_deriv2 : Gsl_interp.interp -> float -> float
  val eval_integ : Gsl_interp.interp -> float -> float -> float
end
ocamlgsl-0.6.0/doc/Gsl_multimin.NoDeriv.html0000664000076400007640000001344410607755605017520 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin.NoDeriv

Module Gsl_multimin.NoDeriv


module NoDeriv: sig .. end


type kind =
| NM_SIMPLEX
type t 
val make : kind ->
int ->
Gsl_fun.multim_fun ->
x:Gsl_vector.vector -> step_size:Gsl_vector.vector -> t
val name : t -> string
val iterate : t -> unit
val minimum : ?x:Gsl_vector.vector -> t -> float
val size : t -> float
val test_size : t -> float -> bool
ocamlgsl-0.6.0/doc/type_Gsl_fft.Real.html0000664000076400007640000001275210607755605017020 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Real sig
  type workspace
  type wavetable
  val make_workspace : int -> Gsl_fft.Real.workspace
  val make_wavetable : int -> Gsl_fft.Real.wavetable
  external transform :
    ?stride:int ->
    Gsl_fft.fft_array ->
    Gsl_fft.Real.wavetable -> Gsl_fft.Real.workspace -> unit
    = "ml_gsl_fft_real_transform"
  external transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
    = "ml_gsl_fft_real_radix2_transform"
  val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
end
ocamlgsl-0.6.0/doc/Gsl_blas_flat.html0000664000076400007640000003575210607755601016246 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_flat

Module Gsl_blas_flat


module Gsl_blas_flat: sig .. end

type order = Gsl_blas.order = 
| RowMajor
| ColMajor
type transpose = Gsl_blas.transpose = 
| NoTrans
| Trans
| ConjTrans
type uplo = Gsl_blas.uplo = 
| Upper
| Lower
type diag = Gsl_blas.diag = 
| NonUnit
| Unit
type side = Gsl_blas.side = 
| Left
| Right
val dot : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> float
val nrm2 : Gsl_vector_flat.vector -> float
val asum : Gsl_vector_flat.vector -> float
val iamax : Gsl_vector_flat.vector -> int
val swap : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
val copy : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
val axpy : float -> Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
val rot : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> float -> float -> unit
val scal : float -> Gsl_vector_flat.vector -> unit
val gemv : transpose ->
alpha:float ->
a:Gsl_matrix_flat.matrix ->
x:Gsl_vector_flat.vector -> beta:float -> y:Gsl_vector_flat.vector -> unit
val trmv : uplo ->
transpose ->
diag ->
a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit
val trsv : uplo ->
transpose ->
diag ->
a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit
val symv : uplo ->
alpha:float ->
a:Gsl_matrix_flat.matrix ->
x:Gsl_vector_flat.vector -> beta:float -> y:Gsl_vector_flat.vector -> unit
val dger : alpha:float ->
x:Gsl_vector_flat.vector ->
y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
val syr : uplo ->
alpha:float -> x:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
val syr2 : uplo ->
alpha:float ->
x:Gsl_vector_flat.vector ->
y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
val gemm : ta:transpose ->
tb:transpose ->
alpha:float ->
a:Gsl_matrix_flat.matrix ->
b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit
val symm : side ->
uplo ->
alpha:float ->
a:Gsl_matrix_flat.matrix ->
b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit
val trmm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit
val trsm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit
val syrk : uplo ->
transpose ->
alpha:float ->
a:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit
val syr2k : uplo ->
transpose ->
alpha:float ->
a:Gsl_matrix_flat.matrix ->
b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit
module Complex: sig .. end
ocamlgsl-0.6.0/doc/type_Gsl_blas_gen.html0000664000076400007640000012443510607755603017131 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_gen sig
  type order = Gsl_blas.order = RowMajor | ColMajor
  type transpose = Gsl_blas.transpose = NoTrans | Trans | ConjTrans
  type uplo = Gsl_blas.uplo = Upper | Lower
  type diag = Gsl_blas.diag = NonUnit | Unit
  type side = Gsl_blas.side = Left | Right
  external dot : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float
    = "ml_gsl_blas_ddot"
  external nrm2 : [< Gsl_vectmat.vec ] -> float = "ml_gsl_blas_dnrm2"
  external asum : [< Gsl_vectmat.vec ] -> float = "ml_gsl_blas_dasum"
  external iamax : [< Gsl_vectmat.vec ] -> int = "ml_gsl_blas_idamax"
  external swap : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dswap"
  external copy : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dcopy"
  external axpy :
    float -> [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_daxpy"
  external rot :
    [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float -> float -> unit
    = "ml_gsl_blas_drot"
  external scal : float -> [< Gsl_vectmat.vec ] -> unit = "ml_gsl_blas_dscal"
  external gemv :
    Gsl_blas_gen.transpose ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] ->
    x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv"
  external trmv :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dtrmv"
  external trsv :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dtrsv"
  external symv :
    Gsl_blas_gen.uplo ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] ->
    x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv"
  external dger :
    alpha:float ->
    x:[< Gsl_vectmat.vec ] ->
    y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dger"
  external syr :
    Gsl_blas_gen.uplo ->
    alpha:float -> x:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dsyr"
  external syr2 :
    Gsl_blas_gen.uplo ->
    alpha:float ->
    x:[< Gsl_vectmat.vec ] ->
    y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dsyr2"
  external gemm :
    ta:Gsl_blas_gen.transpose ->
    tb:Gsl_blas_gen.transpose ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] ->
    b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm"
  external symm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] ->
    b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm"
  external trmm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm"
  external trsm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm"
  external syrk :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk"
  external syr2k :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:float ->
    a:[< Gsl_vectmat.mat ] ->
    b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k"
  module Complex :
    sig
      external dotu :
        [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
        = "ml_gsl_blas_zdotu"
      external dotc :
        [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
        = "ml_gsl_blas_zdotc"
      external nrm2 : [< Gsl_vectmat.cvec ] -> float = "ml_gsl_blas_znrm2"
      external asum : [< Gsl_vectmat.cvec ] -> float = "ml_gsl_blas_zasum"
      external iamax : [< Gsl_vectmat.cvec ] -> int = "ml_gsl_blas_izamax"
      external swap : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zswap"
      external copy : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zcopy"
      external axpy :
        Gsl_complex.complex ->
        [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zaxpy"
      external scal : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zscal"
      external zdscal : float -> [< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zdscal"
      external gemv :
        Gsl_blas_gen.transpose ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        x:[< Gsl_vectmat.cvec ] ->
        beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
      external trmv :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        Gsl_blas_gen.diag ->
        a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_ztrmv"
      external trsv :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        Gsl_blas_gen.diag ->
        a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_ztrsv"
      external hemv :
        Gsl_blas_gen.uplo ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        x:[< Gsl_vectmat.cvec ] ->
        beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
        = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
      external geru :
        alpha:Gsl_complex.complex ->
        x:[< Gsl_vectmat.cvec ] ->
        y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zgeru"
      external gerc :
        alpha:Gsl_complex.complex ->
        x:[< Gsl_vectmat.cvec ] ->
        y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zgerc"
      external her :
        Gsl_blas_gen.uplo ->
        alpha:float ->
        x:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zher"
      external her2 :
        Gsl_blas_gen.uplo ->
        alpha:Gsl_complex.complex ->
        x:[< Gsl_vectmat.cvec ] ->
        y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zher2"
      external gemm :
        ta:Gsl_blas_gen.transpose ->
        tb:Gsl_blas_gen.transpose ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        b:[< Gsl_vectmat.cmat ] ->
        beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
      external symm :
        Gsl_blas_gen.side ->
        Gsl_blas_gen.uplo ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        b:[< Gsl_vectmat.cmat ] ->
        beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
      external syrk :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
      external syr2k :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        b:[< Gsl_vectmat.cmat ] ->
        beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
      external trmm :
        Gsl_blas_gen.side ->
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        Gsl_blas_gen.diag ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm"
      external trsm :
        Gsl_blas_gen.side ->
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        Gsl_blas_gen.diag ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm"
      external hemm :
        Gsl_blas_gen.side ->
        Gsl_blas_gen.uplo ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        b:[< Gsl_vectmat.cmat ] ->
        beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
      external herk :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        alpha:float ->
        a:[< Gsl_vectmat.cmat ] ->
        beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
      external her2k :
        Gsl_blas_gen.uplo ->
        Gsl_blas_gen.transpose ->
        alpha:Gsl_complex.complex ->
        a:[< Gsl_vectmat.cmat ] ->
        b:[< Gsl_vectmat.cmat ] ->
        beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
        = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
    end
end
ocamlgsl-0.6.0/doc/Gsl_fft.html0000664000076400007640000001555610607755605015102 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft

Module Gsl_fft


module Gsl_fft: sig .. end
Fast Fourier Transforms

exception Wrong_layout

type layout =
| Real
| Halfcomplex
| Halfcomplex_rad2
| Complex

type fft_array = {
   mutable layout : layout;
   data : float array;
}
module Real: sig .. end
module Halfcomplex: sig .. end
module Complex: sig .. end
val unpack : fft_array -> Gsl_complex.complex_array
val hc_mult : fft_array -> fft_array -> unit
val hc_mult_rad2 : fft_array -> fft_array -> unit
ocamlgsl-0.6.0/doc/type_Gsl_multiroot.html0000664000076400007640000003127110607755605017412 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot sig
  module NoDeriv :
    sig
      type kind = HYBRIDS | HYBRID | DNEWTON | BROYDEN
      type t
      val make :
        Gsl_multiroot.NoDeriv.kind ->
        int ->
        Gsl_fun.multi_fun -> Gsl_vector.vector -> Gsl_multiroot.NoDeriv.t
      external name : Gsl_multiroot.NoDeriv.t -> string
        = "ml_gsl_multiroot_fsolver_name"
      external iterate : Gsl_multiroot.NoDeriv.t -> unit
        = "ml_gsl_multiroot_fsolver_iterate"
      external root : Gsl_multiroot.NoDeriv.t -> Gsl_vector.vector -> unit
        = "ml_gsl_multiroot_fsolver_root"
      external get_state :
        Gsl_multiroot.NoDeriv.t ->
        ?x:Gsl_vector.vector ->
        ?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit
        = "ml_gsl_multiroot_fsolver_get_state"
      external test_delta :
        Gsl_multiroot.NoDeriv.t -> epsabs:float -> epsrel:float -> bool
        = "ml_gsl_multiroot_test_delta_f"
      external test_residual :
        Gsl_multiroot.NoDeriv.t -> epsabs:float -> bool
        = "ml_gsl_multiroot_test_residual_f"
    end
  module Deriv :
    sig
      type kind = HYBRIDSJ | HYBRIDJ | NEWTON | GNEWTON
      type t
      val make :
        Gsl_multiroot.Deriv.kind ->
        int ->
        Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> Gsl_multiroot.Deriv.t
      external name : Gsl_multiroot.Deriv.t -> string
        = "ml_gsl_multiroot_fdfsolver_name"
      external iterate : Gsl_multiroot.Deriv.t -> unit
        = "ml_gsl_multiroot_fdfsolver_iterate"
      external root : Gsl_multiroot.Deriv.t -> Gsl_vector.vector -> unit
        = "ml_gsl_multiroot_fdfsolver_root"
      external get_state :
        Gsl_multiroot.Deriv.t ->
        ?x:Gsl_vector.vector ->
        ?f:Gsl_vector.vector ->
        ?j:Gsl_matrix.matrix -> ?dx:Gsl_vector.vector -> unit -> unit
        = "ml_gsl_multiroot_fdfsolver_get_state_bc"
        "ml_gsl_multiroot_fdfsolver_get_state"
      external test_delta :
        Gsl_multiroot.Deriv.t -> epsabs:float -> epsrel:float -> bool
        = "ml_gsl_multiroot_test_delta_fdf"
      external test_residual : Gsl_multiroot.Deriv.t -> epsabs:float -> bool
        = "ml_gsl_multiroot_test_residual_fdf"
    end
end
ocamlgsl-0.6.0/doc/index_methods.html0000664000076400007640000000716710607755611016344 0ustar olivoliv ocamlgsl 0.6.0 : Index of class methods

Index of class methods


ocamlgsl-0.6.0/doc/type_Gsl_wavelet.html0000664000076400007640000002650710607755606017032 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_wavelet sig
  type t
  type ws
  type kind =
      DAUBECHIES
    | DAUBECHIES_CENTERED
    | HAAR
    | HAAR_CENTERED
    | BSPLINE
    | BSPLINE_CENTERED
  type direction = FORWARD | BACKWARD
  val make : Gsl_wavelet.kind -> int -> Gsl_wavelet.t
  external name : Gsl_wavelet.t -> string = "ml_gsl_wavelet_name"
  val workspace_make : int -> Gsl_wavelet.ws
  external workspace_size : Gsl_wavelet.ws -> int
    = "ml_gsl_wavelet_workspace_size"
  val transform_array :
    Gsl_wavelet.t ->
    Gsl_wavelet.direction ->
    ?ws:Gsl_wavelet.ws ->
    ?stride:int -> ?off:int -> ?len:int -> float array -> unit
  val transform_forward :
    Gsl_wavelet.t ->
    ?ws:Gsl_wavelet.ws ->
    ?stride:int -> ?off:int -> ?len:int -> float array -> unit
  val transform_inverse :
    Gsl_wavelet.t ->
    ?ws:Gsl_wavelet.ws ->
    ?stride:int -> ?off:int -> ?len:int -> float array -> unit
  val transform_vector_flat :
    Gsl_wavelet.t ->
    Gsl_wavelet.direction ->
    ?ws:Gsl_wavelet.ws -> Gsl_vector_flat.vector -> unit
  val transform_vector :
    Gsl_wavelet.t ->
    Gsl_wavelet.direction -> ?ws:Gsl_wavelet.ws -> Gsl_vector.vector -> unit
  val transform_gen :
    Gsl_wavelet.t ->
    Gsl_wavelet.direction ->
    ?ws:Gsl_wavelet.ws -> [< Gsl_vectmat.vec ] -> unit
  type ordering = STANDARD | NON_STANDARD
  val transform_matrix_flat :
    Gsl_wavelet.t ->
    Gsl_wavelet.ordering ->
    Gsl_wavelet.direction ->
    ?ws:Gsl_wavelet.ws -> Gsl_matrix_flat.matrix -> unit
  val transform_matrix :
    Gsl_wavelet.t ->
    Gsl_wavelet.ordering ->
    Gsl_wavelet.direction -> ?ws:Gsl_wavelet.ws -> Gsl_matrix.matrix -> unit
  val transform_matrix_gen :
    Gsl_wavelet.t ->
    Gsl_wavelet.ordering ->
    Gsl_wavelet.direction ->
    ?ws:Gsl_wavelet.ws -> [< Gsl_vectmat.mat ] -> unit
end
ocamlgsl-0.6.0/doc/type_Gsl_siman.html0000664000076400007640000001222410607755606016461 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_siman sig
  type params = {
    iters_fixed_T : int;
    step_size : float;
    k : float;
    t_initial : float;
    mu_t : float;
    t_min : float;
  }
  val solve :
    Gsl_rng.t ->
    '->
    energ_func:('-> float) ->
    step_func:(Gsl_rng.t -> '-> float -> 'a) ->
    ?print_func:('-> unit) -> Gsl_siman.params -> 'a
end
ocamlgsl-0.6.0/doc/type_Gsl_integration.html0000664000076400007640000004370210607755604017700 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_integration sig
  external qng :
    Gsl_fun.gsl_fun ->
    a:float -> b:float -> epsabs:float -> epsrel:float -> float * float * int
    = "ml_gsl_integration_qng"
  type workspace
  val make_ws : int -> Gsl_integration.workspace
  external size : Gsl_integration.workspace -> int
    = "ml_gsl_integration_ws_size"
  type key = GAUSS15 | GAUSS21 | GAUSS31 | GAUSS41 | GAUSS51 | GAUSS61
  external qag :
    Gsl_fun.gsl_fun ->
    a:float ->
    b:float ->
    epsabs:float ->
    epsrel:float ->
    ?limit:int ->
    Gsl_integration.key -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qag_bc" "ml_gsl_integration_qag"
  external qags :
    Gsl_fun.gsl_fun ->
    a:float ->
    b:float ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qags_bc" "ml_gsl_integration_qags"
  external qagp :
    Gsl_fun.gsl_fun ->
    pts:float array ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qagp_bc" "ml_gsl_integration_qagp"
  external qagi :
    Gsl_fun.gsl_fun ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qagi"
  external qagiu :
    Gsl_fun.gsl_fun ->
    a:float ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qagiu_bc" "ml_gsl_integration_qagiu"
  external qagil :
    Gsl_fun.gsl_fun ->
    b:float ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qagil_bc" "ml_gsl_integration_qagil"
  val qag_sing :
    Gsl_fun.gsl_fun ->
    a:float ->
    b:float ->
    ?pts:float array ->
    ?limit:int -> epsabs:float -> epsrel:float -> unit -> Gsl_fun.result
  external qawc :
    Gsl_fun.gsl_fun ->
    a:float ->
    b:float ->
    c:float ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qawc_bc" "ml_gsl_integration_qawc"
  type qaws_table
  external alloc_qaws :
    alpha:float ->
    beta:float -> mu:int -> nu:int -> Gsl_integration.qaws_table
    = "ml_gsl_integration_qaws_table_alloc"
  external set_qaws :
    Gsl_integration.qaws_table ->
    alpha:float -> beta:float -> mu:int -> nu:int -> unit
    = "ml_gsl_integration_qaws_table_set"
  external free_qaws : Gsl_integration.qaws_table -> unit
    = "ml_gsl_integration_qaws_table_free"
  external qaws :
    Gsl_fun.gsl_fun ->
    a:float ->
    b:float ->
    Gsl_integration.qaws_table ->
    epsabs:float ->
    epsrel:float -> ?limit:int -> Gsl_integration.workspace -> Gsl_fun.result
    = "ml_gsl_integration_qaws_bc" "ml_gsl_integration_qaws"
  type qawo_table
  type qawo_sine = QAWO_COSINE | QAWO_SINE
  external alloc_qawo :
    omega:float ->
    l:float ->
    Gsl_integration.qawo_sine -> n:int -> Gsl_integration.qawo_table
    = "ml_gsl_integration_qawo_table_alloc"
  external set_qawo :
    Gsl_integration.qawo_table ->
    omega:float -> l:float -> Gsl_integration.qawo_sine -> unit
    = "ml_gsl_integration_qawo_table_set"
  external free_qawo : Gsl_integration.qawo_table -> unit
    = "ml_gsl_integration_qawo_table_free"
  external qawo :
    Gsl_fun.gsl_fun ->
    a:float ->
    epsabs:float ->
    epsrel:float ->
    ?limit:int ->
    Gsl_integration.workspace -> Gsl_integration.qawo_table -> Gsl_fun.result
    = "ml_gsl_integration_qawo_bc" "ml_gsl_integration_qawo"
  external qawf :
    Gsl_fun.gsl_fun ->
    a:float ->
    epsabs:float ->
    ?limit:int ->
    Gsl_integration.workspace ->
    Gsl_integration.workspace -> Gsl_integration.qawo_table -> Gsl_fun.result
    = "ml_gsl_integration_qawf_bc" "ml_gsl_integration_qawf"
end
ocamlgsl-0.6.0/doc/type_Gsl_sf.html0000664000076400007640000036637710607755610016002 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sf sig
  external airy_Ai : float -> Gsl_fun.mode -> float = "ml_gsl_sf_airy_Ai"
  external airy_Ai_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Ai_e"
  external airy_Bi : float -> Gsl_fun.mode -> float = "ml_gsl_sf_airy_Bi"
  external airy_Bi_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Bi_e"
  external airy_Ai_scaled : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Ai_scaled"
  external airy_Ai_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Ai_scaled_e"
  external airy_Bi_scaled : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Bi_scaled"
  external airy_Bi_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Bi_scaled_e"
  external airy_Ai_deriv : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Ai_deriv"
  external airy_Ai_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Ai_deriv_e"
  external airy_Bi_deriv : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Bi_deriv"
  external airy_Bi_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Bi_deriv_e"
  external airy_Ai_deriv_scaled : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Ai_deriv_scaled"
  external airy_Ai_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Ai_deriv_scaled_e"
  external airy_Bi_deriv_scaled : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_airy_Bi_deriv_scaled"
  external airy_Bi_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_airy_Bi_deriv_scaled_e"
  external airy_zero_Ai : int -> float = "ml_gsl_sf_airy_zero_Ai"
  external airy_zero_Ai_e : int -> Gsl_fun.result
    = "ml_gsl_sf_airy_zero_Ai_e"
  external airy_zero_Bi : int -> float = "ml_gsl_sf_airy_zero_Bi"
  external airy_zero_Bi_e : int -> Gsl_fun.result
    = "ml_gsl_sf_airy_zero_Bi_e"
  external bessel_J0 : float -> float = "ml_gsl_sf_bessel_J0"
    "gsl_sf_bessel_J0" "float"
  external bessel_J0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_J0_e"
  external bessel_J1 : float -> float = "ml_gsl_sf_bessel_J1"
    "gsl_sf_bessel_J1" "float"
  external bessel_J1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_J1_e"
  external bessel_Jn : int -> float -> float = "ml_gsl_sf_bessel_Jn"
  external bessel_Jn_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Jn_e"
  external bessel_Jn_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_Jn_array"
  external bessel_Y0 : float -> float = "ml_gsl_sf_bessel_Y0"
    "gsl_sf_bessel_Y0" "float"
  external bessel_Y0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_Y0_e"
  external bessel_Y1 : float -> float = "ml_gsl_sf_bessel_Y1"
    "gsl_sf_bessel_Y1" "float"
  external bessel_Y1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_Y1_e"
  external bessel_Yn : int -> float -> float = "ml_gsl_sf_bessel_Yn"
  external bessel_Yn_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Yn_e"
  external bessel_Yn_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_Yn_array"
  external bessel_I0 : float -> float = "ml_gsl_sf_bessel_I0"
    "gsl_sf_bessel_I0" "float"
  external bessel_I0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_I0_e"
  external bessel_I1 : float -> float = "ml_gsl_sf_bessel_I1"
    "gsl_sf_bessel_I1" "float"
  external bessel_I1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_I1_e"
  external bessel_In : int -> float -> float = "ml_gsl_sf_bessel_In"
  external bessel_In_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_In_e"
  external bessel_In_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_In_array"
  external bessel_K0 : float -> float = "ml_gsl_sf_bessel_K0"
    "gsl_sf_bessel_K0" "float"
  external bessel_K0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_K0_e"
  external bessel_K1 : float -> float = "ml_gsl_sf_bessel_K1"
    "gsl_sf_bessel_K1" "float"
  external bessel_K1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_K1_e"
  external bessel_Kn : int -> float -> float = "ml_gsl_sf_bessel_Kn"
  external bessel_Kn_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Kn_e"
  external bessel_Kn_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_Kn_array"
  external bessel_I0_scaled : float -> float = "ml_gsl_sf_bessel_I0_scaled"
    "gsl_sf_bessel_I0_scaled" "float"
  external bessel_I0_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_I0_scaled_e"
  external bessel_I1_scaled : float -> float = "ml_gsl_sf_bessel_I1_scaled"
    "gsl_sf_bessel_I1_scaled" "float"
  external bessel_I1_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_I1_scaled_e"
  external bessel_In : int -> float -> float = "ml_gsl_sf_bessel_In"
  external bessel_In_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_In_e"
  external bessel_In_scaled_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_In_scaled_array"
  external bessel_K0_scaled : float -> float = "ml_gsl_sf_bessel_K0_scaled"
    "gsl_sf_bessel_K0_scaled" "float"
  external bessel_K0_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_K0_scaled_e"
  external bessel_K1_scaled : float -> float = "ml_gsl_sf_bessel_K1_scaled"
    "gsl_sf_bessel_K1_scaled" "float"
  external bessel_K1_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_K1_scaled_e"
  external bessel_Kn : int -> float -> float = "ml_gsl_sf_bessel_Kn"
  external bessel_Kn_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Kn_e"
  external bessel_Kn_scaled_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_Kn_scaled_array"
  external bessel_j0 : float -> float = "ml_gsl_sf_bessel_j0"
    "gsl_sf_bessel_j0" "float"
  external bessel_j0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_j0_e"
  external bessel_j1 : float -> float = "ml_gsl_sf_bessel_j1"
    "gsl_sf_bessel_j1" "float"
  external bessel_j1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_j1_e"
  external bessel_j2 : float -> float = "ml_gsl_sf_bessel_j2"
    "gsl_sf_bessel_j2" "float"
  external bessel_j2_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_j2_e"
  external bessel_jl : int -> float -> float = "ml_gsl_sf_bessel_jl"
  external bessel_jl_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_jl_e"
  external bessel_jl_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_jl_array"
  external bessel_jl_steed_array : float -> float array -> unit
    = "ml_gsl_sf_bessel_jl_steed_array"
  external bessel_y0 : float -> float = "ml_gsl_sf_bessel_y0"
    "gsl_sf_bessel_y0" "float"
  external bessel_y0_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_y0_e"
  external bessel_y1 : float -> float = "ml_gsl_sf_bessel_y1"
    "gsl_sf_bessel_y1" "float"
  external bessel_y1_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_y1_e"
  external bessel_y2 : float -> float = "ml_gsl_sf_bessel_y2"
    "gsl_sf_bessel_y2" "float"
  external bessel_y2_e : float -> Gsl_fun.result = "ml_gsl_sf_bessel_y2_e"
  external bessel_yl : int -> float -> float = "ml_gsl_sf_bessel_yl"
  external bessel_yl_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_yl_e"
  external bessel_yl_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_yl_array"
  external bessel_i0_scaled : float -> float = "ml_gsl_sf_bessel_i0_scaled"
    "gsl_sf_bessel_i0_scaled" "float"
  external bessel_i0_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_i0_scaled_e"
  external bessel_i1_scaled : float -> float = "ml_gsl_sf_bessel_i1_scaled"
    "gsl_sf_bessel_i1_scaled" "float"
  external bessel_i1_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_i1_scaled_e"
  external bessel_il_scaled : int -> float -> float
    = "ml_gsl_sf_bessel_il_scaled"
  external bessel_il_scaled_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_il_scaled_e"
  external bessel_il_scaled_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_il_scaled_array"
  external bessel_k0_scaled : float -> float = "ml_gsl_sf_bessel_k0_scaled"
    "gsl_sf_bessel_k0_scaled" "float"
  external bessel_k0_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_k0_scaled_e"
  external bessel_k1_scaled : float -> float = "ml_gsl_sf_bessel_k1_scaled"
    "gsl_sf_bessel_k1_scaled" "float"
  external bessel_k1_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_k1_scaled_e"
  external bessel_kl_scaled : int -> float -> float
    = "ml_gsl_sf_bessel_kl_scaled"
  external bessel_kl_scaled_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_kl_scaled_e"
  external bessel_kl_scaled_array : int -> float -> float array -> unit
    = "ml_gsl_sf_bessel_kl_scaled_array"
  external bessel_Jnu : float -> float -> float = "ml_gsl_sf_bessel_Jnu"
    "gsl_sf_bessel_Jnu" "float"
  external bessel_Jnu_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Jnu_e"
  external bessel_sequence_Jnu_e :
    float -> Gsl_fun.mode -> float array -> unit
    = "ml_gsl_sf_bessel_sequence_Jnu_e"
  external bessel_Ynu : float -> float -> float = "ml_gsl_sf_bessel_Ynu"
    "gsl_sf_bessel_Ynu" "float"
  external bessel_Ynu_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Ynu_e"
  external bessel_Inu : float -> float -> float = "ml_gsl_sf_bessel_Inu"
    "gsl_sf_bessel_Inu" "float"
  external bessel_Inu_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Inu_e"
  external bessel_Inu_scaled : float -> float -> float
    = "ml_gsl_sf_bessel_Inu_scaled" "gsl_sf_bessel_Inu_scaled" "float"
  external bessel_Inu_scaled_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Inu_scaled_e"
  external bessel_Knu : float -> float -> float = "ml_gsl_sf_bessel_Knu"
    "gsl_sf_bessel_Knu" "float"
  external bessel_Knu_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Knu_e"
  external bessel_lnKnu : float -> float -> float = "ml_gsl_sf_bessel_lnKnu"
    "gsl_sf_bessel_lnKnu" "float"
  external bessel_lnKnu_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_lnKnu_e"
  external bessel_Knu_scaled : float -> float -> float
    = "ml_gsl_sf_bessel_Knu_scaled" "gsl_sf_bessel_Knu_scaled" "float"
  external bessel_Knu_scaled_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_bessel_Knu_scaled_e"
  external bessel_zero_J0 : int -> float = "ml_gsl_sf_bessel_zero_J0"
  external bessel_zero_J0_e : int -> Gsl_fun.result
    = "ml_gsl_sf_bessel_zero_J0_e"
  external bessel_zero_J1 : int -> float = "ml_gsl_sf_bessel_zero_J1"
  external bessel_zero_J1_e : int -> Gsl_fun.result
    = "ml_gsl_sf_bessel_zero_J1_e"
  external bessel_zero_Jnu : float -> int -> float
    = "ml_gsl_sf_bessel_zero_Jnu"
  external bessel_zero_Jnu_e : float -> int -> Gsl_fun.result
    = "ml_gsl_sf_bessel_zero_Jnu_e"
  external clausen : float -> float = "ml_gsl_sf_clausen" "gsl_sf_clausen"
    "float"
  external clausen_e : float -> Gsl_fun.result = "ml_gsl_sf_clausen_e"
  external hydrogenicR_1 : float -> float -> float
    = "ml_gsl_sf_hydrogenicR_1" "gsl_sf_hydrogenicR_1" "float"
  external hydrogenicR_1_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_hydrogenicR_1_e"
  external hydrogenicR : int -> int -> float -> float -> float
    = "ml_gsl_sf_hydrogenicR"
  external hydrogenicR_e : int -> int -> float -> float -> Gsl_fun.result
    = "ml_gsl_sf_hydrogenicR_e"
  external coulomb_CL_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_coulomb_CL_e"
  external coulomb_CL_array : float -> float -> float array -> unit
    = "ml_gsl_sf_coulomb_CL_array"
  external dawson : float -> float = "ml_gsl_sf_dawson" "gsl_sf_dawson"
    "float"
  external dawson_e : float -> Gsl_fun.result = "ml_gsl_sf_dawson_e"
  external debye_1 : float -> float = "ml_gsl_sf_debye_1" "gsl_sf_debye_1"
    "float"
  external debye_1_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_1_e"
  external debye_2 : float -> float = "ml_gsl_sf_debye_2" "gsl_sf_debye_2"
    "float"
  external debye_2_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_2_e"
  external debye_3 : float -> float = "ml_gsl_sf_debye_3" "gsl_sf_debye_3"
    "float"
  external debye_3_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_3_e"
  external debye_4 : float -> float = "ml_gsl_sf_debye_4" "gsl_sf_debye_4"
    "float"
  external debye_4_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_4_e"
  external debye_5 : float -> float = "ml_gsl_sf_debye_5" "gsl_sf_debye_5"
    "float"
  external debye_5_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_5_e"
  external debye_6 : float -> float = "ml_gsl_sf_debye_6" "gsl_sf_debye_6"
    "float"
  external debye_6_e : float -> Gsl_fun.result = "ml_gsl_sf_debye_6_e"
  external dilog : float -> float = "ml_gsl_sf_dilog" "gsl_sf_dilog" "float"
  external dilog_e : float -> Gsl_fun.result = "ml_gsl_sf_dilog_e"
  external complex_dilog_xy_e :
    float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_dilog_xy_e"
  external complex_dilog_e :
    float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_dilog_e"
  external complex_spence_xy_e :
    float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_spence_xy_e"
  external multiply_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_multiply_e"
  external multiply_err_e :
    x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result
    = "ml_gsl_sf_multiply_err_e"
  external ellint_Kcomp : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_Kcomp"
  external ellint_Kcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_Kcomp_e"
  external ellint_Ecomp : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_Ecomp"
  external ellint_Ecomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_Ecomp_e"
  external ellint_Pcomp : float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_Pcomp"
  external ellint_Pcomp_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_Pcomp_e"
  external ellint_Dcomp : float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_Dcomp"
  external ellint_Dcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_Dcomp_e"
  external ellint_F : float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_F"
  external ellint_F_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_F_e"
  external ellint_E : float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_E"
  external ellint_E_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_E_e"
  external ellint_P : float -> float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_P"
  external ellint_P_e :
    float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_P_e"
  external ellint_D : float -> float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_D"
  external ellint_D_e :
    float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_D_e"
  external ellint_RC : float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_RC"
  external ellint_RC_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_RC_e"
  external ellint_RD : float -> float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_RD"
  external ellint_RD_e :
    float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_RD_e"
  external ellint_RF : float -> float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_RF"
  external ellint_RF_e :
    float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_RF_e"
  external ellint_RJ :
    float -> float -> float -> float -> Gsl_fun.mode -> float
    = "ml_gsl_sf_ellint_RJ"
  external ellint_RJ_e :
    float -> float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
    = "ml_gsl_sf_ellint_RJ_e"
  external erf : float -> float = "ml_gsl_sf_erf" "gsl_sf_erf" "float"
  external erf_e : float -> Gsl_fun.result = "ml_gsl_sf_erf_e"
  external erfc : float -> float = "ml_gsl_sf_erfc" "gsl_sf_erfc" "float"
  external erfc_e : float -> Gsl_fun.result = "ml_gsl_sf_erfc_e"
  external log_erfc : float -> float = "ml_gsl_sf_log_erfc" "gsl_sf_log_erfc"
    "float"
  external log_erfc_e : float -> Gsl_fun.result = "ml_gsl_sf_log_erfc_e"
  external erf_Z : float -> float = "ml_gsl_sf_erf_Z" "gsl_sf_erf_Z" "float"
  external erf_Z_e : float -> Gsl_fun.result = "ml_gsl_sf_erf_Z_e"
  external erf_Q : float -> float = "ml_gsl_sf_erf_Q" "gsl_sf_erf_Q" "float"
  external erf_Q_e : float -> Gsl_fun.result = "ml_gsl_sf_erf_Q_e"
  external exp : float -> float = "ml_gsl_sf_exp" "gsl_sf_exp" "float"
  external exp_e : float -> Gsl_fun.result = "ml_gsl_sf_exp_e"
  external exp_e10 : float -> Gsl_fun.result_e10 = "ml_gsl_sf_exp_e10_e"
  external exp_mult : float -> float -> float = "ml_gsl_sf_exp_mult"
    "gsl_sf_exp_mult" "float"
  external exp_mult_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_exp_mult_e"
  external exp_mult_e10 : float -> float -> Gsl_fun.result_e10
    = "ml_gsl_sf_exp_mult_e10_e"
  external expm1 : float -> float = "ml_gsl_sf_expm1" "gsl_sf_expm1" "float"
  external expm1_e : float -> Gsl_fun.result = "ml_gsl_sf_expm1_e"
  external exprel : float -> float = "ml_gsl_sf_exprel" "gsl_sf_exprel"
    "float"
  external exprel_e : float -> Gsl_fun.result = "ml_gsl_sf_exprel_e"
  external exprel_2 : float -> float = "ml_gsl_sf_exprel_2" "gsl_sf_exprel_2"
    "float"
  external exprel_2_e : float -> Gsl_fun.result = "ml_gsl_sf_exprel_2_e"
  external exprel_n : int -> float -> float = "ml_gsl_sf_exprel_n"
  external exprel_n_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_exprel_n_e"
  external exp_err_e : x:float -> dx:float -> Gsl_fun.result
    = "ml_gsl_sf_exp_err_e"
  external exp_err_e10 : x:float -> dx:float -> Gsl_fun.result_e10
    = "ml_gsl_sf_exp_err_e10_e"
  external exp_mult_err_e :
    x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result
    = "ml_gsl_sf_exp_mult_err_e"
  external exp_mult_err_e10_e :
    x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result_e10
    = "ml_gsl_sf_exp_mult_err_e10_e"
  external expint_E1 : float -> float = "ml_gsl_sf_expint_E1"
    "gsl_sf_expint_E1" "float"
  external expint_E1_e : float -> Gsl_fun.result = "ml_gsl_sf_expint_E1_e"
  external expint_E2 : float -> float = "ml_gsl_sf_expint_E2"
    "gsl_sf_expint_E2" "float"
  external expint_E2_e : float -> Gsl_fun.result = "ml_gsl_sf_expint_E2_e"
  external expint_E1_scaled : float -> float = "ml_gsl_sf_expint_E1_scaled"
    "gsl_sf_expint_E1_scaled" "float"
  external expint_E1_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_expint_E1_scaled_e"
  external expint_E2_scaled : float -> float = "ml_gsl_sf_expint_E2_scaled"
    "gsl_sf_expint_E2_scaled" "float"
  external expint_E2_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_expint_E2_scaled_e"
  external expint_Ei : float -> float = "ml_gsl_sf_expint_Ei"
    "gsl_sf_expint_Ei" "float"
  external expint_Ei_e : float -> Gsl_fun.result = "ml_gsl_sf_expint_Ei_e"
  external expint_Ei_scaled : float -> float = "ml_gsl_sf_expint_Ei_scaled"
    "gsl_sf_expint_Ei_scaled" "float"
  external expint_Ei_scaled_e : float -> Gsl_fun.result
    = "ml_gsl_sf_expint_Ei_scaled_e"
  external shi : float -> float = "ml_gsl_sf_Shi"
  external chi : float -> float = "ml_gsl_sf_Chi"
  external expint_3 : float -> float = "ml_gsl_sf_expint_3" "gsl_sf_expint_3"
    "float"
  external expint_3_e : float -> Gsl_fun.result = "ml_gsl_sf_expint_3_e"
  external si : float -> float = "ml_gsl_sf_Si"
  external ci : float -> float = "ml_gsl_sf_Ci"
  external atanint : float -> float = "ml_gsl_sf_atanint" "gsl_sf_atanint"
    "float"
  external atanint_e : float -> Gsl_fun.result = "ml_gsl_sf_atanint_e"
  external fermi_dirac_m1 : float -> float = "ml_gsl_sf_fermi_dirac_m1"
    "gsl_sf_fermi_dirac_m1" "float"
  external fermi_dirac_m1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_m1_e"
  external fermi_dirac_0 : float -> float = "ml_gsl_sf_fermi_dirac_0"
    "gsl_sf_fermi_dirac_0" "float"
  external fermi_dirac_0_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_0_e"
  external fermi_dirac_1 : float -> float = "ml_gsl_sf_fermi_dirac_1"
    "gsl_sf_fermi_dirac_1" "float"
  external fermi_dirac_1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_1_e"
  external fermi_dirac_2 : float -> float = "ml_gsl_sf_fermi_dirac_2"
    "gsl_sf_fermi_dirac_2" "float"
  external fermi_dirac_2_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_2_e"
  external fermi_dirac_int : int -> float -> float
    = "ml_gsl_sf_fermi_dirac_int"
  external fermi_dirac_int_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_int_e"
  external fermi_dirac_mhalf : float -> float = "ml_gsl_sf_fermi_dirac_mhalf"
    "gsl_sf_fermi_dirac_mhalf" "float"
  external fermi_dirac_mhalf_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_mhalf_e"
  external fermi_dirac_half : float -> float = "ml_gsl_sf_fermi_dirac_half"
    "gsl_sf_fermi_dirac_half" "float"
  external fermi_dirac_half_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_half_e"
  external fermi_dirac_3half : float -> float = "ml_gsl_sf_fermi_dirac_3half"
    "gsl_sf_fermi_dirac_3half" "float"
  external fermi_dirac_3half_e : float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_3half_e"
  external fermi_dirac_inc_0 : float -> float -> float
    = "ml_gsl_sf_fermi_dirac_inc_0" "gsl_sf_fermi_dirac_inc_0" "float"
  external fermi_dirac_inc_0_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_fermi_dirac_inc_0_e"
  external gamma : float -> float = "ml_gsl_sf_gamma" "gsl_sf_gamma" "float"
  external gamma_e : float -> Gsl_fun.result = "ml_gsl_sf_gamma_e"
  external lngamma : float -> float = "ml_gsl_sf_lngamma" "gsl_sf_lngamma"
    "float"
  external lngamma_e : float -> Gsl_fun.result = "ml_gsl_sf_lngamma_e"
  external lngamma_sgn_e : float -> Gsl_fun.result * float
    = "ml_gsl_sf_lngamma_sgn_e"
  external gammastar : float -> float = "ml_gsl_sf_gammastar"
    "gsl_sf_gammastar" "float"
  external gammastar_e : float -> Gsl_fun.result = "ml_gsl_sf_gammastar_e"
  external gammainv : float -> float = "ml_gsl_sf_gammainv" "gsl_sf_gammainv"
    "float"
  external gammainv_e : float -> Gsl_fun.result = "ml_gsl_sf_gammainv_e"
  external lngamma_complex_e :
    float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_lngamma_complex_e"
  external taylorcoeff : int -> float -> float = "ml_gsl_sf_taylorcoeff"
  external taylorcoeff_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_taylorcoeff_e"
  external fact : int -> float = "ml_gsl_sf_fact"
  external fact_e : int -> Gsl_fun.result = "ml_gsl_sf_fact_e"
  external doublefact : int -> float = "ml_gsl_sf_doublefact"
  external doublefact_e : int -> Gsl_fun.result = "ml_gsl_sf_doublefact_e"
  external lnfact : int -> float = "ml_gsl_sf_lnfact"
  external lnfact_e : int -> Gsl_fun.result = "ml_gsl_sf_lnfact_e"
  external lndoublefact : int -> float = "ml_gsl_sf_lndoublefact"
  external lndoublefact_e : int -> Gsl_fun.result
    = "ml_gsl_sf_lndoublefact_e"
  external choose : int -> int -> float = "ml_gsl_sf_choose"
  external choose_e : int -> int -> Gsl_fun.result = "ml_gsl_sf_choose_e"
  external lnchoose : int -> int -> float = "ml_gsl_sf_lnchoose"
  external lnchoose_e : int -> int -> Gsl_fun.result = "ml_gsl_sf_lnchoose_e"
  external poch : float -> float -> float = "ml_gsl_sf_poch" "gsl_sf_poch"
    "float"
  external poch_e : float -> float -> Gsl_fun.result = "ml_gsl_sf_poch_e"
  external lnpoch : float -> float -> float = "ml_gsl_sf_lnpoch"
    "gsl_sf_lnpoch" "float"
  external lnpoch_e : float -> float -> Gsl_fun.result = "ml_gsl_sf_lnpoch_e"
  external lnpoch_sgn_e : float -> float -> Gsl_fun.result * float
    = "ml_gsl_sf_lngamma_sgn_e"
  external pochrel : float -> float -> float = "ml_gsl_sf_pochrel"
    "gsl_sf_pochrel" "float"
  external pochrel_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_pochrel_e"
  external gamma_inc_Q : float -> float -> float = "ml_gsl_sf_gamma_inc_Q"
    "gsl_sf_gamma_inc_Q" "float"
  external gamma_inc_Q_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gamma_inc_Q_e"
  external gamma_inc_P : float -> float -> float = "ml_gsl_sf_gamma_inc_P"
    "gsl_sf_gamma_inc_P" "float"
  external gamma_inc_P_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gamma_inc_P_e"
  external gamma_inc : float -> float -> float = "ml_gsl_sf_gamma_inc"
    "gsl_sf_gamma_inc" "float"
  external gamma_inc_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gamma_inc_e"
  external beta : float -> float -> float = "ml_gsl_sf_beta" "gsl_sf_beta"
    "float"
  external beta_e : float -> float -> Gsl_fun.result = "ml_gsl_sf_beta_e"
  external lnbeta : float -> float -> float = "ml_gsl_sf_lnbeta"
    "gsl_sf_lnbeta" "float"
  external lnbeta_e : float -> float -> Gsl_fun.result = "ml_gsl_sf_lnbeta_e"
  external lnbeta_sgn_e : float -> float -> Gsl_fun.result * float
    = "ml_gsl_sf_lnbeta_sgn_e"
  external beta_inc : float -> float -> float -> float = "ml_gsl_sf_beta_inc"
    "gsl_sf_beta_inc" "float"
  external beta_inc_e : float -> float -> float -> Gsl_fun.result
    = "ml_gsl_sf_beta_inc_e"
  external gegenpoly_1 : float -> float -> float = "ml_gsl_sf_gegenpoly_1"
    "gsl_sf_gegenpoly_1" "float"
  external gegenpoly_1_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gegenpoly_1_e"
  external gegenpoly_2 : float -> float -> float = "ml_gsl_sf_gegenpoly_2"
    "gsl_sf_gegenpoly_2" "float"
  external gegenpoly_2_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gegenpoly_2_e"
  external gegenpoly_3 : float -> float -> float = "ml_gsl_sf_gegenpoly_3"
    "gsl_sf_gegenpoly_3" "float"
  external gegenpoly_3_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gegenpoly_3_e"
  external gegenpoly_n : int -> float -> float -> float
    = "ml_gsl_sf_gegenpoly_n"
  external gegenpoly_n_e : int -> float -> float -> Gsl_fun.result
    = "ml_gsl_sf_gegenpoly_n_e"
  external gegenpoly_array : float -> float -> float array -> unit
    = "ml_gsl_sf_gegenpoly_array"
  external laguerre_1 : float -> float -> float = "ml_gsl_sf_laguerre_1"
    "gsl_sf_laguerre_1" "float"
  external laguerre_1_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_laguerre_1_e"
  external laguerre_2 : float -> float -> float = "ml_gsl_sf_laguerre_2"
    "gsl_sf_laguerre_2" "float"
  external laguerre_2_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_laguerre_2_e"
  external laguerre_3 : float -> float -> float = "ml_gsl_sf_laguerre_3"
    "gsl_sf_laguerre_3" "float"
  external laguerre_3_e : float -> float -> Gsl_fun.result
    = "ml_gsl_sf_laguerre_3_e"
  external laguerre_n : int -> float -> float -> float
    = "ml_gsl_sf_laguerre_n"
  external laguerre_n_e : int -> float -> float -> Gsl_fun.result
    = "ml_gsl_sf_laguerre_n_e"
  external lambert_W0 : float -> float = "ml_gsl_sf_lambert_W0"
    "gsl_sf_lambert_W0" "float"
  external lambert_W0_e : float -> Gsl_fun.result = "ml_gsl_sf_lambert_W0_e"
  external lambert_Wm1 : float -> float = "ml_gsl_sf_lambert_Wm1"
    "gsl_sf_lambert_Wm1" "float"
  external lambert_Wm1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_lambert_Wm1_e"
  external legendre_P1 : float -> float = "ml_gsl_sf_legendre_P1"
    "gsl_sf_legendre_P1" "float"
  external legendre_P1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_P1_e"
  external legendre_P2 : float -> float = "ml_gsl_sf_legendre_P2"
    "gsl_sf_legendre_P2" "float"
  external legendre_P2_e : float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_P2_e"
  external legendre_P3 : float -> float = "ml_gsl_sf_legendre_P3"
    "gsl_sf_legendre_P3" "float"
  external legendre_P3_e : float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_P3_e"
  external legendre_Pl : int -> float -> float = "ml_gsl_sf_legendre_Pl"
  external legendre_Pl_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_Pl_e"
  external legendre_Pl_array : float -> float array -> unit
    = "ml_gsl_sf_legendre_Pl_array"
  external legendre_Q0 : float -> float = "ml_gsl_sf_legendre_Q0"
    "gsl_sf_legendre_Q0" "float"
  external legendre_Q0_e : float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_Q0_e"
  external legendre_Q1 : float -> float = "ml_gsl_sf_legendre_Q1"
    "gsl_sf_legendre_Q1" "float"
  external legendre_Q1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_Q1_e"
  external legendre_Ql : int -> float -> float = "ml_gsl_sf_legendre_Ql"
  external legendre_Ql_e : int -> float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_Ql_e"
  external legendre_Plm : int -> int -> float -> float
    = "ml_gsl_sf_legendre_Plm"
  external legendre_Plm_e : int -> int -> float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_Plm_e"
  external legendre_Plm_array : int -> int -> float -> float array -> unit
    = "ml_gsl_sf_legendre_Plm_array"
  external legendre_sphPlm : int -> int -> float -> float
    = "ml_gsl_sf_legendre_sphPlm"
  external legendre_sphPlm_e : int -> int -> float -> Gsl_fun.result
    = "ml_gsl_sf_legendre_sphPlm_e"
  external legendre_sphPlm_array : int -> int -> float -> float array -> unit
    = "ml_gsl_sf_legendre_sphPlm_array"
  external legendre_array_size : int -> int -> int
    = "ml_gsl_sf_legendre_array_size"
  external log : float -> float = "ml_gsl_sf_log" "gsl_sf_log" "float"
  external log_e : float -> Gsl_fun.result = "ml_gsl_sf_log_e"
  external log_abs : float -> float = "ml_gsl_sf_log_abs" "gsl_sf_log_abs"
    "float"
  external log_abs_e : float -> Gsl_fun.result = "ml_gsl_sf_log_abs_e"
  external log_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_log_e"
  external log_1plusx : float -> float = "ml_gsl_sf_log_1plusx"
    "gsl_sf_log_1plusx" "float"
  external log_1plusx_e : float -> Gsl_fun.result = "ml_gsl_sf_log_1plusx_e"
  external log_1plusx_mx : float -> float = "ml_gsl_sf_log_1plusx_mx"
    "gsl_sf_log_1plusx_mx" "float"
  external log_1plusx_mx_e : float -> Gsl_fun.result
    = "ml_gsl_sf_log_1plusx_mx_e"
  external pow_int : float -> int -> float = "ml_gsl_sf_pow_int"
  external pow_int_e : float -> int -> Gsl_fun.result = "ml_gsl_sf_pow_int_e"
  external psi_int : int -> float = "ml_gsl_sf_psi_int"
  external psi_int_e : int -> Gsl_fun.result = "ml_gsl_sf_psi_int_e"
  external psi : float -> float = "ml_gsl_sf_psi" "gsl_sf_psi" "float"
  external psi_e : float -> Gsl_fun.result = "ml_gsl_sf_psi_e"
  external psi_1piy : float -> float = "ml_gsl_sf_psi_1piy" "gsl_sf_psi_1piy"
    "float"
  external psi_1piy_e : float -> Gsl_fun.result = "ml_gsl_sf_psi_1piy_e"
  external psi_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_psi_e"
  external psi_1_int : int -> float = "ml_gsl_sf_psi_1_int"
  external psi_1_int_e : int -> Gsl_fun.result = "ml_gsl_sf_psi_1_int_e"
  external psi_1 : float -> float = "ml_gsl_sf_psi_1" "gsl_sf_psi_1" "float"
  external psi_1_e : float -> Gsl_fun.result = "ml_gsl_sf_psi_1_e"
  external psi_n : int -> float -> float = "ml_gsl_sf_psi_n"
  external psi_n_e : int -> float -> Gsl_fun.result = "ml_gsl_sf_psi_n_e"
  external synchrotron_1 : float -> float = "ml_gsl_sf_synchrotron_1"
    "gsl_sf_synchrotron_1" "float"
  external synchrotron_1_e : float -> Gsl_fun.result
    = "ml_gsl_sf_synchrotron_1_e"
  external synchrotron_2 : float -> float = "ml_gsl_sf_synchrotron_2"
    "gsl_sf_synchrotron_2" "float"
  external synchrotron_2_e : float -> Gsl_fun.result
    = "ml_gsl_sf_synchrotron_2_e"
  external transport_2 : float -> float = "ml_gsl_sf_transport_2"
    "gsl_sf_transport_2" "float"
  external transport_2_e : float -> Gsl_fun.result
    = "ml_gsl_sf_transport_2_e"
  external transport_3 : float -> float = "ml_gsl_sf_transport_3"
    "gsl_sf_transport_3" "float"
  external transport_3_e : float -> Gsl_fun.result
    = "ml_gsl_sf_transport_3_e"
  external transport_4 : float -> float = "ml_gsl_sf_transport_4"
    "gsl_sf_transport_4" "float"
  external transport_4_e : float -> Gsl_fun.result
    = "ml_gsl_sf_transport_4_e"
  external transport_5 : float -> float = "ml_gsl_sf_transport_5"
    "gsl_sf_transport_5" "float"
  external transport_5_e : float -> Gsl_fun.result
    = "ml_gsl_sf_transport_5_e"
  external sin : float -> float = "ml_gsl_sf_sin" "gsl_sf_sin" "float"
  external sin_e : float -> Gsl_fun.result = "ml_gsl_sf_sin_e"
  external cos : float -> float = "ml_gsl_sf_cos" "gsl_sf_cos" "float"
  external cos_e : float -> Gsl_fun.result = "ml_gsl_sf_cos_e"
  external hypot : float -> float = "ml_gsl_sf_hypot" "gsl_sf_hypot" "float"
  external hypot_e : float -> Gsl_fun.result = "ml_gsl_sf_hypot_e"
  external sinc : float -> float = "ml_gsl_sf_sinc" "gsl_sf_sinc" "float"
  external sinc_e : float -> Gsl_fun.result = "ml_gsl_sf_sinc_e"
  external complex_sin_e : float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_sin_e"
  external complex_cos_e : float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_cos_e"
  external complex_logsin_e :
    float -> float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_complex_logsin_e"
  external lnsinh : float -> float = "ml_gsl_sf_lnsinh" "gsl_sf_lnsinh"
    "float"
  external lnsinh_e : float -> Gsl_fun.result = "ml_gsl_sf_lnsinh_e"
  external lncosh : float -> float = "ml_gsl_sf_lncosh" "gsl_sf_lncosh"
    "float"
  external lncosh_e : float -> Gsl_fun.result = "ml_gsl_sf_lncosh_e"
  external rect_of_polar :
    r:float -> theta:float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_polar_to_rect"
  external polar_of_rect :
    x:float -> y:float -> Gsl_fun.result * Gsl_fun.result
    = "ml_gsl_sf_rect_to_polar"
  external angle_restrict_symm : float -> float
    = "ml_gsl_sf_angle_restrict_symm"
  external angle_restrict_pos : float -> float
    = "ml_gsl_sf_angle_restrict_pos"
  external sin_err_e : float -> dx:float -> Gsl_fun.result
    = "ml_gsl_sf_sin_err_e"
  external cos_err_e : float -> dx:float -> Gsl_fun.result
    = "ml_gsl_sf_cos_err_e"
  external zeta_int : int -> float = "ml_gsl_sf_zeta_int"
  external zeta_int_e : int -> Gsl_fun.result = "ml_gsl_sf_zeta_int_e"
  external zeta : float -> float = "ml_gsl_sf_zeta" "gsl_sf_zeta" "float"
  external zeta_e : float -> Gsl_fun.result = "ml_gsl_sf_zeta_e"
  external hzeta : float -> float -> float = "ml_gsl_sf_hzeta" "gsl_sf_hzeta"
    "float"
  external hzeta_e : float -> float -> Gsl_fun.result = "ml_gsl_sf_hzeta_e"
  external eta_int : int -> float = "ml_gsl_sf_eta_int"
  external eta_int_e : int -> Gsl_fun.result = "ml_gsl_sf_eta_int_e"
  external eta : float -> float = "ml_gsl_sf_eta" "gsl_sf_eta" "float"
  external eta_e : float -> Gsl_fun.result = "ml_gsl_sf_eta_e"
end
ocamlgsl-0.6.0/doc/Gsl_multiroot.Deriv.html0000664000076400007640000001535210607755605017423 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot.Deriv

Module Gsl_multiroot.Deriv


module Deriv: sig .. end


type kind =
| HYBRIDSJ
| HYBRIDJ
| NEWTON
| GNEWTON
type t 
val make : kind ->
int -> Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> t
val name : t -> string
val iterate : t -> unit
val root : t -> Gsl_vector.vector -> unit
val get_state : t ->
?x:Gsl_vector.vector ->
?f:Gsl_vector.vector ->
?j:Gsl_matrix.matrix -> ?dx:Gsl_vector.vector -> unit -> unit
val test_delta : t -> epsabs:float -> epsrel:float -> bool
val test_residual : t -> epsabs:float -> bool
ocamlgsl-0.6.0/doc/Gsl_odeiv.html0000664000076400007640000002567210607755606015432 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_odeiv

Module Gsl_odeiv


module Gsl_odeiv: sig .. end
Ordinary Differential Equations

type system 
val make_system : (float -> float array -> float array -> unit) ->
?jac:(float -> float array -> Gsl_matrix.matrix -> float array -> unit) ->
int -> system
type step 

type step_kind =
| RK2
| RK4
| RKF45
| RKCK
| RK8PD
| RK2IMP
| RK2SIMP
| RK4IMP
| BSIMP
| GEAR1
| GEAR2
val make_step : step_kind -> dim:int -> step
val step_reset : step -> unit
val step_name : step -> string
val step_order : step -> int
val step_apply : step ->
t:float ->
h:float ->
y:float array ->
yerr:float array ->
?dydt_in:float array -> ?dydt_out:float array -> system -> unit
type control 
val make_control_standard_new : eps_abs:float ->
eps_rel:float -> a_y:float -> a_dydt:float -> control
val make_control_y_new : eps_abs:float -> eps_rel:float -> control
val make_control_yp_new : eps_abs:float -> eps_rel:float -> control
val make_control_scaled_new : eps_abs:float ->
eps_rel:float ->
a_y:float -> a_dydt:float -> scale_abs:float array -> control
val control_name : control -> string

type hadjust =
| HADJ_DEC
| HADJ_NIL
| HADJ_INC
val control_hadjust : control ->
step ->
y:float array ->
yerr:float array -> dydt:float array -> h:float -> hadjust * float
type evolve 
val make_evolve : int -> evolve
val evolve_reset : evolve -> unit
val evolve_apply : evolve ->
control ->
step ->
system ->
t:float -> t1:float -> h:float -> y:float array -> float * float
ocamlgsl-0.6.0/doc/Gsl_randist.html0000664000076400007640000004576510607755604015773 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_randist

Module Gsl_randist


module Gsl_randist: sig .. end
Random Number Distributions

val gaussian : Gsl_rng.t -> sigma:float -> float
val gaussian_ratio_method : Gsl_rng.t -> sigma:float -> float
val gaussian_ziggurat : Gsl_rng.t -> sigma:float -> float
val gaussian_pdf : float -> sigma:float -> float
val ugaussian : Gsl_rng.t -> float
val ugaussian_ratio_method : Gsl_rng.t -> float
val ugaussian_pdf : float -> float
val gaussian_tail : Gsl_rng.t -> a:float -> sigma:float -> float
val gaussian_tail_pdf : float -> a:float -> sigma:float -> float
val ugaussian_tail : Gsl_rng.t -> a:float -> float
val ugaussian_tail_pdf : float -> a:float -> float
val bivariate_gaussian : Gsl_rng.t -> sigma_x:float -> sigma_y:float -> rho:float -> float * float
val bivariate_gaussian_pdf : x:float -> y:float -> sigma_x:float -> sigma_y:float -> rho:float -> float
val exponential : Gsl_rng.t -> mu:float -> float
val exponential_pdf : float -> mu:float -> float
val laplace : Gsl_rng.t -> a:float -> float
val laplace_pdf : float -> a:float -> float
val exppow : Gsl_rng.t -> a:float -> b:float -> float
val exppow_pdf : float -> a:float -> b:float -> float
val cauchy : Gsl_rng.t -> a:float -> float
val cauchy_pdf : float -> a:float -> float
val rayleigh : Gsl_rng.t -> sigma:float -> float
val rayleigh_pdf : float -> sigma:float -> float
val rayleigh_tail : Gsl_rng.t -> a:float -> sigma:float -> float
val rayleigh_tail_pdf : float -> a:float -> sigma:float -> float
val landau : Gsl_rng.t -> float
val landau_pdf : float -> float
val levy : Gsl_rng.t -> c:float -> alpha:float -> float
val levy_skew : Gsl_rng.t -> c:float -> alpha:float -> beta:float -> float
val gamma : Gsl_rng.t -> a:float -> b:float -> float
val gamma_int : Gsl_rng.t -> a:int -> float
val gamma_pdf : float -> a:float -> b:float -> float
val gamma_mt : Gsl_rng.t -> a:int -> b:float -> float
val gamma_knuth : Gsl_rng.t -> a:int -> b:float -> float
val flat : Gsl_rng.t -> a:float -> b:float -> float
val flat_pdf : float -> a:float -> b:float -> float
val lognormal : Gsl_rng.t -> zeta:float -> sigma:float -> float
val lognormal_pdf : float -> zeta:float -> sigma:float -> float
val chisq : Gsl_rng.t -> nu:float -> float
val chisq_pdf : float -> nu:float -> float
val dirichlet : Gsl_rng.t -> alpha:float array -> theta:float array -> unit
val dirichlet_pdf : alpha:float array -> theta:float array -> float
val dirichlet_lnpdf : alpha:float array -> theta:float array -> float
val fdist : Gsl_rng.t -> nu1:float -> nu2:float -> float
val fdist_pdf : float -> nu1:float -> nu2:float -> float
val tdist : Gsl_rng.t -> nu:float -> float
val tdist_pdf : float -> nu:float -> float
val beta : Gsl_rng.t -> a:float -> b:float -> float
val beta_pdf : float -> a:float -> b:float -> float
val logistic : Gsl_rng.t -> a:float -> float
val logistic_pdf : float -> a:float -> float
val pareto : Gsl_rng.t -> a:float -> b:float -> float
val pareto_pdf : float -> a:float -> b:float -> float
val dir_2d : Gsl_rng.t -> float * float
val dir_2d_trig_method : Gsl_rng.t -> float * float
val dir_3d : Gsl_rng.t -> float * float * float
val dir_nd : Gsl_rng.t -> float array -> unit
val weibull : Gsl_rng.t -> a:float -> b:float -> float
val weibull_pdf : float -> a:float -> b:float -> float
val gumbel1 : Gsl_rng.t -> a:float -> b:float -> float
val gumbel1_pdf : float -> a:float -> b:float -> float
val gumbel2 : Gsl_rng.t -> a:float -> b:float -> float
val gumbel2_pdf : float -> a:float -> b:float -> float
type discrete 
val discrete_preproc : float array -> discrete
val discrete : Gsl_rng.t -> discrete -> int
val discrete_pdf : int -> discrete -> float
val poisson : Gsl_rng.t -> mu:float -> int
val poisson_pdf : int -> mu:float -> float
val bernoulli : Gsl_rng.t -> p:float -> int
val bernoulli_pdf : int -> p:float -> float
val binomial : Gsl_rng.t -> p:float -> n:int -> int
val binomial_knuth : Gsl_rng.t -> p:float -> n:int -> int
val binomial_tpe : Gsl_rng.t -> p:float -> n:int -> int
val binomial_pdf : int -> p:float -> n:int -> float
val multinomial : Gsl_rng.t -> n:int -> p:float array -> int array
val multinomial_pdf : p:float array -> n:int array -> float
val multinomial_lnpdf : p:float array -> n:int array -> float
val negative_binomial : Gsl_rng.t -> p:float -> n:int -> int
val negative_binomial_pdf : int -> p:float -> n:int -> float
val pascal : Gsl_rng.t -> p:float -> k:int -> int
val pascal_pdf : int -> p:float -> n:int -> float
val geometric : Gsl_rng.t -> p:float -> int
val geometric_pdf : int -> p:float -> float
val hypergeometric : Gsl_rng.t -> n1:int -> n2:int -> t:int -> int
val hypergeometric_pdf : int -> n1:int -> n2:int -> t:int -> float
val logarithmic : Gsl_rng.t -> p:float -> int
val logarithmic_pdf : int -> p:float -> float
val shuffle : Gsl_rng.t -> 'a array -> unit
val choose : Gsl_rng.t -> src:'a array -> dst:'a array -> unit
val sample : Gsl_rng.t -> src:'a array -> dst:'a array -> unit
ocamlgsl-0.6.0/doc/type_Gsl_monte.html0000664000076400007640000002763010607755606016503 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_monte sig
  type kind = PLAIN | MISER | VEGAS
  val integrate :
    Gsl_monte.kind ->
    Gsl_fun.monte_fun ->
    lo:float array -> up:float array -> int -> Gsl_rng.t -> Gsl_fun.result
  type plain_state
  val make_plain_state : int -> Gsl_monte.plain_state
  external init_plain : Gsl_monte.plain_state -> unit
    = "ml_gsl_monte_plain_init"
  external integrate_plain :
    Gsl_fun.monte_fun ->
    lo:float array ->
    up:float array ->
    int -> Gsl_rng.t -> Gsl_monte.plain_state -> Gsl_fun.result
    = "ml_gsl_monte_plain_integrate_bc" "ml_gsl_monte_plain_integrate"
  type miser_state
  type miser_params = {
    estimate_frac : float;
    min_calls : int;
    min_calls_per_bisection : int;
    miser_alpha : float;
    dither : float;
  }
  val make_miser_state : int -> Gsl_monte.miser_state
  external init_miser : Gsl_monte.miser_state -> unit
    = "ml_gsl_monte_miser_init"
  external integrate_miser :
    Gsl_fun.monte_fun ->
    lo:float array ->
    up:float array ->
    int -> Gsl_rng.t -> Gsl_monte.miser_state -> Gsl_fun.result
    = "ml_gsl_monte_miser_integrate_bc" "ml_gsl_monte_miser_integrate"
  external get_miser_params : Gsl_monte.miser_state -> Gsl_monte.miser_params
    = "ml_gsl_monte_miser_get_params"
  external set_miser_params :
    Gsl_monte.miser_state -> Gsl_monte.miser_params -> unit
    = "ml_gsl_monte_miser_set_params"
  type vegas_state
  type vegas_info = { result : float; sigma : float; chisq : float; }
  type vegas_mode = STRATIFIED | IMPORTANCE_ONLY | IMPORTANCE
  type vegas_params = {
    vegas_alpha : float;
    iterations : int;
    stage : int;
    mode : Gsl_monte.vegas_mode;
    verbose : int;
    ostream : Pervasives.out_channel option;
  }
  val make_vegas_state : int -> Gsl_monte.vegas_state
  external init_vegas : Gsl_monte.vegas_state -> unit
    = "ml_gsl_monte_vegas_init"
  external integrate_vegas :
    Gsl_fun.monte_fun ->
    lo:float array ->
    up:float array ->
    int -> Gsl_rng.t -> Gsl_monte.vegas_state -> Gsl_fun.result
    = "ml_gsl_monte_vegas_integrate_bc" "ml_gsl_monte_vegas_integrate"
  external get_vegas_info : Gsl_monte.vegas_state -> Gsl_monte.vegas_info
    = "ml_gsl_monte_vegas_get_info"
  external get_vegas_params : Gsl_monte.vegas_state -> Gsl_monte.vegas_params
    = "ml_gsl_monte_vegas_get_params"
  external set_vegas_params :
    Gsl_monte.vegas_state -> Gsl_monte.vegas_params -> unit
    = "ml_gsl_monte_vegas_set_params"
end
ocamlgsl-0.6.0/doc/index_module_types.html0000664000076400007640000000716510607755611017410 0ustar olivoliv ocamlgsl 0.6.0 : Index of module types

Index of module types


ocamlgsl-0.6.0/doc/Gsl_min.html0000664000076400007640000001340710607755605015077 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_min

Module Gsl_min


module Gsl_min: sig .. end
One dimensional Minimization


type kind =
| GOLDENSECTION
| BRENT
type t 
val make : kind ->
Gsl_fun.gsl_fun -> min:float -> lo:float -> up:float -> t
val name : t -> string
val iterate : t -> unit
val minimum : t -> float
val interval : t -> float * float
val test_interval : x_lo:float -> x_up:float -> epsabs:float -> epsrel:float -> bool
ocamlgsl-0.6.0/doc/type_Gsl_root.Polish.html0000664000076400007640000001244610607755605017577 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root.Polish sig
  type kind = NEWTON | SECANT | STEFFENSON
  type t
  val make :
    Gsl_root.Polish.kind -> Gsl_fun.gsl_fun_fdf -> float -> Gsl_root.Polish.t
  external name : Gsl_root.Polish.t -> string = "ml_gsl_root_fdfsolver_name"
  external iterate : Gsl_root.Polish.t -> unit
    = "ml_gsl_root_fdfsolver_iterate"
  external root : Gsl_root.Polish.t -> float = "ml_gsl_root_fdfsolver_root"
end
ocamlgsl-0.6.0/doc/type_Gsl_vector_complex.html0000664000076400007640000003634010607755576020416 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex sig
  type complex_double_vector_bigarr =
      (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout)
      Bigarray.Array1.t
  type vector = Gsl_vector_complex.complex_double_vector_bigarr
  val create : ?init:Gsl_complex.complex -> int -> Gsl_vector_complex.vector
  val of_array : Gsl_complex.complex array -> Gsl_vector_complex.vector
  val to_array : Gsl_vector_complex.vector -> Gsl_complex.complex array
  val of_complex_array :
    Gsl_complex.complex_array -> Gsl_vector_complex.vector
  val to_complex_array :
    Gsl_vector_complex.vector -> Gsl_complex.complex_array
  val length : Gsl_vector_complex.vector -> int
  val get : Gsl_vector_complex.vector -> int -> Gsl_complex.complex
  val set : Gsl_vector_complex.vector -> int -> Gsl_complex.complex -> unit
  val set_all : Gsl_vector_complex.vector -> Gsl_complex.complex -> unit
  val set_zero : Gsl_vector_complex.vector -> unit
  val set_basis : Gsl_vector_complex.vector -> int -> unit
  val memcpy :
    src:Gsl_vector_complex.vector -> dst:Gsl_vector_complex.vector -> unit
  val copy : Gsl_vector_complex.vector -> Gsl_vector_complex.vector
  val swap_element : Gsl_vector_complex.vector -> int -> int -> unit
  val reverse : Gsl_vector_complex.vector -> unit
  val subvector :
    Gsl_vector_complex.vector ->
    off:int -> len:int -> Gsl_vector_complex.vector
  module Single :
    sig
      type complex_float_vector_bigarr =
          (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout)
          Bigarray.Array1.t
      type vector = Gsl_vector_complex.Single.complex_float_vector_bigarr
      val create :
        ?init:Gsl_complex.complex -> int -> Gsl_vector_complex.Single.vector
      val of_array :
        Gsl_complex.complex array -> Gsl_vector_complex.Single.vector
      val to_array :
        Gsl_vector_complex.Single.vector -> Gsl_complex.complex array
      val of_complex_array :
        Gsl_complex.complex_array -> Gsl_vector_complex.Single.vector
      val to_complex_array :
        Gsl_vector_complex.Single.vector -> Gsl_complex.complex_array
      val length : Gsl_vector_complex.Single.vector -> int
      val get :
        Gsl_vector_complex.Single.vector -> int -> Gsl_complex.complex
      val set :
        Gsl_vector_complex.Single.vector ->
        int -> Gsl_complex.complex -> unit
      val set_all :
        Gsl_vector_complex.Single.vector -> Gsl_complex.complex -> unit
      val set_zero : Gsl_vector_complex.Single.vector -> unit
      val set_basis : Gsl_vector_complex.Single.vector -> int -> unit
      val memcpy :
        src:Gsl_vector_complex.Single.vector ->
        dst:Gsl_vector_complex.Single.vector -> unit
      val copy :
        Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector
      val swap_element :
        Gsl_vector_complex.Single.vector -> int -> int -> unit
      val reverse : Gsl_vector_complex.Single.vector -> unit
      val subvector :
        Gsl_vector_complex.Single.vector ->
        off:int -> len:int -> Gsl_vector_complex.Single.vector
    end
end
ocamlgsl-0.6.0/doc/type_Gsl_multimin.NoDeriv.html0000664000076400007640000001444010607755605020556 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin.NoDeriv sig
  type kind = NM_SIMPLEX
  type t
  val make :
    Gsl_multimin.NoDeriv.kind ->
    int ->
    Gsl_fun.multim_fun ->
    x:Gsl_vector.vector ->
    step_size:Gsl_vector.vector -> Gsl_multimin.NoDeriv.t
  external name : Gsl_multimin.NoDeriv.t -> string
    = "ml_gsl_multimin_fminimizer_name"
  external iterate : Gsl_multimin.NoDeriv.t -> unit
    = "ml_gsl_multimin_fminimizer_iterate"
  external minimum : ?x:Gsl_vector.vector -> Gsl_multimin.NoDeriv.t -> float
    = "ml_gsl_multimin_fminimizer_minimum"
  external size : Gsl_multimin.NoDeriv.t -> float
    = "ml_gsl_multimin_fminimizer_size"
  external test_size : Gsl_multimin.NoDeriv.t -> float -> bool
    = "ml_gsl_multimin_test_size"
end
ocamlgsl-0.6.0/doc/style.css0000664000076400007640000000433110600040517014445 0ustar olivoliva:visited {color : #416DFF; text-decoration : none; } a:link {color : #416DFF; text-decoration : none;} a:hover {color : Red; text-decoration : none; background-color: #5FFF88} a:active {color : Red; text-decoration : underline; } .keyword { font-weight : bold ; color : Red } .keywordsign { color : #C04600 } .superscript { font-size : 4 } .subscript { font-size : 4 } .comment { color : Green } .constructor { color : Blue } .type { color : #5C6585 } .string { color : Maroon } .warning { color : Red ; font-weight : bold } .info { margin-left : 3em; margin-right : 3em } .param_info { margin-top: 4px; margin-left : 3em; margin-right : 3em } .code { color : #465F91 ; } h1 { font-size : 20pt ; text-align: center; } h2 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ;padding: 2px; } h3 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90DDFF ;padding: 2px; } h4 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90EDFF ;padding: 2px; } h5 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90FDFF ;padding: 2px; } h6 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #C0FFFF ; padding: 2px; } div.h7 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #E0FFFF ; padding: 2px; } div.h8 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #F0FFFF ; padding: 2px; } div.h9 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #FFFFFF ; padding: 2px; } .typetable { border-style : hidden } .indextable { border-style : hidden } .paramstable { border-style : hidden ; padding: 5pt 5pt} body { background-color : White } tr { background-color : White } td.typefieldcomment { background-color : #FFFFFF ; font-size: smaller ;} pre { margin-bottom: 4px } div.sig_block {margin-left: 2em}ocamlgsl-0.6.0/doc/type_Gsl_blas_flat.Complex.html0000664000076400007640000005627310607755601020716 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_flat.Complex sig
  external dotu :
    Gsl_vector_complex_flat.vector ->
    Gsl_vector_complex_flat.vector -> Gsl_complex.complex
    = "ml_gsl_blas_zdotu"
  external dotc :
    Gsl_vector_complex_flat.vector ->
    Gsl_vector_complex_flat.vector -> Gsl_complex.complex
    = "ml_gsl_blas_zdotc"
  external nrm2 : Gsl_vector_complex_flat.vector -> float
    = "ml_gsl_blas_znrm2"
  external asum : Gsl_vector_complex_flat.vector -> float
    = "ml_gsl_blas_zasum"
  external iamax : Gsl_vector_complex_flat.vector -> int
    = "ml_gsl_blas_izamax"
  external swap :
    Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zswap"
  external copy :
    Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zcopy"
  external axpy :
    Gsl_complex.complex ->
    Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zaxpy"
  external scal :
    Gsl_complex.complex -> Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zscal"
  external zdscal : float -> Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zdscal"
  external gemv :
    Gsl_blas_flat.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    x:Gsl_vector_complex_flat.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
  external trmv :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    a:Gsl_matrix_complex_flat.matrix ->
    x:Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_ztrmv"
  external trsv :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    a:Gsl_matrix_complex_flat.matrix ->
    x:Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_ztrsv"
  external hemv :
    Gsl_blas_flat.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    x:Gsl_vector_complex_flat.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
    = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
  external geru :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex_flat.vector ->
    y:Gsl_vector_complex_flat.vector ->
    a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zgeru"
  external gerc :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex_flat.vector ->
    y:Gsl_vector_complex_flat.vector ->
    a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zgerc"
  external her :
    Gsl_blas_flat.uplo ->
    alpha:float ->
    x:Gsl_vector_complex_flat.vector ->
    a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zher"
  external her2 :
    Gsl_blas_flat.uplo ->
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex_flat.vector ->
    y:Gsl_vector_complex_flat.vector ->
    a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zher2"
  external gemm :
    ta:Gsl_blas_flat.transpose ->
    tb:Gsl_blas_flat.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
  external symm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
  external syrk :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
  external syr2k :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
  external trmm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_ztrmm_bc"
    "ml_gsl_blas_ztrmm"
  external trsm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_ztrsm_bc"
    "ml_gsl_blas_ztrsm"
  external hemm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
  external herk :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:float ->
    a:Gsl_matrix_complex_flat.matrix ->
    beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
  external her2k :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex_flat.matrix ->
    b:Gsl_matrix_complex_flat.matrix ->
    beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
end
ocamlgsl-0.6.0/doc/Gsl_vectmat.html0000664000076400007640000003656110607755600015760 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vectmat

Module Gsl_vectmat


module Gsl_vectmat: sig .. end
Generic variant types for vectors and matrices


Real values


type vec = [ `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] 
val vec_convert : ?protect:bool ->
[< `A of float array
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
[> vec ]
type mat = [ `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] 
val mat_convert : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
[> mat ]
val mat_flat : ?protect:bool ->
[< `A of float array * int * int
| `AA of float array array
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
Gsl_matrix_flat.matrix

Complex values


type cvec = [ `CV of Gsl_vector_complex.vector | `CVF of Gsl_vector_complex_flat.vector ] 
type cmat = [ `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] 
val cmat_convert : ?protect:bool ->
[< `CA of Gsl_complex.complex_array * int * int
| `CM of Gsl_matrix_complex.matrix
| `CMF of Gsl_matrix_complex_flat.matrix ] ->
[> cmat ]

Generic vector operations


val length : [< `CV of Gsl_vector_complex.vector
| `CVF of Gsl_vector_complex_flat.vector
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
int
val to_array : [< vec ] -> float array
val v_copy : [< vec ] -> [> vec ]
val subvector : [< vec ] -> off:int -> len:int -> [> vec ]
val v_memcpy : [< vec ] -> [< vec ] -> unit
val v_add : [< vec ] -> [< vec ] -> unit
val v_sub : [< vec ] -> [< vec ] -> unit
val v_mul : [< vec ] -> [< vec ] -> unit
val v_div : [< vec ] -> [< vec ] -> unit
val v_max : [< vec ] -> float
val v_min : [< vec ] -> float
val v_minmax : [< vec ] -> float * float
val v_max_index : [< vec ] -> int
val v_min_index : [< vec ] -> int
val v_minmax_index : [< vec ] -> int * int

Generic matrix operations


val dims : [< `CM of Gsl_matrix_complex.matrix
| `CMF of Gsl_matrix_complex_flat.matrix
| `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix ] ->
int * int
val tmp : [< mat ] -> [> `M of Gsl_matrix.matrix ]
val to_arrays : [< mat ] -> float array array
val m_copy : [< mat ] -> [> mat ]
val m_memcpy : [< mat ] -> [< mat ] -> unit
val m_add : [< mat ] -> [< mat ] -> unit
val m_sub : [< mat ] -> [< mat ] -> unit
val m_mul : [< mat ] -> [< mat ] -> unit
val m_div : [< mat ] -> [< mat ] -> unit
val m_add_diagonal : [< mat ] -> float -> unit
val swap_rows : [< mat ] -> int -> int -> unit
val swap_columns : [< mat ] -> int -> int -> unit
val swap_rowcol : [< mat ] -> int -> int -> unit
val transpose : [< mat ] -> [< mat ] -> unit
val transpose_in_place : [< mat ] -> unit

Other generic operations


val is_null : [< `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
bool
val scale : [< `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
float -> unit
val add_constant : [< `M of Gsl_matrix.matrix
| `MF of Gsl_matrix_flat.matrix
| `V of Gsl_vector.vector
| `VF of Gsl_vector_flat.vector ] ->
float -> unit
ocamlgsl-0.6.0/doc/Gsl_rng.html0000664000076400007640000004664010607755604015106 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_rng

Module Gsl_rng


module Gsl_rng: sig .. end
Random Number Generation


type rng_type =
| BOROSH13
| COVEYOU
| CMRG
| FISHMAN18
| FISHMAN20
| FISHMAN2X
| GFSR4
| KNUTHRAN
| KNUTHRAN2
| KNUTHRAN2002
| LECUYER21
| MINSTD
| MRG
| MT19937
| MT19937_1999
| MT19937_1998
| R250
| RAN0
| RAN1
| RAN2
| RAN3
| RAND
| RAND48
| RANDOM128_BSD
| RANDOM128_GLIBC2
| RANDOM128_LIBC5
| RANDOM256_BSD
| RANDOM256_GLIBC2
| RANDOM256_LIBC5
| RANDOM32_BSD
| RANDOM32_GLIBC2
| RANDOM32_LIBC5
| RANDOM64_BSD
| RANDOM64_GLIBC2
| RANDOM64_LIBC5
| RANDOM8_BSD
| RANDOM8_GLIBC2
| RANDOM8_LIBC5
| RANDOM_BSD
| RANDOM_GLIBC2
| RANDOM_LIBC5
| RANDU
| RANF
| RANLUX
| RANLUX389
| RANLXD1
| RANLXD2
| RANLXS0
| RANLXS1
| RANLXS2
| RANMAR
| SLATEC
| TAUS
| TAUS_2
| TAUS_113
| TRANSPUTER
| TT800
| UNI
| UNI32
| VAX
| WATERMAN14
| ZUF
type t 

Default values


val default : unit -> rng_type
val default_seed : unit -> nativeint
val set_default : rng_type -> unit
val set_default_seed : nativeint -> unit
val env_setup : unit -> unit

Creating


val make : rng_type -> t
val set : t -> nativeint -> unit
val name : t -> string
val get_type : t -> rng_type

warning : the nativeint used for seeds are in fact unsigned but ocaml treats them as signed. But you can still print them using %nu with printf functions.
val max : t -> nativeint
val min : t -> nativeint
val memcpy : t -> t -> unit
val clone : t -> t
val dump_state : t -> string * string
val set_state : t -> string * string -> unit

Sampling


val get : t -> nativeint
val uniform : t -> float
val uniform_pos : t -> float
val uniform_int : t -> int -> int

These function fill the array with random numbers :
val uniform_arr : t -> float array -> unit
val uniform_pos_arr : t -> float array -> unit
ocamlgsl-0.6.0/doc/type_Gsl_const.html0000664000076400007640000005403610607755606016507 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_const sig
  val cgsm_speed_of_light : float
  val cgsm_gravitational_constant : float
  val cgsm_plancks_constant_h : float
  val cgsm_plancks_constant_hbar : float
  val cgsm_astronomical_unit : float
  val cgsm_light_year : float
  val cgsm_parsec : float
  val cgsm_grav_accel : float
  val cgsm_electron_volt : float
  val cgsm_mass_electron : float
  val cgsm_mass_muon : float
  val cgsm_mass_proton : float
  val cgsm_mass_neutron : float
  val cgsm_rydberg : float
  val cgsm_boltzmann : float
  val cgsm_bohr_magneton : float
  val cgsm_nuclear_magneton : float
  val cgsm_electron_magnetic_moment : float
  val cgsm_proton_magnetic_moment : float
  val cgsm_molar_gas : float
  val cgsm_standard_gas_volume : float
  val cgsm_minute : float
  val cgsm_hour : float
  val cgsm_day : float
  val cgsm_week : float
  val cgsm_inch : float
  val cgsm_foot : float
  val cgsm_yard : float
  val cgsm_mile : float
  val cgsm_nautical_mile : float
  val cgsm_fathom : float
  val cgsm_mil : float
  val cgsm_point : float
  val cgsm_texpoint : float
  val cgsm_micron : float
  val cgsm_angstrom : float
  val cgsm_hectare : float
  val cgsm_acre : float
  val cgsm_barn : float
  val cgsm_liter : float
  val cgsm_us_gallon : float
  val cgsm_quart : float
  val cgsm_pint : float
  val cgsm_cup : float
  val cgsm_fluid_ounce : float
  val cgsm_tablespoon : float
  val cgsm_teaspoon : float
  val cgsm_canadian_gallon : float
  val cgsm_uk_gallon : float
  val cgsm_miles_per_hour : float
  val cgsm_kilometers_per_hour : float
  val cgsm_knot : float
  val cgsm_pound_mass : float
  val cgsm_ounce_mass : float
  val cgsm_ton : float
  val cgsm_metric_ton : float
  val cgsm_uk_ton : float
  val cgsm_troy_ounce : float
  val cgsm_carat : float
  val cgsm_unified_atomic_mass : float
  val cgsm_gram_force : float
  val cgsm_pound_force : float
  val cgsm_kilopound_force : float
  val cgsm_poundal : float
  val cgsm_calorie : float
  val cgsm_btu : float
  val cgsm_therm : float
  val cgsm_horsepower : float
  val cgsm_bar : float
  val cgsm_std_atmosphere : float
  val cgsm_torr : float
  val cgsm_meter_of_mercury : float
  val cgsm_inch_of_mercury : float
  val cgsm_inch_of_water : float
  val cgsm_psi : float
  val cgsm_poise : float
  val cgsm_stokes : float
  val cgsm_faraday : float
  val cgsm_electron_charge : float
  val cgsm_gauss : float
  val cgsm_stilb : float
  val cgsm_lumen : float
  val cgsm_lux : float
  val cgsm_phot : float
  val cgsm_footcandle : float
  val cgsm_lambert : float
  val cgsm_footlambert : float
  val cgsm_curie : float
  val cgsm_roentgen : float
  val cgsm_rad : float
  val cgsm_solar_mass : float
  val cgsm_bohr_radius : float
  val cgsm_newton : float
  val cgsm_dyne : float
  val cgsm_joule : float
  val cgsm_erg : float
  val cgsm_stefan_boltzmann_constant : float
  val cgsm_thomson_cross_section : float
  val mksa_speed_of_light : float
  val mksa_gravitational_constant : float
  val mksa_plancks_constant_h : float
  val mksa_plancks_constant_hbar : float
  val mksa_astronomical_unit : float
  val mksa_light_year : float
  val mksa_parsec : float
  val mksa_grav_accel : float
  val mksa_electron_volt : float
  val mksa_mass_electron : float
  val mksa_mass_muon : float
  val mksa_mass_proton : float
  val mksa_mass_neutron : float
  val mksa_rydberg : float
  val mksa_boltzmann : float
  val mksa_bohr_magneton : float
  val mksa_nuclear_magneton : float
  val mksa_electron_magnetic_moment : float
  val mksa_proton_magnetic_moment : float
  val mksa_molar_gas : float
  val mksa_standard_gas_volume : float
  val mksa_minute : float
  val mksa_hour : float
  val mksa_day : float
  val mksa_week : float
  val mksa_inch : float
  val mksa_foot : float
  val mksa_yard : float
  val mksa_mile : float
  val mksa_nautical_mile : float
  val mksa_fathom : float
  val mksa_mil : float
  val mksa_point : float
  val mksa_texpoint : float
  val mksa_micron : float
  val mksa_angstrom : float
  val mksa_hectare : float
  val mksa_acre : float
  val mksa_barn : float
  val mksa_liter : float
  val mksa_us_gallon : float
  val mksa_quart : float
  val mksa_pint : float
  val mksa_cup : float
  val mksa_fluid_ounce : float
  val mksa_tablespoon : float
  val mksa_teaspoon : float
  val mksa_canadian_gallon : float
  val mksa_uk_gallon : float
  val mksa_miles_per_hour : float
  val mksa_kilometers_per_hour : float
  val mksa_knot : float
  val mksa_pound_mass : float
  val mksa_ounce_mass : float
  val mksa_ton : float
  val mksa_metric_ton : float
  val mksa_uk_ton : float
  val mksa_troy_ounce : float
  val mksa_carat : float
  val mksa_unified_atomic_mass : float
  val mksa_gram_force : float
  val mksa_pound_force : float
  val mksa_kilopound_force : float
  val mksa_poundal : float
  val mksa_calorie : float
  val mksa_btu : float
  val mksa_therm : float
  val mksa_horsepower : float
  val mksa_bar : float
  val mksa_std_atmosphere : float
  val mksa_torr : float
  val mksa_meter_of_mercury : float
  val mksa_inch_of_mercury : float
  val mksa_inch_of_water : float
  val mksa_psi : float
  val mksa_poise : float
  val mksa_stokes : float
  val mksa_faraday : float
  val mksa_electron_charge : float
  val mksa_gauss : float
  val mksa_stilb : float
  val mksa_lumen : float
  val mksa_lux : float
  val mksa_phot : float
  val mksa_footcandle : float
  val mksa_lambert : float
  val mksa_footlambert : float
  val mksa_curie : float
  val mksa_roentgen : float
  val mksa_rad : float
  val mksa_solar_mass : float
  val mksa_bohr_radius : float
  val mksa_newton : float
  val mksa_dyne : float
  val mksa_joule : float
  val mksa_erg : float
  val mksa_stefan_boltzmann_constant : float
  val mksa_thomson_cross_section : float
  val mksa_vacuum_permittivity : float
  val mksa_vacuum_permeability : float
  val mksa_debye : float
  val num_fine_structure : float
  val num_avogadro : float
  val num_yotta : float
  val num_zetta : float
  val num_exa : float
  val num_peta : float
  val num_tera : float
  val num_giga : float
  val num_mega : float
  val num_kilo : float
  val num_milli : float
  val num_micro : float
  val num_nano : float
  val num_pico : float
  val num_femto : float
  val num_atto : float
  val num_zepto : float
  val num_yocto : float
end
ocamlgsl-0.6.0/doc/Gsl_matrix.html0000664000076400007640000002325310607755577015630 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix

Module Gsl_matrix


module Gsl_matrix: sig .. end
Matrices of floats implemented with Bigarray

type double_mat_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t 
type matrix = double_mat_bigarr 
val create : ?init:float -> int -> int -> matrix
val dims : matrix -> int * int
val of_array : float array -> int -> int -> matrix
val of_arrays : float array array -> matrix
val to_array : matrix -> float array
val to_arrays : matrix -> float array array
val get : matrix -> int -> int -> float
val set : matrix -> int -> int -> float -> unit
val set_all : matrix -> float -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix -> dst:matrix -> unit
val copy : matrix -> matrix
val row : matrix -> int -> Gsl_vector.vector
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> float -> unit
val add_constant : matrix -> float -> unit
val add_diagonal : matrix -> float -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
module Single: sig .. end
ocamlgsl-0.6.0/doc/type_Gsl_vector.Single.html0000664000076400007640000003140010607755576020077 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector.Single sig
  type float_vector_bigarr =
      (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
  type vector = Gsl_vector.Single.float_vector_bigarr
  val create : ?init:float -> int -> Gsl_vector.Single.vector
  val of_array : float array -> Gsl_vector.Single.vector
  val to_array : Gsl_vector.Single.vector -> float array
  val length : Gsl_vector.Single.vector -> int
  val get : Gsl_vector.Single.vector -> int -> float
  val set : Gsl_vector.Single.vector -> int -> float -> unit
  val set_all : Gsl_vector.Single.vector -> float -> unit
  val set_zero : Gsl_vector.Single.vector -> unit
  val set_basis : Gsl_vector.Single.vector -> int -> unit
  val memcpy :
    src:Gsl_vector.Single.vector -> dst:Gsl_vector.Single.vector -> unit
  val copy : Gsl_vector.Single.vector -> Gsl_vector.Single.vector
  val swap_element : Gsl_vector.Single.vector -> int -> int -> unit
  val reverse : Gsl_vector.Single.vector -> unit
  external add : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_vector_float_add"
  external sub : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_vector_float_sub"
  external mul : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_vector_float_mul"
  external div : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_vector_float_div"
  external scale : Gsl_vector.Single.vector -> float -> unit
    = "ml_gsl_vector_float_scale"
  external add_constant : Gsl_vector.Single.vector -> float -> unit
    = "ml_gsl_vector_float_add_constant"
  external is_null : Gsl_vector.Single.vector -> bool
    = "ml_gsl_vector_float_isnull"
  external max : Gsl_vector.Single.vector -> float
    = "ml_gsl_vector_float_max"
  external min : Gsl_vector.Single.vector -> float
    = "ml_gsl_vector_float_min"
  external minmax : Gsl_vector.Single.vector -> float * float
    = "ml_gsl_vector_float_minmax"
  external max_index : Gsl_vector.Single.vector -> int
    = "ml_gsl_vector_float_maxindex"
  external min_index : Gsl_vector.Single.vector -> int
    = "ml_gsl_vector_float_minindex"
  external minmax_index : Gsl_vector.Single.vector -> int * int
    = "ml_gsl_vector_float_minmaxindex"
  val subvector :
    Gsl_vector.Single.vector ->
    off:int -> len:int -> Gsl_vector.Single.vector
end
ocamlgsl-0.6.0/doc/index_values.html0000664000076400007640000073074010607755611016200 0ustar olivoliv ocamlgsl 0.6.0 : Index of values

Index of values


_HH_solve [Gsl_linalg]
_HH_svx [Gsl_linalg]
_LQ_LQsolve [Gsl_linalg]
_LQ_Lsolve_T [Gsl_linalg]
_LQ_Lsvx_T [Gsl_linalg]
_LQ_decomp [Gsl_linalg]
_LQ_lssolve_T [Gsl_linalg]
_LQ_solve_T [Gsl_linalg]
_LQ_svx_T [Gsl_linalg]
_LQ_unpack [Gsl_linalg]
_LQ_update [Gsl_linalg]
_LQ_vecQ [Gsl_linalg]
_LQ_vecQT [Gsl_linalg]
_LU_decomp [Gsl_linalg]
_LU_det [Gsl_linalg]
_LU_invert [Gsl_linalg]
_LU_lndet [Gsl_linalg]
_LU_refine [Gsl_linalg]
_LU_sgndet [Gsl_linalg]
_LU_solve [Gsl_linalg]
_LU_svx [Gsl_linalg]
_L_solve_T [Gsl_linalg]
_PTLQ_LQsolve_T [Gsl_linalg]
_PTLQ_Lsolve_T [Gsl_linalg]
_PTLQ_Lsvx_T [Gsl_linalg]
_PTLQ_decomp [Gsl_linalg]
_PTLQ_decomp2 [Gsl_linalg]
_PTLQ_solve_T [Gsl_linalg]
_PTLQ_svx_T [Gsl_linalg]
_PTLQ_update [Gsl_linalg]
_QRPT_QRsolve [Gsl_linalg]
_QRPT_Rsolve [Gsl_linalg]
_QRPT_Rsvx [Gsl_linalg]
_QRPT_decomp [Gsl_linalg]
_QRPT_decomp2 [Gsl_linalg]
_QRPT_solve [Gsl_linalg]
_QRPT_svx [Gsl_linalg]
_QRPT_update [Gsl_linalg]
_QR_QRsolve [Gsl_linalg]
_QR_QTvec [Gsl_linalg]
_QR_Qvec [Gsl_linalg]
_QR_Rsolve [Gsl_linalg]
_QR_Rsvx [Gsl_linalg]
_QR_decomp [Gsl_linalg]
_QR_lssolve [Gsl_linalg]
_QR_solve [Gsl_linalg]
_QR_svx [Gsl_linalg]
_QR_unpack [Gsl_linalg]
_QR_update [Gsl_linalg]
_R_solve [Gsl_linalg]
_SV_decomp [Gsl_linalg]
_SV_decomp_jacobi [Gsl_linalg]
_SV_decomp_mod [Gsl_linalg]
_SV_solve [Gsl_linalg]
_eval [Gsl_bspline]
_exponential [Gsl_linalg]
_herm [Gsl_eigen]
_hermv [Gsl_eigen]
_linear [Gsl_multifit]
_linear_svd [Gsl_multifit]
_nonsymm [Gsl_eigen]
_nonsymm_Z [Gsl_eigen]
_nonsymmv [Gsl_eigen]
_nonsymmv_Z [Gsl_eigen]
_symm [Gsl_eigen]
_symmv [Gsl_eigen]

A
abs [Gsl_complex]
abs2 [Gsl_complex]
absdev [Gsl_stats]
accel [Gsl_sum.Trunc]
accel [Gsl_sum]
accumulate [Gsl_histo]
acosh [Gsl_math]
add [Gsl_histo]
add [Gsl_matrix_complex_flat]
add [Gsl_matrix_complex.Single]
add [Gsl_matrix_complex]
add [Gsl_matrix_flat]
add [Gsl_matrix.Single]
add [Gsl_matrix]
add [Gsl_vector_flat]
add [Gsl_vector.Single]
add [Gsl_vector]
add [Gsl_complex]
add_constant [Gsl_vectmat]
add_constant [Gsl_matrix_complex_flat]
add_constant [Gsl_matrix_complex.Single]
add_constant [Gsl_matrix_complex]
add_constant [Gsl_matrix_flat]
add_constant [Gsl_matrix.Single]
add_constant [Gsl_matrix]
add_constant [Gsl_vector_flat]
add_constant [Gsl_vector.Single]
add_constant [Gsl_vector]
add_diagonal [Gsl_matrix_complex_flat]
add_diagonal [Gsl_matrix_complex.Single]
add_diagonal [Gsl_matrix_complex]
add_diagonal [Gsl_matrix_flat]
add_diagonal [Gsl_matrix.Single]
add_diagonal [Gsl_matrix]
add_imag [Gsl_complex]
add_real [Gsl_complex]
airy_Ai [Gsl_sf]
airy_Ai_deriv [Gsl_sf]
airy_Ai_deriv_e [Gsl_sf]
airy_Ai_deriv_scaled [Gsl_sf]
airy_Ai_deriv_scaled_e [Gsl_sf]
airy_Ai_e [Gsl_sf]
airy_Ai_scaled [Gsl_sf]
airy_Ai_scaled_e [Gsl_sf]
airy_Bi [Gsl_sf]
airy_Bi_deriv [Gsl_sf]
airy_Bi_deriv_e [Gsl_sf]
airy_Bi_deriv_scaled [Gsl_sf]
airy_Bi_deriv_scaled_e [Gsl_sf]
airy_Bi_e [Gsl_sf]
airy_Bi_scaled [Gsl_sf]
airy_Bi_scaled_e [Gsl_sf]
airy_zero_Ai [Gsl_sf]
airy_zero_Ai_e [Gsl_sf]
airy_zero_Bi [Gsl_sf]
airy_zero_Bi_e [Gsl_sf]
alloc_qawo [Gsl_integration]
alloc_qaws [Gsl_integration]
angle_restrict_pos [Gsl_sf]
angle_restrict_symm [Gsl_sf]
arccos [Gsl_complex]
arccos_real [Gsl_complex]
arccosh [Gsl_complex]
arccosh_real [Gsl_complex]
arccot [Gsl_complex]
arccoth [Gsl_complex]
arccsc [Gsl_complex]
arccsc_real [Gsl_complex]
arccsch [Gsl_complex]
arcsec [Gsl_complex]
arcsec_real [Gsl_complex]
arcsech [Gsl_complex]
arcsin [Gsl_complex]
arcsin_real [Gsl_complex]
arcsinh [Gsl_complex]
arctan [Gsl_complex]
arctanh [Gsl_complex]
arctanh_real [Gsl_complex]
arg [Gsl_complex]
asinh [Gsl_math]
asum [Gsl_blas_gen.Complex]
asum [Gsl_blas_gen]
asum [Gsl_blas_flat.Complex]
asum [Gsl_blas_flat]
asum [Gsl_blas.Complex_Single]
asum [Gsl_blas.Complex]
asum [Gsl_blas.Single]
asum [Gsl_blas]
atanh [Gsl_math]
atanint [Gsl_sf]
atanint_e [Gsl_sf]
axpy [Gsl_blas_gen.Complex]
axpy [Gsl_blas_gen]
axpy [Gsl_blas_flat.Complex]
axpy [Gsl_blas_flat]
axpy [Gsl_blas.Complex_Single]
axpy [Gsl_blas.Complex]
axpy [Gsl_blas.Single]
axpy [Gsl_blas]

B
backward [Gsl_fft.Complex]
backward [Gsl_fft.Halfcomplex]
backward [Gsl_diff]
backward_rad2 [Gsl_fft.Complex]
backward_rad2 [Gsl_fft.Halfcomplex]
bernoulli [Gsl_randist]
bernoulli_pdf [Gsl_randist]
bessel_I0 [Gsl_sf]
bessel_I0_e [Gsl_sf]
bessel_I0_scaled [Gsl_sf]
bessel_I0_scaled_e [Gsl_sf]
bessel_I1 [Gsl_sf]
bessel_I1_e [Gsl_sf]
bessel_I1_scaled [Gsl_sf]
bessel_I1_scaled_e [Gsl_sf]
bessel_In [Gsl_sf]
bessel_In_array [Gsl_sf]
bessel_In_e [Gsl_sf]
bessel_In_scaled_array [Gsl_sf]
bessel_Inu [Gsl_sf]
bessel_Inu_e [Gsl_sf]
bessel_Inu_scaled [Gsl_sf]
bessel_Inu_scaled_e [Gsl_sf]
bessel_J0 [Gsl_sf]
bessel_J0_e [Gsl_sf]
bessel_J1 [Gsl_sf]
bessel_J1_e [Gsl_sf]
bessel_Jn [Gsl_sf]
bessel_Jn_array [Gsl_sf]
bessel_Jn_e [Gsl_sf]
bessel_Jnu [Gsl_sf]
bessel_Jnu_e [Gsl_sf]
bessel_K0 [Gsl_sf]
bessel_K0_e [Gsl_sf]
bessel_K0_scaled [Gsl_sf]
bessel_K0_scaled_e [Gsl_sf]
bessel_K1 [Gsl_sf]
bessel_K1_e [Gsl_sf]
bessel_K1_scaled [Gsl_sf]
bessel_K1_scaled_e [Gsl_sf]
bessel_Kn [Gsl_sf]
bessel_Kn_array [Gsl_sf]
bessel_Kn_e [Gsl_sf]
bessel_Kn_scaled_array [Gsl_sf]
bessel_Knu [Gsl_sf]
bessel_Knu_e [Gsl_sf]
bessel_Knu_scaled [Gsl_sf]
bessel_Knu_scaled_e [Gsl_sf]
bessel_Y0 [Gsl_sf]
bessel_Y0_e [Gsl_sf]
bessel_Y1 [Gsl_sf]
bessel_Y1_e [Gsl_sf]
bessel_Yn [Gsl_sf]
bessel_Yn_array [Gsl_sf]
bessel_Yn_e [Gsl_sf]
bessel_Ynu [Gsl_sf]
bessel_Ynu_e [Gsl_sf]
bessel_i0_scaled [Gsl_sf]
bessel_i0_scaled_e [Gsl_sf]
bessel_i1_scaled [Gsl_sf]
bessel_i1_scaled_e [Gsl_sf]
bessel_il_scaled [Gsl_sf]
bessel_il_scaled_array [Gsl_sf]
bessel_il_scaled_e [Gsl_sf]
bessel_j0 [Gsl_sf]
bessel_j0_e [Gsl_sf]
bessel_j1 [Gsl_sf]
bessel_j1_e [Gsl_sf]
bessel_j2 [Gsl_sf]
bessel_j2_e [Gsl_sf]
bessel_jl [Gsl_sf]
bessel_jl_array [Gsl_sf]
bessel_jl_e [Gsl_sf]
bessel_jl_steed_array [Gsl_sf]
bessel_k0_scaled [Gsl_sf]
bessel_k0_scaled_e [Gsl_sf]
bessel_k1_scaled [Gsl_sf]
bessel_k1_scaled_e [Gsl_sf]
bessel_kl_scaled [Gsl_sf]
bessel_kl_scaled_array [Gsl_sf]
bessel_kl_scaled_e [Gsl_sf]
bessel_lnKnu [Gsl_sf]
bessel_lnKnu_e [Gsl_sf]
bessel_sequence_Jnu_e [Gsl_sf]
bessel_y0 [Gsl_sf]
bessel_y0_e [Gsl_sf]
bessel_y1 [Gsl_sf]
bessel_y1_e [Gsl_sf]
bessel_y2 [Gsl_sf]
bessel_y2_e [Gsl_sf]
bessel_yl [Gsl_sf]
bessel_yl_array [Gsl_sf]
bessel_yl_e [Gsl_sf]
bessel_zero_J0 [Gsl_sf]
bessel_zero_J0_e [Gsl_sf]
bessel_zero_J1 [Gsl_sf]
bessel_zero_J1_e [Gsl_sf]
bessel_zero_Jnu [Gsl_sf]
bessel_zero_Jnu_e [Gsl_sf]
beta [Gsl_sf]
beta [Gsl_randist]
beta_P [Gsl_cdf]
beta_Pinv [Gsl_cdf]
beta_Q [Gsl_cdf]
beta_Qinv [Gsl_cdf]
beta_e [Gsl_sf]
beta_inc [Gsl_sf]
beta_inc_e [Gsl_sf]
beta_pdf [Gsl_randist]
bidiag_decomp [Gsl_linalg]
bidiag_unpack [Gsl_linalg]
bidiag_unpack2 [Gsl_linalg]
bidiag_unpack_B [Gsl_linalg]
binomial [Gsl_randist]
binomial_P [Gsl_cdf]
binomial_Q [Gsl_cdf]
binomial_knuth [Gsl_randist]
binomial_pdf [Gsl_randist]
binomial_tpe [Gsl_randist]
bins [Gsl_histo]
bivariate_gaussian [Gsl_randist]
bivariate_gaussian_pdf [Gsl_randist]

C
cauchy [Gsl_randist]
cauchy_P [Gsl_cdf]
cauchy_Pinv [Gsl_cdf]
cauchy_Q [Gsl_cdf]
cauchy_Qinv [Gsl_cdf]
cauchy_pdf [Gsl_randist]
central [Gsl_diff]
cgsm_acre [Gsl_const]
cgsm_angstrom [Gsl_const]
cgsm_astronomical_unit [Gsl_const]
cgsm_bar [Gsl_const]
cgsm_barn [Gsl_const]
cgsm_bohr_magneton [Gsl_const]
cgsm_bohr_radius [Gsl_const]
cgsm_boltzmann [Gsl_const]
cgsm_btu [Gsl_const]
cgsm_calorie [Gsl_const]
cgsm_canadian_gallon [Gsl_const]
cgsm_carat [Gsl_const]
cgsm_cup [Gsl_const]
cgsm_curie [Gsl_const]
cgsm_day [Gsl_const]
cgsm_dyne [Gsl_const]
cgsm_electron_charge [Gsl_const]
cgsm_electron_magnetic_moment [Gsl_const]
cgsm_electron_volt [Gsl_const]
cgsm_erg [Gsl_const]
cgsm_faraday [Gsl_const]
cgsm_fathom [Gsl_const]
cgsm_fluid_ounce [Gsl_const]
cgsm_foot [Gsl_const]
cgsm_footcandle [Gsl_const]
cgsm_footlambert [Gsl_const]
cgsm_gauss [Gsl_const]
cgsm_gram_force [Gsl_const]
cgsm_grav_accel [Gsl_const]
cgsm_gravitational_constant [Gsl_const]
cgsm_hectare [Gsl_const]
cgsm_horsepower [Gsl_const]
cgsm_hour [Gsl_const]
cgsm_inch [Gsl_const]
cgsm_inch_of_mercury [Gsl_const]
cgsm_inch_of_water [Gsl_const]
cgsm_joule [Gsl_const]
cgsm_kilometers_per_hour [Gsl_const]
cgsm_kilopound_force [Gsl_const]
cgsm_knot [Gsl_const]
cgsm_lambert [Gsl_const]
cgsm_light_year [Gsl_const]
cgsm_liter [Gsl_const]
cgsm_lumen [Gsl_const]
cgsm_lux [Gsl_const]
cgsm_mass_electron [Gsl_const]
cgsm_mass_muon [Gsl_const]
cgsm_mass_neutron [Gsl_const]
cgsm_mass_proton [Gsl_const]
cgsm_meter_of_mercury [Gsl_const]
cgsm_metric_ton [Gsl_const]
cgsm_micron [Gsl_const]
cgsm_mil [Gsl_const]
cgsm_mile [Gsl_const]
cgsm_miles_per_hour [Gsl_const]
cgsm_minute [Gsl_const]
cgsm_molar_gas [Gsl_const]
cgsm_nautical_mile [Gsl_const]
cgsm_newton [Gsl_const]
cgsm_nuclear_magneton [Gsl_const]
cgsm_ounce_mass [Gsl_const]
cgsm_parsec [Gsl_const]
cgsm_phot [Gsl_const]
cgsm_pint [Gsl_const]
cgsm_plancks_constant_h [Gsl_const]
cgsm_plancks_constant_hbar [Gsl_const]
cgsm_point [Gsl_const]
cgsm_poise [Gsl_const]
cgsm_pound_force [Gsl_const]
cgsm_pound_mass [Gsl_const]
cgsm_poundal [Gsl_const]
cgsm_proton_magnetic_moment [Gsl_const]
cgsm_psi [Gsl_const]
cgsm_quart [Gsl_const]
cgsm_rad [Gsl_const]
cgsm_roentgen [Gsl_const]
cgsm_rydberg [Gsl_const]
cgsm_solar_mass [Gsl_const]
cgsm_speed_of_light [Gsl_const]
cgsm_standard_gas_volume [Gsl_const]
cgsm_std_atmosphere [Gsl_const]
cgsm_stefan_boltzmann_constant [Gsl_const]
cgsm_stilb [Gsl_const]
cgsm_stokes [Gsl_const]
cgsm_tablespoon [Gsl_const]
cgsm_teaspoon [Gsl_const]
cgsm_texpoint [Gsl_const]
cgsm_therm [Gsl_const]
cgsm_thomson_cross_section [Gsl_const]
cgsm_ton [Gsl_const]
cgsm_torr [Gsl_const]
cgsm_troy_ounce [Gsl_const]
cgsm_uk_gallon [Gsl_const]
cgsm_uk_ton [Gsl_const]
cgsm_unified_atomic_mass [Gsl_const]
cgsm_us_gallon [Gsl_const]
cgsm_week [Gsl_const]
cgsm_yard [Gsl_const]
check [Gsl_histo]
check [Gsl_vector_flat]
chi [Gsl_sf]
chisq [Gsl_randist]
chisq_P [Gsl_cdf]
chisq_Pinv [Gsl_cdf]
chisq_Q [Gsl_cdf]
chisq_Qinv [Gsl_cdf]
chisq_pdf [Gsl_randist]
cho_decomp [Gsl_linalg]
cho_decomp_unit [Gsl_linalg]
cho_solve [Gsl_linalg]
cho_svx [Gsl_linalg]
choose [Gsl_sf]
choose [Gsl_randist]
choose_e [Gsl_sf]
ci [Gsl_sf]
clausen [Gsl_sf]
clausen_e [Gsl_sf]
clear_except [Gsl_ieee]
clone [Gsl_qrng]
clone [Gsl_rng]
cmat_convert [Gsl_vectmat]
coefs [Gsl_cheb]
column [Gsl_matrix_complex_flat]
column [Gsl_matrix_flat]
complex [Gsl_complex]
complex_LU_decomp [Gsl_linalg]
complex_LU_det [Gsl_linalg]
complex_LU_invert [Gsl_linalg]
complex_LU_lndet [Gsl_linalg]
complex_LU_refine [Gsl_linalg]
complex_LU_sgndet [Gsl_linalg]
complex_LU_solve [Gsl_linalg]
complex_LU_svx [Gsl_linalg]
complex_cos_e [Gsl_sf]
complex_dilog_e [Gsl_sf]
complex_dilog_xy_e [Gsl_sf]
complex_logsin_e [Gsl_sf]
complex_sin_e [Gsl_sf]
complex_solve_cubic [Gsl_poly]
complex_solve_quadratic [Gsl_poly]
complex_spence_xy_e [Gsl_sf]
conjugate [Gsl_complex]
control_hadjust [Gsl_odeiv]
control_name [Gsl_odeiv]
copy [Gsl_histo]
copy [Gsl_blas_gen.Complex]
copy [Gsl_blas_gen]
copy [Gsl_blas_flat.Complex]
copy [Gsl_blas_flat]
copy [Gsl_blas.Complex_Single]
copy [Gsl_blas.Complex]
copy [Gsl_blas.Single]
copy [Gsl_blas]
copy [Gsl_matrix_complex_flat]
copy [Gsl_matrix_complex.Single]
copy [Gsl_matrix_complex]
copy [Gsl_matrix_flat]
copy [Gsl_matrix.Single]
copy [Gsl_matrix]
copy [Gsl_vector_complex_flat]
copy [Gsl_vector_complex.Single]
copy [Gsl_vector_complex]
copy [Gsl_vector_flat]
copy [Gsl_vector.Single]
copy [Gsl_vector]
cos [Gsl_sf]
cos [Gsl_complex]
cos_e [Gsl_sf]
cos_err_e [Gsl_sf]
cosh [Gsl_complex]
cot [Gsl_complex]
coth [Gsl_complex]
coulomb_CL_array [Gsl_sf]
coulomb_CL_e [Gsl_sf]
covar [Gsl_multifit_nlin]
covariance [Gsl_stats]
covariance_m [Gsl_stats]
create [Gsl_permut]
create [Gsl_matrix_complex_flat]
create [Gsl_matrix_complex.Single]
create [Gsl_matrix_complex]
create [Gsl_matrix_flat]
create [Gsl_matrix.Single]
create [Gsl_matrix]
create [Gsl_vector_complex_flat]
create [Gsl_vector_complex.Single]
create [Gsl_vector_complex]
create [Gsl_vector_flat]
create [Gsl_vector.Single]
create [Gsl_vector]
csc [Gsl_complex]
csch [Gsl_complex]
csscal [Gsl_blas.Complex_Single]

D
dawson [Gsl_sf]
dawson_e [Gsl_sf]
debye_1 [Gsl_sf]
debye_1_e [Gsl_sf]
debye_2 [Gsl_sf]
debye_2_e [Gsl_sf]
debye_3 [Gsl_sf]
debye_3_e [Gsl_sf]
debye_4 [Gsl_sf]
debye_4_e [Gsl_sf]
debye_5 [Gsl_sf]
debye_5_e [Gsl_sf]
debye_6 [Gsl_sf]
debye_6_e [Gsl_sf]
decomp_LU [Gsl_linalg]
default [Gsl_rng]
default_seed [Gsl_rng]
deriv [Gsl_cheb]
det_LU [Gsl_linalg]
dger [Gsl_blas_gen]
dger [Gsl_blas_flat]
dger [Gsl_blas.Single]
dger [Gsl_blas]
diagonal [Gsl_matrix_complex_flat]
diagonal [Gsl_matrix_flat]
dilog [Gsl_sf]
dilog_e [Gsl_sf]
dimension [Gsl_qrng]
dims [Gsl_vectmat]
dims [Gsl_matrix_complex_flat]
dims [Gsl_matrix_complex.Single]
dims [Gsl_matrix_complex]
dims [Gsl_matrix_flat]
dims [Gsl_matrix.Single]
dims [Gsl_matrix]
dir_2d [Gsl_randist]
dir_2d_trig_method [Gsl_randist]
dir_3d [Gsl_randist]
dir_nd [Gsl_randist]
dirichlet [Gsl_randist]
dirichlet_lnpdf [Gsl_randist]
dirichlet_pdf [Gsl_randist]
discrete [Gsl_randist]
discrete_pdf [Gsl_randist]
discrete_preproc [Gsl_randist]
div [Gsl_histo]
div [Gsl_vector_flat]
div [Gsl_vector.Single]
div [Gsl_vector]
div [Gsl_complex]
div_elements [Gsl_matrix_complex_flat]
div_elements [Gsl_matrix_complex.Single]
div_elements [Gsl_matrix_complex]
div_elements [Gsl_matrix_flat]
div_elements [Gsl_matrix.Single]
div_elements [Gsl_matrix]
div_imag [Gsl_complex]
div_real [Gsl_complex]
dot [Gsl_blas_gen]
dot [Gsl_blas_flat]
dot [Gsl_blas.Single]
dot [Gsl_blas]
dotc [Gsl_blas_gen.Complex]
dotc [Gsl_blas_flat.Complex]
dotc [Gsl_blas.Complex_Single]
dotc [Gsl_blas.Complex]
dotu [Gsl_blas_gen.Complex]
dotu [Gsl_blas_flat.Complex]
dotu [Gsl_blas.Complex_Single]
dotu [Gsl_blas.Complex]
doublefact [Gsl_sf]
doublefact_e [Gsl_sf]
dsdot [Gsl_blas.Single]
dump_state [Gsl_rng]

E
e [Gsl_math]
e
ellint_D [Gsl_sf]
ellint_D_e [Gsl_sf]
ellint_Dcomp [Gsl_sf]
ellint_Dcomp_e [Gsl_sf]
ellint_E [Gsl_sf]
ellint_E_e [Gsl_sf]
ellint_Ecomp [Gsl_sf]
ellint_Ecomp_e [Gsl_sf]
ellint_F [Gsl_sf]
ellint_F_e [Gsl_sf]
ellint_Kcomp [Gsl_sf]
ellint_Kcomp_e [Gsl_sf]
ellint_P [Gsl_sf]
ellint_P_e [Gsl_sf]
ellint_Pcomp [Gsl_sf]
ellint_Pcomp_e [Gsl_sf]
ellint_RC [Gsl_sf]
ellint_RC_e [Gsl_sf]
ellint_RD [Gsl_sf]
ellint_RD_e [Gsl_sf]
ellint_RF [Gsl_sf]
ellint_RF_e [Gsl_sf]
ellint_RJ [Gsl_sf]
ellint_RJ_e [Gsl_sf]
env_setup [Gsl_rng]
env_setup [Gsl_ieee]
equal_bins_p [Gsl_histo]
erf [Gsl_sf]
erf_Q [Gsl_sf]
erf_Q_e [Gsl_sf]
erf_Z [Gsl_sf]
erf_Z_e [Gsl_sf]
erf_e [Gsl_sf]
erfc [Gsl_sf]
erfc_e [Gsl_sf]
eta [Gsl_sf]
eta_e [Gsl_sf]
eta_int [Gsl_sf]
eta_int_e [Gsl_sf]
euler [Gsl_math]
Euler constant
eval [Gsl_bspline]
eval [Gsl_cheb]
eval [Gsl_interp]
eval [Gsl_poly]
eval_array [Gsl_interp]
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.
eval_deriv [Gsl_interp]
eval_deriv2 [Gsl_interp]
eval_err [Gsl_cheb]
eval_integ [Gsl_interp]
evolve_apply [Gsl_odeiv]
evolve_reset [Gsl_odeiv]
exp [Gsl_sf]
exp [Gsl_complex]
exp_e [Gsl_sf]
exp_e10 [Gsl_sf]
exp_err_e [Gsl_sf]
exp_err_e10 [Gsl_sf]
exp_mult [Gsl_sf]
exp_mult_e [Gsl_sf]
exp_mult_e10 [Gsl_sf]
exp_mult_err_e [Gsl_sf]
exp_mult_err_e10_e [Gsl_sf]
expint_3 [Gsl_sf]
expint_3_e [Gsl_sf]
expint_E1 [Gsl_sf]
expint_E1_e [Gsl_sf]
expint_E1_scaled [Gsl_sf]
expint_E1_scaled_e [Gsl_sf]
expint_E2 [Gsl_sf]
expint_E2_e [Gsl_sf]
expint_E2_scaled [Gsl_sf]
expint_E2_scaled_e [Gsl_sf]
expint_Ei [Gsl_sf]
expint_Ei_e [Gsl_sf]
expint_Ei_scaled [Gsl_sf]
expint_Ei_scaled_e [Gsl_sf]
expm1 [Gsl_sf]
expm1 [Gsl_math]
expm1_e [Gsl_sf]
exponential [Gsl_randist]
exponential [Gsl_linalg]
exponential_P [Gsl_cdf]
exponential_Pinv [Gsl_cdf]
exponential_Q [Gsl_cdf]
exponential_Qinv [Gsl_cdf]
exponential_pdf [Gsl_randist]
exppow [Gsl_randist]
exppow_P [Gsl_cdf]
exppow_Q [Gsl_cdf]
exppow_pdf [Gsl_randist]
exprel [Gsl_sf]
exprel_2 [Gsl_sf]
exprel_2_e [Gsl_sf]
exprel_e [Gsl_sf]
exprel_n [Gsl_sf]
exprel_n_e [Gsl_sf]

F
fact [Gsl_sf]
fact_e [Gsl_sf]
fcmp [Gsl_math]
fdist [Gsl_randist]
fdist_P [Gsl_cdf]
fdist_Pinv [Gsl_cdf]
fdist_Q [Gsl_cdf]
fdist_Qinv [Gsl_cdf]
fdist_pdf [Gsl_randist]
fermi_dirac_0 [Gsl_sf]
fermi_dirac_0_e [Gsl_sf]
fermi_dirac_1 [Gsl_sf]
fermi_dirac_1_e [Gsl_sf]
fermi_dirac_2 [Gsl_sf]
fermi_dirac_2_e [Gsl_sf]
fermi_dirac_3half [Gsl_sf]
fermi_dirac_3half_e [Gsl_sf]
fermi_dirac_half [Gsl_sf]
fermi_dirac_half_e [Gsl_sf]
fermi_dirac_inc_0 [Gsl_sf]
fermi_dirac_inc_0_e [Gsl_sf]
fermi_dirac_int [Gsl_sf]
fermi_dirac_int_e [Gsl_sf]
fermi_dirac_m1 [Gsl_sf]
fermi_dirac_m1_e [Gsl_sf]
fermi_dirac_mhalf [Gsl_sf]
fermi_dirac_mhalf_e [Gsl_sf]
find [Gsl_histo]
fit_poly [Gsl_multifit]
flat [Gsl_randist]
flat_P [Gsl_cdf]
flat_Pinv [Gsl_cdf]
flat_Q [Gsl_cdf]
flat_Qinv [Gsl_cdf]
flat_pdf [Gsl_randist]
forward [Gsl_fft.Complex]
forward [Gsl_diff]
forward_rad2 [Gsl_fft.Complex]
free_qawo [Gsl_integration]
free_qaws [Gsl_integration]

G
gamma [Gsl_sf]
gamma [Gsl_randist]
gamma_P [Gsl_cdf]
gamma_Pinv [Gsl_cdf]
gamma_Q [Gsl_cdf]
gamma_Qinv [Gsl_cdf]
gamma_e [Gsl_sf]
gamma_inc [Gsl_sf]
gamma_inc_P [Gsl_sf]
gamma_inc_P_e [Gsl_sf]
gamma_inc_Q [Gsl_sf]
gamma_inc_Q_e [Gsl_sf]
gamma_inc_e [Gsl_sf]
gamma_int [Gsl_randist]
gamma_knuth [Gsl_randist]
gamma_mt [Gsl_randist]
gamma_pdf [Gsl_randist]
gammainv [Gsl_sf]
gammainv_e [Gsl_sf]
gammastar [Gsl_sf]
gammastar_e [Gsl_sf]
gaussian [Gsl_randist]
gaussian_P [Gsl_cdf]
gaussian_Pinv [Gsl_cdf]
gaussian_Q [Gsl_cdf]
gaussian_Qinv [Gsl_cdf]
gaussian_pdf [Gsl_randist]
gaussian_ratio_method [Gsl_randist]
gaussian_tail [Gsl_randist]
gaussian_tail_pdf [Gsl_randist]
gaussian_ziggurat [Gsl_randist]
gegenpoly_1 [Gsl_sf]
gegenpoly_1_e [Gsl_sf]
gegenpoly_2 [Gsl_sf]
gegenpoly_2_e [Gsl_sf]
gegenpoly_3 [Gsl_sf]
gegenpoly_3_e [Gsl_sf]
gegenpoly_array [Gsl_sf]
gegenpoly_n [Gsl_sf]
gegenpoly_n_e [Gsl_sf]
gemm [Gsl_blas_gen.Complex]
gemm [Gsl_blas_gen]
gemm [Gsl_blas_flat.Complex]
gemm [Gsl_blas_flat]
gemm [Gsl_blas.Complex_Single]
gemm [Gsl_blas.Complex]
gemm [Gsl_blas.Single]
gemm [Gsl_blas]
gemv [Gsl_blas_gen.Complex]
gemv [Gsl_blas_gen]
gemv [Gsl_blas_flat.Complex]
gemv [Gsl_blas_flat]
gemv [Gsl_blas.Complex_Single]
gemv [Gsl_blas.Complex]
gemv [Gsl_blas.Single]
gemv [Gsl_blas]
geometric [Gsl_randist]
geometric_P [Gsl_cdf]
geometric_Q [Gsl_cdf]
geometric_pdf [Gsl_randist]
gerc [Gsl_blas_gen.Complex]
gerc [Gsl_blas_flat.Complex]
gerc [Gsl_blas.Complex_Single]
gerc [Gsl_blas.Complex]
geru [Gsl_blas_gen.Complex]
geru [Gsl_blas_flat.Complex]
geru [Gsl_blas.Complex_Single]
geru [Gsl_blas.Complex]
get [Gsl_histo]
get [Gsl_qrng]
get [Gsl_rng]
get [Gsl_matrix_complex_flat]
get [Gsl_matrix_complex.Single]
get [Gsl_matrix_complex]
get [Gsl_matrix_flat]
get [Gsl_matrix.Single]
get [Gsl_matrix]
get [Gsl_vector_complex_flat]
get [Gsl_vector_complex.Single]
get [Gsl_vector_complex]
get [Gsl_vector_flat]
get [Gsl_vector.Single]
get [Gsl_vector]
get [Gsl_complex]
get_info [Gsl_sum.Trunc]
get_info [Gsl_sum]
get_miser_params [Gsl_monte]
get_range [Gsl_histo]
get_state [Gsl_multiroot.Deriv]
get_state [Gsl_multiroot.NoDeriv]
get_state [Gsl_multifit_nlin]
get_type [Gsl_rng]
get_vegas_info [Gsl_monte]
get_vegas_params [Gsl_monte]
gumbel1 [Gsl_randist]
gumbel1_P [Gsl_cdf]
gumbel1_Pinv [Gsl_cdf]
gumbel1_Q [Gsl_cdf]
gumbel1_Qinv [Gsl_cdf]
gumbel1_pdf [Gsl_randist]
gumbel2 [Gsl_randist]
gumbel2_P [Gsl_cdf]
gumbel2_Pinv [Gsl_cdf]
gumbel2_Q [Gsl_cdf]
gumbel2_Qinv [Gsl_cdf]
gumbel2_pdf [Gsl_randist]

H
h_max [Gsl_histo]
h_min [Gsl_histo]
handle_exn [Gsl_error]
hc_mult [Gsl_fft]
hc_mult_rad2 [Gsl_fft]
hemm [Gsl_blas_gen.Complex]
hemm [Gsl_blas_flat.Complex]
hemm [Gsl_blas.Complex_Single]
hemm [Gsl_blas.Complex]
hemv [Gsl_blas_gen.Complex]
hemv [Gsl_blas_flat.Complex]
hemv [Gsl_blas.Complex_Single]
hemv [Gsl_blas.Complex]
her [Gsl_blas_gen.Complex]
her [Gsl_blas_flat.Complex]
her [Gsl_blas.Complex_Single]
her [Gsl_blas.Complex]
her2 [Gsl_blas_gen.Complex]
her2 [Gsl_blas_flat.Complex]
her2 [Gsl_blas.Complex_Single]
her2 [Gsl_blas.Complex]
her2k [Gsl_blas_gen.Complex]
her2k [Gsl_blas_flat.Complex]
her2k [Gsl_blas.Complex_Single]
her2k [Gsl_blas.Complex]
herk [Gsl_blas_gen.Complex]
herk [Gsl_blas_flat.Complex]
herk [Gsl_blas.Complex_Single]
herk [Gsl_blas.Complex]
herm [Gsl_eigen]
hermtd_decomp [Gsl_linalg]
hermtd_unpack [Gsl_linalg]
hermtd_unpack_T [Gsl_linalg]
hermv [Gsl_eigen]
hermv_sort [Gsl_eigen]
hydrogenicR [Gsl_sf]
hydrogenicR_1 [Gsl_sf]
hydrogenicR_1_e [Gsl_sf]
hydrogenicR_e [Gsl_sf]
hypergeometric [Gsl_randist]
hypergeometric_pdf [Gsl_randist]
hypot [Gsl_sf]
hypot [Gsl_math]
hypot_e [Gsl_sf]
hzeta [Gsl_sf]
hzeta_e [Gsl_sf]

I
i_1_pi [Gsl_math]
1/pi
i_2_pi [Gsl_math]
2/pi
i_2_sqrtpi [Gsl_math]
2/sqrt(pi)
i_eval [Gsl_interp]
i_eval_deriv [Gsl_interp]
i_eval_deriv2 [Gsl_interp]
i_eval_integ [Gsl_interp]
iamax [Gsl_blas_gen.Complex]
iamax [Gsl_blas_gen]
iamax [Gsl_blas_flat.Complex]
iamax [Gsl_blas_flat]
iamax [Gsl_blas.Complex_Single]
iamax [Gsl_blas.Complex]
iamax [Gsl_blas.Single]
iamax [Gsl_blas]
imag [Gsl_vector_complex_flat]
init [Gsl_histo]
init [Gsl_cheb]
init [Gsl_qrng]
init [Gsl_interp]
init [Gsl_permut]
init [Gsl_error]
init_miser [Gsl_monte]
init_plain [Gsl_monte]
init_vegas [Gsl_monte]
integ [Gsl_cheb]
integrate [Gsl_monte]
integrate_miser [Gsl_monte]
integrate_plain [Gsl_monte]
integrate_vegas [Gsl_monte]
interval [Gsl_min]
interval [Gsl_root.Bracket]
inverse [Gsl_fft.Complex]
inverse [Gsl_fft.Halfcomplex]
inverse [Gsl_permut]
inverse [Gsl_complex]
inverse_rad2 [Gsl_fft.Complex]
inverse_rad2 [Gsl_fft.Halfcomplex]
invert_LU [Gsl_linalg]
is_null [Gsl_vectmat]
is_null [Gsl_matrix_complex_flat]
is_null [Gsl_matrix_complex.Single]
is_null [Gsl_matrix_complex]
is_null [Gsl_matrix_flat]
is_null [Gsl_matrix.Single]
is_null [Gsl_matrix]
is_null [Gsl_vector_flat]
is_null [Gsl_vector.Single]
is_null [Gsl_vector]
iterate [Gsl_multimin.NoDeriv]
iterate [Gsl_multimin.Deriv]
iterate [Gsl_min]
iterate [Gsl_multiroot.Deriv]
iterate [Gsl_multiroot.NoDeriv]
iterate [Gsl_root.Polish]
iterate [Gsl_root.Bracket]
iterate [Gsl_multifit_nlin]

K
knots [Gsl_bspline]
knots_uniform [Gsl_bspline]
kurtosis [Gsl_stats]
kurtosis_m_sd [Gsl_stats]

L
lag1_autocorrelation [Gsl_stats]
laguerre_1 [Gsl_sf]
laguerre_1_e [Gsl_sf]
laguerre_2 [Gsl_sf]
laguerre_2_e [Gsl_sf]
laguerre_3 [Gsl_sf]
laguerre_3_e [Gsl_sf]
laguerre_n [Gsl_sf]
laguerre_n_e [Gsl_sf]
lambert_W0 [Gsl_sf]
lambert_W0_e [Gsl_sf]
lambert_Wm1 [Gsl_sf]
lambert_Wm1_e [Gsl_sf]
landau [Gsl_randist]
landau_pdf [Gsl_randist]
laplace [Gsl_randist]
laplace_P [Gsl_cdf]
laplace_Pinv [Gsl_cdf]
laplace_Q [Gsl_cdf]
laplace_Qinv [Gsl_cdf]
laplace_pdf [Gsl_randist]
legendre_P1 [Gsl_sf]
legendre_P1_e [Gsl_sf]
legendre_P2 [Gsl_sf]
legendre_P2_e [Gsl_sf]
legendre_P3 [Gsl_sf]
legendre_P3_e [Gsl_sf]
legendre_Pl [Gsl_sf]
legendre_Pl_array [Gsl_sf]
legendre_Pl_e [Gsl_sf]
legendre_Plm [Gsl_sf]
legendre_Plm_array [Gsl_sf]
legendre_Plm_e [Gsl_sf]
legendre_Q0 [Gsl_sf]
legendre_Q0_e [Gsl_sf]
legendre_Q1 [Gsl_sf]
legendre_Q1_e [Gsl_sf]
legendre_Ql [Gsl_sf]
legendre_Ql_e [Gsl_sf]
legendre_array_size [Gsl_sf]
legendre_sphPlm [Gsl_sf]
legendre_sphPlm_array [Gsl_sf]
legendre_sphPlm_e [Gsl_sf]
length [Gsl_vectmat]
length [Gsl_vector_complex_flat]
length [Gsl_vector_complex.Single]
length [Gsl_vector_complex]
length [Gsl_vector_flat]
length [Gsl_vector.Single]
length [Gsl_vector]
levy [Gsl_randist]
levy_skew [Gsl_randist]
linear [Gsl_multifit]
linear [Gsl_fit]
linear_est [Gsl_multifit]
linear_est [Gsl_fit]
ln10 [Gsl_math]
ln(10)
ln2 [Gsl_math]
ln(2)
lnbeta [Gsl_sf]
lnbeta_e [Gsl_sf]
lnbeta_sgn_e [Gsl_sf]
lnchoose [Gsl_sf]
lnchoose_e [Gsl_sf]
lncosh [Gsl_sf]
lncosh_e [Gsl_sf]
lndoublefact [Gsl_sf]
lndoublefact_e [Gsl_sf]
lnfact [Gsl_sf]
lnfact_e [Gsl_sf]
lngamma [Gsl_sf]
lngamma_complex_e [Gsl_sf]
lngamma_e [Gsl_sf]
lngamma_sgn_e [Gsl_sf]
lnpi [Gsl_math]
ln(pi)
lnpoch [Gsl_sf]
lnpoch_e [Gsl_sf]
lnpoch_sgn_e [Gsl_sf]
lnsinh [Gsl_sf]
lnsinh_e [Gsl_sf]
log [Gsl_sf]
log [Gsl_complex]
log10 [Gsl_complex]
log10e [Gsl_math]
log_10 (e)
log1p [Gsl_math]
log2e [Gsl_math]
log_2 (e)
log_1plusx [Gsl_sf]
log_1plusx_e [Gsl_sf]
log_1plusx_mx [Gsl_sf]
log_1plusx_mx_e [Gsl_sf]
log_abs [Gsl_sf]
log_abs_e [Gsl_sf]
log_b [Gsl_complex]
log_complex_e [Gsl_sf]
log_e [Gsl_sf]
log_erfc [Gsl_sf]
log_erfc_e [Gsl_sf]
logabs [Gsl_complex]
logarithmic [Gsl_randist]
logarithmic_pdf [Gsl_randist]
logistic [Gsl_randist]
logistic_P [Gsl_cdf]
logistic_Pinv [Gsl_cdf]
logistic_Q [Gsl_cdf]
logistic_Qinv [Gsl_cdf]
logistic_pdf [Gsl_randist]
lognormal [Gsl_randist]
lognormal_P [Gsl_cdf]
lognormal_Pinv [Gsl_cdf]
lognormal_Q [Gsl_cdf]
lognormal_Qinv [Gsl_cdf]
lognormal_pdf [Gsl_randist]

M
m_add [Gsl_vectmat]
m_add_diagonal [Gsl_vectmat]
m_copy [Gsl_vectmat]
m_div [Gsl_vectmat]
m_memcpy [Gsl_vectmat]
m_mul [Gsl_vectmat]
m_sub [Gsl_vectmat]
make [Gsl_bspline]
make [Gsl_wavelet]
make [Gsl_histo]
make [Gsl_sum.Trunc]
make [Gsl_sum]
make [Gsl_cheb]
make [Gsl_multimin.NoDeriv]
make [Gsl_multimin.Deriv]
make [Gsl_min]
make [Gsl_multiroot.Deriv]
make [Gsl_multiroot.NoDeriv]
make [Gsl_root.Polish]
make [Gsl_root.Bracket]
make [Gsl_multifit_nlin]
make [Gsl_multifit]
make [Gsl_qrng]
make [Gsl_rng]
make [Gsl_interp]
make [Gsl_permut]
make_accel [Gsl_interp]
make_control_scaled_new [Gsl_odeiv]
make_control_standard_new [Gsl_odeiv]
make_control_y_new [Gsl_odeiv]
make_control_yp_new [Gsl_odeiv]
make_evolve [Gsl_odeiv]
make_herm_ws [Gsl_eigen]
make_hermv_ws [Gsl_eigen]
make_interp [Gsl_interp]
make_miser_state [Gsl_monte]
make_nonsymm_ws [Gsl_eigen]
make_nonsymmv_ws [Gsl_eigen]
make_plain_state [Gsl_monte]
make_step [Gsl_odeiv]
make_symm_ws [Gsl_eigen]
make_symmv_ws [Gsl_eigen]
make_system [Gsl_odeiv]
make_vegas_state [Gsl_monte]
make_wavetable [Gsl_fft.Complex]
make_wavetable [Gsl_fft.Halfcomplex]
make_wavetable [Gsl_fft.Real]
make_workspace [Gsl_fft.Complex]
make_workspace [Gsl_fft.Real]
make_ws [Gsl_integration]
mat_convert [Gsl_vectmat]
mat_flat [Gsl_vectmat]
matmult [Gsl_linalg]
matmult a ~transpa b ~transpb c stores in matrix c the product of matrices a and b.
max [Gsl_stats]
max [Gsl_rng]
max [Gsl_vector_flat]
max [Gsl_vector.Single]
max [Gsl_vector]
max_bin [Gsl_histo]
max_index [Gsl_stats]
max_index [Gsl_vector_flat]
max_index [Gsl_vector.Single]
max_index [Gsl_vector]
max_val [Gsl_histo]
mean [Gsl_stats]
mean [Gsl_histo]
memcpy [Gsl_qrng]
memcpy [Gsl_rng]
memcpy [Gsl_matrix_complex_flat]
memcpy [Gsl_matrix_complex.Single]
memcpy [Gsl_matrix_complex]
memcpy [Gsl_matrix_flat]
memcpy [Gsl_matrix.Single]
memcpy [Gsl_matrix]
memcpy [Gsl_vector_complex_flat]
memcpy [Gsl_vector_complex.Single]
memcpy [Gsl_vector_complex]
memcpy [Gsl_vector_flat]
memcpy [Gsl_vector.Single]
memcpy [Gsl_vector]
min [Gsl_stats]
min [Gsl_rng]
min [Gsl_vector_flat]
min [Gsl_vector.Single]
min [Gsl_vector]
min_bin [Gsl_histo]
min_index [Gsl_stats]
min_index [Gsl_vector_flat]
min_index [Gsl_vector.Single]
min_index [Gsl_vector]
min_size [Gsl_interp]
min_val [Gsl_histo]
minimum [Gsl_multimin.NoDeriv]
minimum [Gsl_multimin.Deriv]
minimum [Gsl_min]
minmax [Gsl_stats]
minmax [Gsl_vector_flat]
minmax [Gsl_vector.Single]
minmax [Gsl_vector]
minmax_index [Gsl_stats]
minmax_index [Gsl_vector_flat]
minmax_index [Gsl_vector.Single]
minmax_index [Gsl_vector]
mksa_acre [Gsl_const]
mksa_angstrom [Gsl_const]
mksa_astronomical_unit [Gsl_const]
mksa_bar [Gsl_const]
mksa_barn [Gsl_const]
mksa_bohr_magneton [Gsl_const]
mksa_bohr_radius [Gsl_const]
mksa_boltzmann [Gsl_const]
mksa_btu [Gsl_const]
mksa_calorie [Gsl_const]
mksa_canadian_gallon [Gsl_const]
mksa_carat [Gsl_const]
mksa_cup [Gsl_const]
mksa_curie [Gsl_const]
mksa_day [Gsl_const]
mksa_debye [Gsl_const]
mksa_dyne [Gsl_const]
mksa_electron_charge [Gsl_const]
mksa_electron_magnetic_moment [Gsl_const]
mksa_electron_volt [Gsl_const]
mksa_erg [Gsl_const]
mksa_faraday [Gsl_const]
mksa_fathom [Gsl_const]
mksa_fluid_ounce [Gsl_const]
mksa_foot [Gsl_const]
mksa_footcandle [Gsl_const]
mksa_footlambert [Gsl_const]
mksa_gauss [Gsl_const]
mksa_gram_force [Gsl_const]
mksa_grav_accel [Gsl_const]
mksa_gravitational_constant [Gsl_const]
mksa_hectare [Gsl_const]
mksa_horsepower [Gsl_const]
mksa_hour [Gsl_const]
mksa_inch [Gsl_const]
mksa_inch_of_mercury [Gsl_const]
mksa_inch_of_water [Gsl_const]
mksa_joule [Gsl_const]
mksa_kilometers_per_hour [Gsl_const]
mksa_kilopound_force [Gsl_const]
mksa_knot [Gsl_const]
mksa_lambert [Gsl_const]
mksa_light_year [Gsl_const]
mksa_liter [Gsl_const]
mksa_lumen [Gsl_const]
mksa_lux [Gsl_const]
mksa_mass_electron [Gsl_const]
mksa_mass_muon [Gsl_const]
mksa_mass_neutron [Gsl_const]
mksa_mass_proton [Gsl_const]
mksa_meter_of_mercury [Gsl_const]
mksa_metric_ton [Gsl_const]
mksa_micron [Gsl_const]
mksa_mil [Gsl_const]
mksa_mile [Gsl_const]
mksa_miles_per_hour [Gsl_const]
mksa_minute [Gsl_const]
mksa_molar_gas [Gsl_const]
mksa_nautical_mile [Gsl_const]
mksa_newton [Gsl_const]
mksa_nuclear_magneton [Gsl_const]
mksa_ounce_mass [Gsl_const]
mksa_parsec [Gsl_const]
mksa_phot [Gsl_const]
mksa_pint [Gsl_const]
mksa_plancks_constant_h [Gsl_const]
mksa_plancks_constant_hbar [Gsl_const]
mksa_point [Gsl_const]
mksa_poise [Gsl_const]
mksa_pound_force [Gsl_const]
mksa_pound_mass [Gsl_const]
mksa_poundal [Gsl_const]
mksa_proton_magnetic_moment [Gsl_const]
mksa_psi [Gsl_const]
mksa_quart [Gsl_const]
mksa_rad [Gsl_const]
mksa_roentgen [Gsl_const]
mksa_rydberg [Gsl_const]
mksa_solar_mass [Gsl_const]
mksa_speed_of_light [Gsl_const]
mksa_standard_gas_volume [Gsl_const]
mksa_std_atmosphere [Gsl_const]
mksa_stefan_boltzmann_constant [Gsl_const]
mksa_stilb [Gsl_const]
mksa_stokes [Gsl_const]
mksa_tablespoon [Gsl_const]
mksa_teaspoon [Gsl_const]
mksa_texpoint [Gsl_const]
mksa_therm [Gsl_const]
mksa_thomson_cross_section [Gsl_const]
mksa_ton [Gsl_const]
mksa_torr [Gsl_const]
mksa_troy_ounce [Gsl_const]
mksa_uk_gallon [Gsl_const]
mksa_uk_ton [Gsl_const]
mksa_unified_atomic_mass [Gsl_const]
mksa_us_gallon [Gsl_const]
mksa_vacuum_permeability [Gsl_const]
mksa_vacuum_permittivity [Gsl_const]
mksa_week [Gsl_const]
mksa_yard [Gsl_const]
mul [Gsl_histo]
mul [Gsl_fit]
mul [Gsl_vector_flat]
mul [Gsl_vector.Single]
mul [Gsl_vector]
mul [Gsl_complex]
mul_elements [Gsl_matrix_complex_flat]
mul_elements [Gsl_matrix_complex.Single]
mul_elements [Gsl_matrix_complex]
mul_elements [Gsl_matrix_flat]
mul_elements [Gsl_matrix.Single]
mul_elements [Gsl_matrix]
mul_est [Gsl_fit]
mul_imag [Gsl_complex]
mul_real [Gsl_complex]
mult [Gsl_complex]
multinomial [Gsl_randist]
multinomial_lnpdf [Gsl_randist]
multinomial_pdf [Gsl_randist]
multiply_e [Gsl_sf]
multiply_err_e [Gsl_sf]

N
name [Gsl_wavelet]
name [Gsl_multimin.NoDeriv]
name [Gsl_multimin.Deriv]
name [Gsl_min]
name [Gsl_multiroot.Deriv]
name [Gsl_multiroot.NoDeriv]
name [Gsl_root.Polish]
name [Gsl_root.Bracket]
name [Gsl_multifit_nlin]
name [Gsl_qrng]
name [Gsl_rng]
name [Gsl_interp]
ncoeffs [Gsl_bspline]
negative [Gsl_complex]
negative_binomial [Gsl_randist]
negative_binomial_P [Gsl_cdf]
negative_binomial_Q [Gsl_cdf]
negative_binomial_pdf [Gsl_randist]
next [Gsl_permut]
nonsymm [Gsl_eigen]
nonsymmv [Gsl_eigen]
nonsymmv_sort [Gsl_eigen]
nrm2 [Gsl_blas_gen.Complex]
nrm2 [Gsl_blas_gen]
nrm2 [Gsl_blas_flat.Complex]
nrm2 [Gsl_blas_flat]
nrm2 [Gsl_blas.Complex_Single]
nrm2 [Gsl_blas.Complex]
nrm2 [Gsl_blas.Single]
nrm2 [Gsl_blas]
num_atto [Gsl_const]
num_avogadro [Gsl_const]
num_exa [Gsl_const]
num_femto [Gsl_const]
num_fine_structure [Gsl_const]
num_giga [Gsl_const]
num_kilo [Gsl_const]
num_mega [Gsl_const]
num_micro [Gsl_const]
num_milli [Gsl_const]
num_nano [Gsl_const]
num_peta [Gsl_const]
num_pico [Gsl_const]
num_tera [Gsl_const]
num_yocto [Gsl_const]
num_yotta [Gsl_const]
num_zepto [Gsl_const]
num_zetta [Gsl_const]

O
of_array [Gsl_permut]
of_array [Gsl_matrix_complex_flat]
of_array [Gsl_matrix_complex.Single]
of_array [Gsl_matrix_complex]
of_array [Gsl_matrix_flat]
of_array [Gsl_matrix.Single]
of_array [Gsl_matrix]
of_array [Gsl_vector_complex_flat]
of_array [Gsl_vector_complex.Single]
of_array [Gsl_vector_complex]
of_array [Gsl_vector_flat]
of_array [Gsl_vector.Single]
of_array [Gsl_vector]
of_arrays [Gsl_matrix_complex_flat]
of_arrays [Gsl_matrix_complex.Single]
of_arrays [Gsl_matrix_complex]
of_arrays [Gsl_matrix_flat]
of_arrays [Gsl_matrix.Single]
of_arrays [Gsl_matrix]
of_complex_array [Gsl_matrix_complex_flat]
of_complex_array [Gsl_matrix_complex.Single]
of_complex_array [Gsl_matrix_complex]
of_complex_array [Gsl_vector_complex_flat]
of_complex_array [Gsl_vector_complex.Single]
of_complex_array [Gsl_vector_complex]
order [Gsl_cheb]

P
pack [Gsl_complex]
pareto [Gsl_randist]
pareto_P [Gsl_cdf]
pareto_Pinv [Gsl_cdf]
pareto_Q [Gsl_cdf]
pareto_Qinv [Gsl_cdf]
pareto_pdf [Gsl_randist]
pascal [Gsl_randist]
pascal_P [Gsl_cdf]
pascal_Q [Gsl_cdf]
pascal_pdf [Gsl_randist]
permute [Gsl_permut]
permute_barr [Gsl_permut]
permute_inverse [Gsl_permut]
permute_inverse_barr [Gsl_permut]
pi [Gsl_math]
pi
pi_2 [Gsl_math]
pi/2
pi_4 [Gsl_math]
pi/4
poch [Gsl_sf]
poch_e [Gsl_sf]
pochrel [Gsl_sf]
pochrel_e [Gsl_sf]
poisson [Gsl_randist]
poisson_P [Gsl_cdf]
poisson_Q [Gsl_cdf]
poisson_pdf [Gsl_randist]
polar [Gsl_complex]
polar_of_rect [Gsl_sf]
position [Gsl_multifit_nlin]
pow [Gsl_complex]
pow_int [Gsl_sf]
pow_int [Gsl_math]
pow_int_e [Gsl_sf]
pow_real [Gsl_complex]
pprint_exn [Gsl_error]
prev [Gsl_permut]
print [Gsl_ieee]
psi [Gsl_sf]
psi_1 [Gsl_sf]
psi_1_e [Gsl_sf]
psi_1_int [Gsl_sf]
psi_1_int_e [Gsl_sf]
psi_1piy [Gsl_sf]
psi_1piy_e [Gsl_sf]
psi_complex_e [Gsl_sf]
psi_e [Gsl_sf]
psi_int [Gsl_sf]
psi_int_e [Gsl_sf]
psi_n [Gsl_sf]
psi_n_e [Gsl_sf]

Q
qag [Gsl_integration]
qag_sing [Gsl_integration]
qagi [Gsl_integration]
qagil [Gsl_integration]
qagiu [Gsl_integration]
qagp [Gsl_integration]
qags [Gsl_integration]
qawc [Gsl_integration]
qawf [Gsl_integration]
qawo [Gsl_integration]
qaws [Gsl_integration]
qng [Gsl_integration]
quantile_from_sorted_data [Gsl_stats]

R
rayleigh [Gsl_randist]
rayleigh_P [Gsl_cdf]
rayleigh_Pinv [Gsl_cdf]
rayleigh_Q [Gsl_cdf]
rayleigh_Qinv [Gsl_cdf]
rayleigh_pdf [Gsl_randist]
rayleigh_tail [Gsl_randist]
rayleigh_tail_pdf [Gsl_randist]
real [Gsl_vector_complex_flat]
rect [Gsl_complex]
rect_of_polar [Gsl_sf]
rep_of_float [Gsl_ieee]
reset [Gsl_histo]
restart [Gsl_multimin.Deriv]
reverse [Gsl_permut]
reverse [Gsl_vector_complex_flat]
reverse [Gsl_vector_complex.Single]
reverse [Gsl_vector_complex]
reverse [Gsl_vector_flat]
reverse [Gsl_vector.Single]
reverse [Gsl_vector]
root [Gsl_multiroot.Deriv]
root [Gsl_multiroot.NoDeriv]
root [Gsl_root.Polish]
root [Gsl_root.Bracket]
rot [Gsl_blas_gen]
rot [Gsl_blas_flat]
rot [Gsl_blas.Single]
rot [Gsl_blas]
row [Gsl_matrix_complex_flat]
row [Gsl_matrix_complex.Single]
row [Gsl_matrix_complex]
row [Gsl_matrix_flat]
row [Gsl_matrix.Single]
row [Gsl_matrix]

S
sample [Gsl_histo]
sample [Gsl_randist]
sample [Gsl_qrng]
scal [Gsl_blas_gen.Complex]
scal [Gsl_blas_gen]
scal [Gsl_blas_flat.Complex]
scal [Gsl_blas_flat]
scal [Gsl_blas.Complex_Single]
scal [Gsl_blas.Complex]
scal [Gsl_blas.Single]
scal [Gsl_blas]
scale [Gsl_histo]
scale [Gsl_vectmat]
scale [Gsl_matrix_complex_flat]
scale [Gsl_matrix_complex.Single]
scale [Gsl_matrix_complex]
scale [Gsl_matrix_flat]
scale [Gsl_matrix.Single]
scale [Gsl_matrix]
scale [Gsl_vector_flat]
scale [Gsl_vector.Single]
scale [Gsl_vector]
sd [Gsl_stats]
sd_with_fixed_mean [Gsl_stats]
sdsdot [Gsl_blas.Single]
sec [Gsl_complex]
sech [Gsl_complex]
set [Gsl_rng]
set [Gsl_matrix_complex_flat]
set [Gsl_matrix_complex.Single]
set [Gsl_matrix_complex]
set [Gsl_matrix_flat]
set [Gsl_matrix.Single]
set [Gsl_matrix]
set [Gsl_vector_complex_flat]
set [Gsl_vector_complex.Single]
set [Gsl_vector_complex]
set [Gsl_vector_flat]
set [Gsl_vector.Single]
set [Gsl_vector]
set [Gsl_complex]
set_all [Gsl_matrix_complex_flat]
set_all [Gsl_matrix_complex.Single]
set_all [Gsl_matrix_complex]
set_all [Gsl_matrix_flat]
set_all [Gsl_matrix.Single]
set_all [Gsl_matrix]
set_all [Gsl_vector_complex_flat]
set_all [Gsl_vector_complex.Single]
set_all [Gsl_vector_complex]
set_all [Gsl_vector_flat]
set_all [Gsl_vector.Single]
set_all [Gsl_vector]
set_basis [Gsl_vector_complex_flat]
set_basis [Gsl_vector_complex.Single]
set_basis [Gsl_vector_complex]
set_basis [Gsl_vector_flat]
set_basis [Gsl_vector.Single]
set_basis [Gsl_vector]
set_default [Gsl_rng]
set_default_seed [Gsl_rng]
set_id [Gsl_matrix_complex_flat]
set_id [Gsl_matrix_complex.Single]
set_id [Gsl_matrix_complex]
set_id [Gsl_matrix_flat]
set_id [Gsl_matrix.Single]
set_id [Gsl_matrix]
set_miser_params [Gsl_monte]
set_mode [Gsl_ieee]
set_qawo [Gsl_integration]
set_qaws [Gsl_integration]
set_ranges [Gsl_histo]
set_ranges_uniform [Gsl_histo]
set_state [Gsl_rng]
set_vegas_params [Gsl_monte]
set_zero [Gsl_matrix_complex_flat]
set_zero [Gsl_matrix_complex.Single]
set_zero [Gsl_matrix_complex]
set_zero [Gsl_matrix_flat]
set_zero [Gsl_matrix.Single]
set_zero [Gsl_matrix]
set_zero [Gsl_vector_complex_flat]
set_zero [Gsl_vector_complex.Single]
set_zero [Gsl_vector_complex]
set_zero [Gsl_vector_flat]
set_zero [Gsl_vector.Single]
set_zero [Gsl_vector]
shi [Gsl_sf]
shift [Gsl_histo]
shuffle [Gsl_randist]
si [Gsl_sf]
sigma [Gsl_histo]
sin [Gsl_sf]
sin [Gsl_complex]
sin_e [Gsl_sf]
sin_err_e [Gsl_sf]
sinc [Gsl_sf]
sinc_e [Gsl_sf]
sinh [Gsl_complex]
size [Gsl_multimin.NoDeriv]
size [Gsl_integration]
size [Gsl_permut]
skew [Gsl_stats]
skew_m_sd [Gsl_stats]
smash [Gsl_fun]
solve [Gsl_siman]
solve [Gsl_poly]
solve_HH [Gsl_linalg]
solve_LU [Gsl_linalg]
solve_cubic [Gsl_poly]
solve_cyc_tridiag [Gsl_linalg]
solve_quadratic [Gsl_poly]
solve_symm_cyc_tridiag [Gsl_linalg]
solve_symm_tridiag [Gsl_linalg]
solve_tridiag [Gsl_linalg]
sqrt [Gsl_complex]
sqrt1_2 [Gsl_math]
sqrt(1/2)
sqrt2 [Gsl_math]
sqrt(2)
sqrt3 [Gsl_math]
sqrt(3)
sqrt_real [Gsl_complex]
sqrtpi [Gsl_math]
sqrt(pi)
step_apply [Gsl_odeiv]
step_name [Gsl_odeiv]
step_order [Gsl_odeiv]
step_reset [Gsl_odeiv]
strerror [Gsl_error]
string_of_errno [Gsl_error]
sub [Gsl_histo]
sub [Gsl_matrix_complex_flat]
sub [Gsl_matrix_complex.Single]
sub [Gsl_matrix_complex]
sub [Gsl_matrix_flat]
sub [Gsl_matrix.Single]
sub [Gsl_matrix]
sub [Gsl_vector_flat]
sub [Gsl_vector.Single]
sub [Gsl_vector]
sub [Gsl_complex]
sub_imag [Gsl_complex]
sub_real [Gsl_complex]
subdiagonal [Gsl_matrix_complex_flat]
subdiagonal [Gsl_matrix_flat]
submatrix [Gsl_matrix_complex_flat]
submatrix [Gsl_matrix_flat]
subvector [Gsl_vectmat]
subvector [Gsl_vector_complex_flat]
subvector [Gsl_vector_complex.Single]
subvector [Gsl_vector_complex]
subvector [Gsl_vector_flat]
subvector [Gsl_vector.Single]
subvector [Gsl_vector]
sum [Gsl_histo]
superdiagonal [Gsl_matrix_complex_flat]
superdiagonal [Gsl_matrix_flat]
swap [Gsl_permut]
swap [Gsl_blas_gen.Complex]
swap [Gsl_blas_gen]
swap [Gsl_blas_flat.Complex]
swap [Gsl_blas_flat]
swap [Gsl_blas.Complex_Single]
swap [Gsl_blas.Complex]
swap [Gsl_blas.Single]
swap [Gsl_blas]
swap_columns [Gsl_vectmat]
swap_columns [Gsl_matrix_complex_flat]
swap_columns [Gsl_matrix_complex.Single]
swap_columns [Gsl_matrix_complex]
swap_columns [Gsl_matrix_flat]
swap_columns [Gsl_matrix.Single]
swap_columns [Gsl_matrix]
swap_element [Gsl_vector_complex_flat]
swap_element [Gsl_vector_complex.Single]
swap_element [Gsl_vector_complex]
swap_element [Gsl_vector_flat]
swap_element [Gsl_vector.Single]
swap_element [Gsl_vector]
swap_rowcol [Gsl_vectmat]
swap_rowcol [Gsl_matrix_complex_flat]
swap_rowcol [Gsl_matrix_complex.Single]
swap_rowcol [Gsl_matrix_complex]
swap_rowcol [Gsl_matrix_flat]
swap_rowcol [Gsl_matrix.Single]
swap_rowcol [Gsl_matrix]
swap_rows [Gsl_vectmat]
swap_rows [Gsl_matrix_complex_flat]
swap_rows [Gsl_matrix_complex.Single]
swap_rows [Gsl_matrix_complex]
swap_rows [Gsl_matrix_flat]
swap_rows [Gsl_matrix.Single]
swap_rows [Gsl_matrix]
symm [Gsl_eigen]
symm [Gsl_blas_gen.Complex]
symm [Gsl_blas_gen]
symm [Gsl_blas_flat.Complex]
symm [Gsl_blas_flat]
symm [Gsl_blas.Complex_Single]
symm [Gsl_blas.Complex]
symm [Gsl_blas.Single]
symm [Gsl_blas]
symmtd_decomp [Gsl_linalg]
symmtd_unpack [Gsl_linalg]
symmtd_unpack_T [Gsl_linalg]
symmv [Gsl_eigen]
symmv_sort [Gsl_eigen]
symv [Gsl_blas_gen]
symv [Gsl_blas_flat]
symv [Gsl_blas.Single]
symv [Gsl_blas]
synchrotron_1 [Gsl_sf]
synchrotron_1_e [Gsl_sf]
synchrotron_2 [Gsl_sf]
synchrotron_2_e [Gsl_sf]
syr [Gsl_blas_gen]
syr [Gsl_blas_flat]
syr [Gsl_blas.Single]
syr [Gsl_blas]
syr2 [Gsl_blas_gen]
syr2 [Gsl_blas_flat]
syr2 [Gsl_blas.Single]
syr2 [Gsl_blas]
syr2k [Gsl_blas_gen.Complex]
syr2k [Gsl_blas_gen]
syr2k [Gsl_blas_flat.Complex]
syr2k [Gsl_blas_flat]
syr2k [Gsl_blas.Complex_Single]
syr2k [Gsl_blas.Complex]
syr2k [Gsl_blas.Single]
syr2k [Gsl_blas]
syrk [Gsl_blas_gen.Complex]
syrk [Gsl_blas_gen]
syrk [Gsl_blas_flat.Complex]
syrk [Gsl_blas_flat]
syrk [Gsl_blas.Complex_Single]
syrk [Gsl_blas.Complex]
syrk [Gsl_blas.Single]
syrk [Gsl_blas]

T
tan [Gsl_complex]
tanh [Gsl_complex]
taylorcoeff [Gsl_sf]
taylorcoeff_e [Gsl_sf]
tdist [Gsl_randist]
tdist_P [Gsl_cdf]
tdist_Pinv [Gsl_cdf]
tdist_Q [Gsl_cdf]
tdist_Qinv [Gsl_cdf]
tdist_pdf [Gsl_randist]
test_delta [Gsl_multiroot.Deriv]
test_delta [Gsl_multiroot.NoDeriv]
test_delta [Gsl_root]
test_delta [Gsl_multifit_nlin]
test_except [Gsl_ieee]
test_gradient [Gsl_multimin.Deriv]
test_gradient [Gsl_multifit_nlin]
test_interval [Gsl_min]
test_interval [Gsl_root]
test_residual [Gsl_multiroot.Deriv]
test_residual [Gsl_multiroot.NoDeriv]
test_residual [Gsl_root]
test_size [Gsl_multimin.NoDeriv]
tmp [Gsl_vectmat]
to_array [Gsl_permut]
to_array [Gsl_vectmat]
to_array [Gsl_matrix_complex_flat]
to_array [Gsl_matrix_complex.Single]
to_array [Gsl_matrix_complex]
to_array [Gsl_matrix_flat]
to_array [Gsl_matrix.Single]
to_array [Gsl_matrix]
to_array [Gsl_vector_complex_flat]
to_array [Gsl_vector_complex.Single]
to_array [Gsl_vector_complex]
to_array [Gsl_vector_flat]
to_array [Gsl_vector.Single]
to_array [Gsl_vector]
to_arrays [Gsl_vectmat]
to_arrays [Gsl_matrix_complex_flat]
to_arrays [Gsl_matrix_complex.Single]
to_arrays [Gsl_matrix_complex]
to_arrays [Gsl_matrix_flat]
to_arrays [Gsl_matrix.Single]
to_arrays [Gsl_matrix]
to_complex_array [Gsl_matrix_complex_flat]
to_complex_array [Gsl_matrix_complex.Single]
to_complex_array [Gsl_matrix_complex]
to_complex_array [Gsl_vector_complex_flat]
to_complex_array [Gsl_vector_complex.Single]
to_complex_array [Gsl_vector_complex]
transform [Gsl_fft.Complex]
transform [Gsl_fft.Halfcomplex]
transform [Gsl_fft.Real]
transform_array [Gsl_wavelet]
transform_forward [Gsl_wavelet]
transform_gen [Gsl_wavelet]
transform_inverse [Gsl_wavelet]
transform_matrix [Gsl_wavelet]
transform_matrix_flat [Gsl_wavelet]
transform_matrix_gen [Gsl_wavelet]
transform_rad2 [Gsl_fft.Complex]
transform_rad2 [Gsl_fft.Halfcomplex]
transform_rad2 [Gsl_fft.Real]
transform_vector [Gsl_wavelet]
transform_vector_flat [Gsl_wavelet]
transport_2 [Gsl_sf]
transport_2_e [Gsl_sf]
transport_3 [Gsl_sf]
transport_3_e [Gsl_sf]
transport_4 [Gsl_sf]
transport_4_e [Gsl_sf]
transport_5 [Gsl_sf]
transport_5_e [Gsl_sf]
transpose [Gsl_vectmat]
transpose [Gsl_matrix_complex_flat]
transpose [Gsl_matrix_complex.Single]
transpose [Gsl_matrix_complex]
transpose [Gsl_matrix_flat]
transpose [Gsl_matrix.Single]
transpose [Gsl_matrix]
transpose_in_place [Gsl_vectmat]
transpose_in_place [Gsl_matrix_complex_flat]
transpose_in_place [Gsl_matrix_complex.Single]
transpose_in_place [Gsl_matrix_complex]
transpose_in_place [Gsl_matrix_flat]
transpose_in_place [Gsl_matrix.Single]
transpose_in_place [Gsl_matrix]
trmm [Gsl_blas_gen.Complex]
trmm [Gsl_blas_gen]
trmm [Gsl_blas_flat.Complex]
trmm [Gsl_blas_flat]
trmm [Gsl_blas.Complex_Single]
trmm [Gsl_blas.Complex]
trmm [Gsl_blas.Single]
trmm [Gsl_blas]
trmv [Gsl_blas_gen.Complex]
trmv [Gsl_blas_gen]
trmv [Gsl_blas_flat.Complex]
trmv [Gsl_blas_flat]
trmv [Gsl_blas.Complex_Single]
trmv [Gsl_blas.Complex]
trmv [Gsl_blas.Single]
trmv [Gsl_blas]
trsm [Gsl_blas_gen.Complex]
trsm [Gsl_blas_gen]
trsm [Gsl_blas_flat.Complex]
trsm [Gsl_blas_flat]
trsm [Gsl_blas.Complex_Single]
trsm [Gsl_blas.Complex]
trsm [Gsl_blas.Single]
trsm [Gsl_blas]
trsv [Gsl_blas_gen.Complex]
trsv [Gsl_blas_gen]
trsv [Gsl_blas_flat.Complex]
trsv [Gsl_blas_flat]
trsv [Gsl_blas.Complex_Single]
trsv [Gsl_blas.Complex]
trsv [Gsl_blas.Single]
trsv [Gsl_blas]

U
ugaussian [Gsl_randist]
ugaussian_P [Gsl_cdf]
ugaussian_Pinv [Gsl_cdf]
ugaussian_Q [Gsl_cdf]
ugaussian_Qinv [Gsl_cdf]
ugaussian_pdf [Gsl_randist]
ugaussian_ratio_method [Gsl_randist]
ugaussian_tail [Gsl_randist]
ugaussian_tail_pdf [Gsl_randist]
uniform [Gsl_rng]
uniform_arr [Gsl_rng]
uniform_int [Gsl_rng]
uniform_pos [Gsl_rng]
uniform_pos_arr [Gsl_rng]
uninit [Gsl_error]
unpack [Gsl_fft.Halfcomplex]
unpack [Gsl_fft.Real]
unpack [Gsl_fft]
unpack [Gsl_complex]

V
v_add [Gsl_vectmat]
v_copy [Gsl_vectmat]
v_div [Gsl_vectmat]
v_max [Gsl_vectmat]
v_max_index [Gsl_vectmat]
v_memcpy [Gsl_vectmat]
v_min [Gsl_vectmat]
v_min_index [Gsl_vectmat]
v_minmax [Gsl_vectmat]
v_minmax_index [Gsl_vectmat]
v_mul [Gsl_vectmat]
v_sub [Gsl_vectmat]
valid [Gsl_permut]
variance [Gsl_stats]
variance_with_fixed_mean [Gsl_stats]
vec_convert [Gsl_vectmat]
vector [Gsl_sort]
vector_flat [Gsl_sort]
vector_flat_index [Gsl_sort]
vector_flat_largest [Gsl_sort]
vector_flat_largest_index [Gsl_sort]
vector_flat_smallest [Gsl_sort]
vector_flat_smallest_index [Gsl_sort]
vector_index [Gsl_sort]
vector_largest [Gsl_sort]
vector_largest_index [Gsl_sort]
vector_smallest [Gsl_sort]
vector_smallest_index [Gsl_sort]
version [Gsl_error]
version of GSL library
view_array [Gsl_matrix_flat]
view_array [Gsl_vector_flat]
view_complex_array [Gsl_matrix_complex_flat]
view_complex_array [Gsl_vector_complex_flat]
view_vector [Gsl_matrix_complex_flat]
view_vector [Gsl_matrix_flat]

W
weibull [Gsl_randist]
weibull_P [Gsl_cdf]
weibull_Pinv [Gsl_cdf]
weibull_Q [Gsl_cdf]
weibull_Qinv [Gsl_cdf]
weibull_pdf [Gsl_randist]
workspace_make [Gsl_wavelet]
workspace_size [Gsl_wavelet]

Z
zdscal [Gsl_blas_gen.Complex]
zdscal [Gsl_blas_flat.Complex]
zdscal [Gsl_blas.Complex]
zeta [Gsl_sf]
zeta_e [Gsl_sf]
zeta_int [Gsl_sf]
zeta_int_e [Gsl_sf]

ocamlgsl-0.6.0/doc/Gsl_fft.Halfcomplex.html0000664000076400007640000001442610607755605017336 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Halfcomplex

Module Gsl_fft.Halfcomplex


module Halfcomplex: sig .. end

type wavetable 
val make_wavetable : int -> wavetable
val transform : ?stride:int ->
Gsl_fft.fft_array ->
wavetable -> Gsl_fft.Real.workspace -> unit
val transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
val backward : ?stride:int ->
Gsl_fft.fft_array ->
wavetable -> Gsl_fft.Real.workspace -> unit
val backward_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
val inverse : ?stride:int ->
Gsl_fft.fft_array ->
wavetable -> Gsl_fft.Real.workspace -> unit
val inverse_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
ocamlgsl-0.6.0/doc/Gsl_multimin.Deriv.html0000664000076400007640000001520010607755605017213 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin.Deriv

Module Gsl_multimin.Deriv


module Deriv: sig .. end


type kind =
| CONJUGATE_FR
| CONJUGATE_PR
| VECTOR_BFGS
| VECTOR_BFGS2
| STEEPEST_DESCENT
type t 
val make : kind ->
int ->
Gsl_fun.multim_fun_fdf ->
x:Gsl_vector.vector -> step:float -> tol:float -> t
val name : t -> string
val iterate : t -> unit
val restart : t -> unit
val minimum : ?x:Gsl_vector.vector ->
?dx:Gsl_vector.vector ->
?g:Gsl_vector.vector -> t -> float
val test_gradient : t -> float -> bool
ocamlgsl-0.6.0/doc/type_Gsl_qrng.html0000664000076400007640000001377210607755604016330 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_qrng sig
  type qrng_type = NIEDERREITER_2 | SOBOL
  type t
  val make : Gsl_qrng.qrng_type -> int -> Gsl_qrng.t
  external init : Gsl_qrng.t -> unit = "ml_gsl_qrng_init"
  external get : Gsl_qrng.t -> float array -> unit = "ml_gsl_qrng_get"
  external sample : Gsl_qrng.t -> float array = "ml_gsl_qrng_sample"
  external name : Gsl_qrng.t -> string = "ml_gsl_qrng_name"
  external dimension : Gsl_qrng.t -> int = "ml_gsl_qrng_dimension"
  external memcpy : src:Gsl_qrng.t -> dst:Gsl_qrng.t -> unit
    = "ml_gsl_qrng_memcpy"
  external clone : Gsl_qrng.t -> Gsl_qrng.t = "ml_gsl_qrng_clone"
end
ocamlgsl-0.6.0/doc/index_modules.html0000664000076400007640000003027510607755611016345 0ustar olivoliv ocamlgsl 0.6.0 : Index of modules

Index of modules


B
Bracket [Gsl_root]

C
Complex [Gsl_fft]
Complex [Gsl_blas_gen]
Complex [Gsl_blas_flat]
Complex [Gsl_blas]
Complex_Single [Gsl_blas]

D
Deriv [Gsl_multimin]
Deriv [Gsl_multiroot]

G
Gsl_blas
BLAS support
Gsl_blas_flat
Gsl_blas_gen
Gsl_bspline
Basis Splines
Gsl_cdf
Cumulative distribution functions
Gsl_cheb
Chebyshev Approximations
Gsl_complex
Complex arithmetic and simple functions
Gsl_const
Values of physical constants
Gsl_diff
Numerical Differentiation
Gsl_eigen
Eigensystems
Gsl_error
Error reporting
Gsl_fft
Fast Fourier Transforms
Gsl_fit
Least-Squares Fitting
Gsl_fun
Callbacks and types for error estimates
Gsl_histo
Histograms
Gsl_ieee
IEEE floating-point arithmetic
Gsl_integration
Numerical Integration
Gsl_interp
Interpolation
Gsl_linalg
Simple linear algebra operations
Gsl_math
Mathematical constants and some simple functions
Gsl_matrix
Matrices of floats implemented with Bigarray
Gsl_matrix_complex
Matrices of complex numbers implemented with Bigarray
Gsl_matrix_complex_flat
Matrices of complex number simplemented with float array
Gsl_matrix_flat
Matrices of floats implemented with float array
Gsl_min
One dimensional Minimization
Gsl_monte
Monte Carlo Integration
Gsl_multifit
Multi-parameter Least-Squares Fitting
Gsl_multifit_nlin
Nonlinear Least-Squares Fitting
Gsl_multimin
Multidimensional Minimization
Gsl_multiroot
Multidimensional Root-Finding
Gsl_odeiv
Ordinary Differential Equations
Gsl_permut
Permutations
Gsl_poly
Polynomials
Gsl_qrng
Quasi-Random Sequences
Gsl_randist
Random Number Distributions
Gsl_rng
Random Number Generation
Gsl_root
One dimensional Root-Finding
Gsl_sf
Special functions
Gsl_siman
Simulated Annealing
Gsl_sort
Sorting
Gsl_stats
Statistics
Gsl_sum
Series Acceleration
Gsl_vectmat
Generic variant types for vectors and matrices
Gsl_vector
Vector of floats implemented with Bigarray
Gsl_vector_complex
Vector of complex numbers implemented with a Bigarray
Gsl_vector_complex_flat
Vector of complex numbers implemented with a float array
Gsl_vector_flat
Vector of floats implemented with a float array
Gsl_wavelet
Wavelet Transforms

H
Halfcomplex [Gsl_fft]

N
NoDeriv [Gsl_multimin]
NoDeriv [Gsl_multiroot]

P
Polish [Gsl_root]

R
Real [Gsl_fft]

S
Single [Gsl_blas]
Single [Gsl_matrix_complex]
Single [Gsl_matrix]
Single [Gsl_vector_complex]
Single [Gsl_vector]

T
Trunc [Gsl_sum]

ocamlgsl-0.6.0/doc/type_Gsl_randist.html0000664000076400007640000010754110607755604017023 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_randist sig
  external gaussian : Gsl_rng.t -> sigma:float -> float
    = "ml_gsl_ran_gaussian"
  external gaussian_ratio_method : Gsl_rng.t -> sigma:float -> float
    = "ml_gsl_ran_gaussian_ratio_method"
  external gaussian_ziggurat : Gsl_rng.t -> sigma:float -> float
    = "ml_gsl_ran_gaussian_ziggurat"
  external gaussian_pdf : float -> sigma:float -> float
    = "ml_gsl_ran_gaussian_pdf" "gsl_ran_gaussian_pdf" "float"
  external ugaussian : Gsl_rng.t -> float = "ml_gsl_ran_ugaussian"
  external ugaussian_ratio_method : Gsl_rng.t -> float
    = "ml_gsl_ran_ugaussian_ratio_method"
  external ugaussian_pdf : float -> float = "ml_gsl_ran_ugaussian_pdf"
    "gsl_ran_ugaussian_pdf" "float"
  external gaussian_tail : Gsl_rng.t -> a:float -> sigma:float -> float
    = "ml_gsl_ran_gaussian_tail"
  external gaussian_tail_pdf : float -> a:float -> sigma:float -> float
    = "ml_gsl_ran_gaussian_tail_pdf" "gsl_ran_gaussian_tail_pdf" "float"
  external ugaussian_tail : Gsl_rng.t -> a:float -> float
    = "ml_gsl_ran_ugaussian_tail"
  external ugaussian_tail_pdf : float -> a:float -> float
    = "ml_gsl_ran_ugaussian_tail_pdf" "gsl_ran_ugaussian_tail_pdf" "float"
  external bivariate_gaussian :
    Gsl_rng.t -> sigma_x:float -> sigma_y:float -> rho:float -> float * float
    = "ml_gsl_ran_bivariate_gaussian"
  external bivariate_gaussian_pdf :
    x:float ->
    y:float -> sigma_x:float -> sigma_y:float -> rho:float -> float
    = "ml_gsl_ran_bivariate_gaussian_pdf" "gsl_ran_bivariate_gaussian_pdf"
    "float"
  external exponential : Gsl_rng.t -> mu:float -> float
    = "ml_gsl_ran_exponential"
  external exponential_pdf : float -> mu:float -> float
    = "ml_gsl_ran_exponential_pdf" "gsl_ran_exponential_pdf" "float"
  external laplace : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_laplace"
  external laplace_pdf : float -> a:float -> float = "ml_gsl_ran_laplace_pdf"
    "gsl_ran_laplace_pdf" "float"
  external exppow : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_exppow"
  external exppow_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_exppow_pdf" "gsl_ran_exppow_pdf" "float"
  external cauchy : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_cauchy"
  external cauchy_pdf : float -> a:float -> float = "ml_gsl_ran_cauchy_pdf"
    "gsl_ran_cauchy_pdf" "float"
  external rayleigh : Gsl_rng.t -> sigma:float -> float
    = "ml_gsl_ran_rayleigh"
  external rayleigh_pdf : float -> sigma:float -> float
    = "ml_gsl_ran_rayleigh_pdf" "gsl_ran_rayleigh_pdf" "float"
  external rayleigh_tail : Gsl_rng.t -> a:float -> sigma:float -> float
    = "ml_gsl_ran_rayleigh_tail"
  external rayleigh_tail_pdf : float -> a:float -> sigma:float -> float
    = "ml_gsl_ran_rayleigh_tail_pdf" "gsl_ran_rayleigh_tail_pdf" "float"
  external landau : Gsl_rng.t -> float = "ml_gsl_ran_landau"
  external landau_pdf : float -> float = "ml_gsl_ran_landau_pdf"
    "gsl_ran_landau_pdf" "float"
  external levy : Gsl_rng.t -> c:float -> alpha:float -> float
    = "ml_gsl_ran_levy"
  external levy_skew :
    Gsl_rng.t -> c:float -> alpha:float -> beta:float -> float
    = "ml_gsl_ran_levy_skew"
  external gamma : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_gamma"
  external gamma_int : Gsl_rng.t -> a:int -> float = "ml_gsl_ran_gamma_int"
  external gamma_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_gamma_pdf" "gsl_ran_gamma_pdf" "float"
  external gamma_mt : Gsl_rng.t -> a:int -> b:float -> float
    = "ml_gsl_ran_gamma_mt"
  external gamma_knuth : Gsl_rng.t -> a:int -> b:float -> float
    = "ml_gsl_ran_gamma_knuth"
  external flat : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_flat"
  external flat_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_flat_pdf" "gsl_ran_flat_pdf" "float"
  external lognormal : Gsl_rng.t -> zeta:float -> sigma:float -> float
    = "ml_gsl_ran_lognormal"
  external lognormal_pdf : float -> zeta:float -> sigma:float -> float
    = "ml_gsl_ran_lognormal_pdf" "gsl_ran_lognormal_pdf" "float"
  external chisq : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_chisq"
  external chisq_pdf : float -> nu:float -> float = "ml_gsl_ran_chisq_pdf"
    "gsl_ran_chisq_pdf" "float"
  external dirichlet :
    Gsl_rng.t -> alpha:float array -> theta:float array -> unit
    = "ml_gsl_ran_dirichlet"
  external dirichlet_pdf : alpha:float array -> theta:float array -> float
    = "ml_gsl_ran_dirichlet_pdf"
  external dirichlet_lnpdf : alpha:float array -> theta:float array -> float
    = "ml_gsl_ran_dirichlet_lnpdf"
  external fdist : Gsl_rng.t -> nu1:float -> nu2:float -> float
    = "ml_gsl_ran_fdist"
  external fdist_pdf : float -> nu1:float -> nu2:float -> float
    = "ml_gsl_ran_fdist_pdf" "gsl_ran_fdist_pdf" "float"
  external tdist : Gsl_rng.t -> nu:float -> float = "ml_gsl_ran_tdist"
  external tdist_pdf : float -> nu:float -> float = "ml_gsl_ran_tdist_pdf"
    "gsl_ran_tdist_pdf" "float"
  external beta : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_beta"
  external beta_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_beta_pdf" "gsl_ran_beta_pdf" "float"
  external logistic : Gsl_rng.t -> a:float -> float = "ml_gsl_ran_logistic"
  external logistic_pdf : float -> a:float -> float
    = "ml_gsl_ran_logistic_pdf" "gsl_ran_logistic_pdf" "float"
  external pareto : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_pareto"
  external pareto_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_pareto_pdf" "gsl_ran_pareto_pdf" "float"
  external dir_2d : Gsl_rng.t -> float * float = "ml_gsl_ran_dir_2d"
  external dir_2d_trig_method : Gsl_rng.t -> float * float
    = "ml_gsl_ran_dir_2d_trig_method"
  external dir_3d : Gsl_rng.t -> float * float * float = "ml_gsl_ran_dir_3d"
  external dir_nd : Gsl_rng.t -> float array -> unit = "ml_gsl_ran_dir_nd"
  external weibull : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_weibull"
  external weibull_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_weibull_pdf" "gsl_ran_weibull_pdf" "float"
  external gumbel1 : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_gumbel1"
  external gumbel1_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_gumbel1_pdf" "gsl_ran_gumbel1_pdf" "float"
  external gumbel2 : Gsl_rng.t -> a:float -> b:float -> float
    = "ml_gsl_ran_gumbel2"
  external gumbel2_pdf : float -> a:float -> b:float -> float
    = "ml_gsl_ran_gumbel2_pdf" "gsl_ran_gumbel2_pdf" "float"
  type discrete
  val discrete_preproc : float array -> Gsl_randist.discrete
  external discrete : Gsl_rng.t -> Gsl_randist.discrete -> int
    = "ml_gsl_ran_discrete" "noalloc"
  external discrete_pdf : int -> Gsl_randist.discrete -> float
    = "ml_gsl_ran_discrete_pdf"
  external poisson : Gsl_rng.t -> mu:float -> int = "ml_gsl_ran_poisson"
  external poisson_pdf : int -> mu:float -> float = "ml_gsl_ran_poisson_pdf"
  external bernoulli : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_bernoulli"
  external bernoulli_pdf : int -> p:float -> float
    = "ml_gsl_ran_bernoulli_pdf"
  external binomial : Gsl_rng.t -> p:float -> n:int -> int
    = "ml_gsl_ran_binomial"
  external binomial_knuth : Gsl_rng.t -> p:float -> n:int -> int
    = "ml_gsl_ran_binomial_knuth"
  external binomial_tpe : Gsl_rng.t -> p:float -> n:int -> int
    = "ml_gsl_ran_binomial_tpe"
  external binomial_pdf : int -> p:float -> n:int -> float
    = "ml_gsl_ran_binomial_pdf"
  external multinomial : Gsl_rng.t -> n:int -> p:float array -> int array
    = "ml_gsl_ran_multinomial"
  external multinomial_pdf : p:float array -> n:int array -> float
    = "ml_gsl_ran_multinomial_pdf"
  external multinomial_lnpdf : p:float array -> n:int array -> float
    = "ml_gsl_ran_multinomial_lnpdf"
  external negative_binomial : Gsl_rng.t -> p:float -> n:int -> int
    = "ml_gsl_ran_negative_binomial"
  external negative_binomial_pdf : int -> p:float -> n:int -> float
    = "ml_gsl_ran_negative_binomial_pdf"
  external pascal : Gsl_rng.t -> p:float -> k:int -> int
    = "ml_gsl_ran_pascal"
  external pascal_pdf : int -> p:float -> n:int -> float
    = "ml_gsl_ran_pascal_pdf"
  external geometric : Gsl_rng.t -> p:float -> int = "ml_gsl_ran_geometric"
  external geometric_pdf : int -> p:float -> float
    = "ml_gsl_ran_geometric_pdf"
  external hypergeometric : Gsl_rng.t -> n1:int -> n2:int -> t:int -> int
    = "ml_gsl_ran_hypergeometric"
  external hypergeometric_pdf : int -> n1:int -> n2:int -> t:int -> float
    = "ml_gsl_ran_hypergeometric_pdf"
  external logarithmic : Gsl_rng.t -> p:float -> int
    = "ml_gsl_ran_logarithmic"
  external logarithmic_pdf : int -> p:float -> float
    = "ml_gsl_ran_logarithmic_pdf"
  external shuffle : Gsl_rng.t -> 'a array -> unit = "ml_gsl_ran_shuffle"
  external choose : Gsl_rng.t -> src:'a array -> dst:'a array -> unit
    = "ml_gsl_ran_choose"
  external sample : Gsl_rng.t -> src:'a array -> dst:'a array -> unit
    = "ml_gsl_ran_sample"
end
ocamlgsl-0.6.0/doc/type_Gsl_cheb.html0000664000076400007640000001344010607755605016253 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_cheb sig
  type t
  val make : int -> Gsl_cheb.t
  external order : Gsl_cheb.t -> int = "ml_gsl_cheb_order"
  external coefs : Gsl_cheb.t -> float array = "ml_gsl_cheb_coefs"
  external init : Gsl_cheb.t -> Gsl_fun.gsl_fun -> a:float -> b:float -> unit
    = "ml_gsl_cheb_init"
  val eval : Gsl_cheb.t -> ?order:int -> float -> float
  val eval_err : Gsl_cheb.t -> ?order:int -> float -> Gsl_fun.result
  val deriv : Gsl_cheb.t -> Gsl_cheb.t
  val integ : Gsl_cheb.t -> Gsl_cheb.t
end
ocamlgsl-0.6.0/doc/type_Gsl_vector.html0000664000076400007640000005334210607755576016670 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector sig
  type double_vector_bigarr =
      (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t
  type vector = Gsl_vector.double_vector_bigarr
  val create : ?init:float -> int -> Gsl_vector.vector
  val of_array : float array -> Gsl_vector.vector
  val to_array : Gsl_vector.vector -> float array
  val length : Gsl_vector.vector -> int
  val get : Gsl_vector.vector -> int -> float
  val set : Gsl_vector.vector -> int -> float -> unit
  val set_all : Gsl_vector.vector -> float -> unit
  val set_zero : Gsl_vector.vector -> unit
  val set_basis : Gsl_vector.vector -> int -> unit
  val memcpy : src:Gsl_vector.vector -> dst:Gsl_vector.vector -> unit
  val copy : Gsl_vector.vector -> Gsl_vector.vector
  val swap_element : Gsl_vector.vector -> int -> int -> unit
  val reverse : Gsl_vector.vector -> unit
  external add : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_vector_add"
  external sub : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_vector_sub"
  external mul : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_vector_mul"
  external div : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_vector_div"
  external scale : Gsl_vector.vector -> float -> unit = "ml_gsl_vector_scale"
  external add_constant : Gsl_vector.vector -> float -> unit
    = "ml_gsl_vector_add_constant"
  external is_null : Gsl_vector.vector -> bool = "ml_gsl_vector_isnull"
  external max : Gsl_vector.vector -> float = "ml_gsl_vector_max"
  external min : Gsl_vector.vector -> float = "ml_gsl_vector_min"
  external minmax : Gsl_vector.vector -> float * float
    = "ml_gsl_vector_minmax"
  external max_index : Gsl_vector.vector -> int = "ml_gsl_vector_maxindex"
  external min_index : Gsl_vector.vector -> int = "ml_gsl_vector_minindex"
  external minmax_index : Gsl_vector.vector -> int * int
    = "ml_gsl_vector_minmaxindex"
  val subvector :
    Gsl_vector.vector -> off:int -> len:int -> Gsl_vector.vector
  module Single :
    sig
      type float_vector_bigarr =
          (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
      type vector = Gsl_vector.Single.float_vector_bigarr
      val create : ?init:float -> int -> Gsl_vector.Single.vector
      val of_array : float array -> Gsl_vector.Single.vector
      val to_array : Gsl_vector.Single.vector -> float array
      val length : Gsl_vector.Single.vector -> int
      val get : Gsl_vector.Single.vector -> int -> float
      val set : Gsl_vector.Single.vector -> int -> float -> unit
      val set_all : Gsl_vector.Single.vector -> float -> unit
      val set_zero : Gsl_vector.Single.vector -> unit
      val set_basis : Gsl_vector.Single.vector -> int -> unit
      val memcpy :
        src:Gsl_vector.Single.vector -> dst:Gsl_vector.Single.vector -> unit
      val copy : Gsl_vector.Single.vector -> Gsl_vector.Single.vector
      val swap_element : Gsl_vector.Single.vector -> int -> int -> unit
      val reverse : Gsl_vector.Single.vector -> unit
      external add :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_vector_float_add"
      external sub :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_vector_float_sub"
      external mul :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_vector_float_mul"
      external div :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_vector_float_div"
      external scale : Gsl_vector.Single.vector -> float -> unit
        = "ml_gsl_vector_float_scale"
      external add_constant : Gsl_vector.Single.vector -> float -> unit
        = "ml_gsl_vector_float_add_constant"
      external is_null : Gsl_vector.Single.vector -> bool
        = "ml_gsl_vector_float_isnull"
      external max : Gsl_vector.Single.vector -> float
        = "ml_gsl_vector_float_max"
      external min : Gsl_vector.Single.vector -> float
        = "ml_gsl_vector_float_min"
      external minmax : Gsl_vector.Single.vector -> float * float
        = "ml_gsl_vector_float_minmax"
      external max_index : Gsl_vector.Single.vector -> int
        = "ml_gsl_vector_float_maxindex"
      external min_index : Gsl_vector.Single.vector -> int
        = "ml_gsl_vector_float_minindex"
      external minmax_index : Gsl_vector.Single.vector -> int * int
        = "ml_gsl_vector_float_minmaxindex"
      val subvector :
        Gsl_vector.Single.vector ->
        off:int -> len:int -> Gsl_vector.Single.vector
    end
end
ocamlgsl-0.6.0/doc/index_attributes.html0000664000076400007640000000717510607755611017066 0ustar olivoliv ocamlgsl 0.6.0 : Index of class attributes

Index of class attributes


ocamlgsl-0.6.0/doc/Gsl_vector.html0000664000076400007640000002377310607755576015634 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector

Module Gsl_vector


module Gsl_vector: sig .. end
Vector of floats implemented with Bigarray


Double precision


type double_vector_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t 
type vector = double_vector_bigarr 

Operations


val create : ?init:float -> int -> vector
val of_array : float array -> vector
val to_array : vector -> float array
val length : vector -> int
val get : vector -> int -> float
val set : vector -> int -> float -> unit
val set_all : vector -> float -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : src:vector -> dst:vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit
val add : vector -> vector -> unit
val sub : vector -> vector -> unit
val mul : vector -> vector -> unit
val div : vector -> vector -> unit
val scale : vector -> float -> unit
val add_constant : vector -> float -> unit
val is_null : vector -> bool
val max : vector -> float
val min : vector -> float
val minmax : vector -> float * float
val max_index : vector -> int
val min_index : vector -> int
val minmax_index : vector -> int * int

No-copy operations


val subvector : vector -> off:int -> len:int -> vector

Single precision


module Single: sig .. end
ocamlgsl-0.6.0/doc/index.html0000664000076400007640000002350510607755610014612 0ustar olivoliv ocamlgsl 0.6.0

ocamlgsl 0.6.0

Index of types
Index of exceptions
Index of values
Index of modules


Gsl_error
Error reporting
Gsl_ieee
IEEE floating-point arithmetic
Gsl_math
Mathematical constants and some simple functions
Gsl_complex
Complex arithmetic and simple functions
Gsl_vector
Vector of floats implemented with Bigarray
Gsl_vector_flat
Vector of floats implemented with a float array
Gsl_vector_complex
Vector of complex numbers implemented with a Bigarray
Gsl_vector_complex_flat
Vector of complex numbers implemented with a float array
Gsl_matrix
Matrices of floats implemented with Bigarray
Gsl_matrix_flat
Matrices of floats implemented with float array
Gsl_matrix_complex
Matrices of complex numbers implemented with Bigarray
Gsl_matrix_complex_flat
Matrices of complex number simplemented with float array
Gsl_vectmat
Generic variant types for vectors and matrices
Gsl_blas
BLAS support
Gsl_blas_flat
Gsl_blas_gen
Gsl_fun
Callbacks and types for error estimates
Gsl_permut
Permutations
Gsl_sort
Sorting
Gsl_linalg
Simple linear algebra operations
Gsl_eigen
Eigensystems
Gsl_poly
Polynomials
Gsl_interp
Interpolation
Gsl_rng
Random Number Generation
Gsl_qrng
Quasi-Random Sequences
Gsl_randist
Random Number Distributions
Gsl_integration
Numerical Integration
Gsl_fit
Least-Squares Fitting
Gsl_multifit
Multi-parameter Least-Squares Fitting
Gsl_multifit_nlin
Nonlinear Least-Squares Fitting
Gsl_root
One dimensional Root-Finding
Gsl_multiroot
Multidimensional Root-Finding
Gsl_min
One dimensional Minimization
Gsl_multimin
Multidimensional Minimization
Gsl_diff
Numerical Differentiation
Gsl_cheb
Chebyshev Approximations
Gsl_sum
Series Acceleration
Gsl_fft
Fast Fourier Transforms
Gsl_monte
Monte Carlo Integration
Gsl_siman
Simulated Annealing
Gsl_odeiv
Ordinary Differential Equations
Gsl_histo
Histograms
Gsl_stats
Statistics
Gsl_wavelet
Wavelet Transforms
Gsl_bspline
Basis Splines
Gsl_const
Values of physical constants
Gsl_sf
Special functions
Gsl_cdf
Cumulative distribution functions
ocamlgsl-0.6.0/doc/type_Gsl_blas.Single.html0000664000076400007640000005040210607755600017505 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Single sig
  external sdsdot :
    alpha:float ->
    Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
    = "ml_gsl_blas_sdsdot"
  external dsdot :
    Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
    = "ml_gsl_blas_dsdot"
  external dot :
    Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
    = "ml_gsl_blas_sdot"
  external nrm2 : Gsl_vector.Single.vector -> float = "ml_gsl_blas_snrm2"
  external asum : Gsl_vector.Single.vector -> float = "ml_gsl_blas_sasum"
  external iamax : Gsl_vector.Single.vector -> int = "ml_gsl_blas_isamax"
  external swap :
    Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_sswap"
  external copy :
    Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_scopy"
  external axpy :
    float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_saxpy"
  external rot :
    Gsl_vector.Single.vector ->
    Gsl_vector.Single.vector -> float -> float -> unit = "ml_gsl_blas_srot"
  external scal : float -> Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_sscal"
  external gemv :
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    x:Gsl_vector.Single.vector ->
    beta:float -> y:Gsl_vector.Single.vector -> unit = "ml_gsl_blas_sgemv_bc"
    "ml_gsl_blas_sgemv"
  external trmv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_strmv"
  external trsv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
    = "ml_gsl_blas_strsv"
  external symv :
    Gsl_blas.uplo ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    x:Gsl_vector.Single.vector ->
    beta:float -> y:Gsl_vector.Single.vector -> unit = "ml_gsl_blas_ssymv_bc"
    "ml_gsl_blas_ssymv"
  external dger :
    alpha:float ->
    x:Gsl_vector.Single.vector ->
    y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_sger"
  external syr :
    Gsl_blas.uplo ->
    alpha:float ->
    x:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_ssyr"
  external syr2 :
    Gsl_blas.uplo ->
    alpha:float ->
    x:Gsl_vector.Single.vector ->
    y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_ssyr2"
  external gemm :
    ta:Gsl_blas.transpose ->
    tb:Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    b:Gsl_matrix.Single.matrix ->
    beta:float -> c:Gsl_matrix.Single.matrix -> unit = "ml_gsl_blas_sgemm_bc"
    "ml_gsl_blas_sgemm"
  external symm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    b:Gsl_matrix.Single.matrix ->
    beta:float -> c:Gsl_matrix.Single.matrix -> unit = "ml_gsl_blas_ssymm_bc"
    "ml_gsl_blas_ssymm"
  external syrk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    beta:float -> c:Gsl_matrix.Single.matrix -> unit = "ml_gsl_blas_ssyrk_bc"
    "ml_gsl_blas_ssyrk"
  external syr2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix ->
    b:Gsl_matrix.Single.matrix ->
    beta:float -> c:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_ssyr2k_bc" "ml_gsl_blas_ssyr2k"
  external trmm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_strmm_bc" "ml_gsl_blas_strmm"
  external trsm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:float ->
    a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
    = "ml_gsl_blas_strsm_bc" "ml_gsl_blas_strsm"
end
ocamlgsl-0.6.0/doc/Gsl_vector_flat.html0000664000076400007640000002602410607755576016632 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_flat

Module Gsl_vector_flat


module Gsl_vector_flat: sig .. end
Vector of floats implemented with a float array


type double_vector_flat = private {
   data : float array;
   off : int;
   len : int;
   stride : int;
}
type vector = double_vector_flat 
val check : vector -> vector
Raises Failure if off, len or stride designate an invalid subvector of data

Operations


val create : ?init:float -> int -> vector
val of_array : float array -> vector
val to_array : vector -> float array
val length : vector -> int
val get : vector -> int -> float
val set : vector -> int -> float -> unit
val set_all : vector -> float -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : src:vector -> dst:vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit
val add : vector -> vector -> unit
val sub : vector -> vector -> unit
val mul : vector -> vector -> unit
val div : vector -> vector -> unit
val scale : vector -> float -> unit
val add_constant : vector -> float -> unit
val is_null : vector -> bool
val max : vector -> float
val min : vector -> float
val minmax : vector -> float * float
val max_index : vector -> int
val min_index : vector -> int
val minmax_index : vector -> int * int

No-copy operations


val subvector : ?stride:int ->
vector -> off:int -> len:int -> vector
val view_array : ?stride:int -> ?off:int -> ?len:int -> float array -> vector
ocamlgsl-0.6.0/doc/type_Gsl_vectmat.html0000664000076400007640000006133310607755600017014 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vectmat sig
  type vec = [ `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ]
  val vec_convert :
    ?protect:bool ->
    [< `A of float array
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    [> Gsl_vectmat.vec ]
  type mat = [ `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ]
  val mat_convert :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    [> Gsl_vectmat.mat ]
  val mat_flat :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_matrix_flat.matrix
  type cvec =
      [ `CV of Gsl_vector_complex.vector
      | `CVF of Gsl_vector_complex_flat.vector ]
  type cmat =
      [ `CM of Gsl_matrix_complex.matrix
      | `CMF of Gsl_matrix_complex_flat.matrix ]
  val cmat_convert :
    ?protect:bool ->
    [< `CA of Gsl_complex.complex_array * int * int
     | `CM of Gsl_matrix_complex.matrix
     | `CMF of Gsl_matrix_complex_flat.matrix ] ->
    [> Gsl_vectmat.cmat ]
  val length :
    [< `CV of Gsl_vector_complex.vector
     | `CVF of Gsl_vector_complex_flat.vector
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    int
  val to_array : [< Gsl_vectmat.vec ] -> float array
  val v_copy : [< Gsl_vectmat.vec ] -> [> Gsl_vectmat.vec ]
  val subvector :
    [< Gsl_vectmat.vec ] -> off:int -> len:int -> [> Gsl_vectmat.vec ]
  external v_memcpy : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_vector_memcpy"
  external v_add : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_vector_add"
  external v_sub : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_vector_sub"
  external v_mul : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_vector_mul"
  external v_div : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
    = "ml_gsl_vector_div"
  external v_max : [< Gsl_vectmat.vec ] -> float = "ml_gsl_vector_max"
  external v_min : [< Gsl_vectmat.vec ] -> float = "ml_gsl_vector_min"
  external v_minmax : [< Gsl_vectmat.vec ] -> float * float
    = "ml_gsl_vector_minmax"
  external v_max_index : [< Gsl_vectmat.vec ] -> int
    = "ml_gsl_vector_maxindex"
  external v_min_index : [< Gsl_vectmat.vec ] -> int
    = "ml_gsl_vector_minindex"
  external v_minmax_index : [< Gsl_vectmat.vec ] -> int * int
    = "ml_gsl_vector_minmaxindex"
  val dims :
    [< `CM of Gsl_matrix_complex.matrix
     | `CMF of Gsl_matrix_complex_flat.matrix
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    int * int
  val tmp : [< Gsl_vectmat.mat ] -> [> `M of Gsl_matrix.matrix ]
  val to_arrays : [< Gsl_vectmat.mat ] -> float array array
  val m_copy : [< Gsl_vectmat.mat ] -> [> Gsl_vectmat.mat ]
  external m_memcpy : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_memcpy"
  external m_add : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_add"
  external m_sub : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_sub"
  external m_mul : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_mul"
  external m_div : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_div"
  external m_add_diagonal : [< Gsl_vectmat.mat ] -> float -> unit
    = "ml_gsl_matrix_add_diagonal"
  external swap_rows : [< Gsl_vectmat.mat ] -> int -> int -> unit
    = "ml_gsl_matrix_swap_rows"
  external swap_columns : [< Gsl_vectmat.mat ] -> int -> int -> unit
    = "ml_gsl_matrix_swap_columns"
  external swap_rowcol : [< Gsl_vectmat.mat ] -> int -> int -> unit
    = "ml_gsl_matrix_swap_rowcol"
  external transpose : [< Gsl_vectmat.mat ] -> [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_transpose_memcpy"
  external transpose_in_place : [< Gsl_vectmat.mat ] -> unit
    = "ml_gsl_matrix_transpose"
  val is_null :
    [< `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    bool
  val scale :
    [< `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    float -> unit
  val add_constant :
    [< `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    float -> unit
end
ocamlgsl-0.6.0/doc/type_Gsl_sum.Trunc.html0000664000076400007640000001155710607755605017257 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sum.Trunc sig
  type ws
  val make : int -> Gsl_sum.Trunc.ws
  external accel : float array -> Gsl_sum.Trunc.ws -> Gsl_fun.result
    = "ml_gsl_sum_levin_utrunc_accel"
  type ws_info = { size : int; terms_used : int; sum_plain : float; }
  external get_info : Gsl_sum.Trunc.ws -> Gsl_sum.Trunc.ws_info
    = "ml_gsl_sum_levin_utrunc_getinfo"
end
ocamlgsl-0.6.0/doc/type_Gsl_min.html0000664000076400007640000001353510607755605016142 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_min sig
  type kind = GOLDENSECTION | BRENT
  type t
  val make :
    Gsl_min.kind ->
    Gsl_fun.gsl_fun -> min:float -> lo:float -> up:float -> Gsl_min.t
  external name : Gsl_min.t -> string = "ml_gsl_min_fminimizer_name"
  external iterate : Gsl_min.t -> unit = "ml_gsl_min_fminimizer_iterate"
  external minimum : Gsl_min.t -> float = "ml_gsl_min_fminimizer_x_minimum"
  external interval : Gsl_min.t -> float * float
    = "ml_gsl_min_fminimizer_x_interv"
  external test_interval :
    x_lo:float -> x_up:float -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_min_test_interval"
end
ocamlgsl-0.6.0/doc/index_types.html0000664000076400007640000005500010607755611016032 0ustar olivoliv ocamlgsl 0.6.0 : Index of types

Index of types


A
accel [Gsl_interp]

C
cmat [Gsl_vectmat]
complex [Gsl_complex]
complex_array [Gsl_complex]
complex_double_vector_bigarr [Gsl_vector_complex]
complex_float_mat_bigarr [Gsl_matrix_complex.Single]
complex_float_vector_bigarr [Gsl_vector_complex.Single]
complex_mat_bigarr [Gsl_matrix_complex]
complex_mat_flat [Gsl_matrix_complex_flat]
complex_vector_flat [Gsl_vector_complex_flat]
control [Gsl_odeiv]
cubic_sol [Gsl_poly]
cvec [Gsl_vectmat]

D
diag [Gsl_blas_gen]
diag [Gsl_blas_flat]
diag [Gsl_blas]
direction [Gsl_wavelet]
direction [Gsl_fft.Complex]
discrete [Gsl_randist]
double_mat_bigarr [Gsl_matrix]
double_mat_flat [Gsl_matrix_flat]
double_vector_bigarr [Gsl_vector]
double_vector_flat [Gsl_vector_flat]

E
errno [Gsl_error]
evolve [Gsl_odeiv]
exceptions [Gsl_ieee]
excepts [Gsl_ieee]

F
fft_array [Gsl_fft]
float_mat_bigarr [Gsl_matrix.Single]
float_rep [Gsl_ieee]
float_vector_bigarr [Gsl_vector.Single]

G
gsl_fun [Gsl_fun]
gsl_fun_fdf [Gsl_fun]

H
hadjust [Gsl_odeiv]
herm_ws [Gsl_eigen]
hermv_ws [Gsl_eigen]
histo_pdf [Gsl_histo]

I
ieee_type [Gsl_ieee]
interp [Gsl_interp]
interp_type [Gsl_interp]

K
key [Gsl_integration]
kind [Gsl_wavelet]
kind [Gsl_monte]
kind [Gsl_multimin.NoDeriv]
kind [Gsl_multimin.Deriv]
kind [Gsl_min]
kind [Gsl_multiroot.Deriv]
kind [Gsl_multiroot.NoDeriv]
kind [Gsl_root.Polish]
kind [Gsl_root.Bracket]
kind [Gsl_multifit_nlin]

L
layout [Gsl_fft]
linear_fit_coeffs [Gsl_fit]

M
mat [Gsl_vectmat]
matrix [Gsl_matrix_complex_flat]
matrix [Gsl_matrix_complex.Single]
matrix [Gsl_matrix_complex]
matrix [Gsl_matrix_flat]
matrix [Gsl_matrix.Single]
matrix [Gsl_matrix]
miser_params [Gsl_monte]
miser_state [Gsl_monte]
mode [Gsl_fun]
Reduce the accuracy of some evaluations to speed up computations.
monte_fun [Gsl_fun]
mul_fit_coeffs [Gsl_fit]
multi_fun [Gsl_fun]
multi_fun_fdf [Gsl_fun]
multim_fun [Gsl_fun]
multim_fun_fdf [Gsl_fun]

N
nonsymm_ws [Gsl_eigen]
nonsymmv_ws [Gsl_eigen]

O
order [Gsl_blas_gen]
order [Gsl_blas_flat]
order [Gsl_blas]
ordering [Gsl_wavelet]

P
params [Gsl_siman]
permut [Gsl_permut]
plain_state [Gsl_monte]
poly [Gsl_poly]
precision [Gsl_ieee]

Q
qawo_sine [Gsl_integration]
qawo_table [Gsl_integration]
qaws_table [Gsl_integration]
qrng_type [Gsl_qrng]
quad_sol [Gsl_poly]

R
result [Gsl_fun]
The result of a computation : res is the value and err an estimate of the absolute error in the value.
result_e10 [Gsl_fun]
Result of computation with a scaling exponent.
rng_type [Gsl_rng]
rounding [Gsl_ieee]

S
side [Gsl_blas_gen]
side [Gsl_blas_flat]
side [Gsl_blas]
sort [Gsl_eigen]
step [Gsl_odeiv]
step_kind [Gsl_odeiv]
symm_ws [Gsl_eigen]
symmv_ws [Gsl_eigen]
system [Gsl_odeiv]

T
t [Gsl_wavelet]
t [Gsl_histo]
The histogram type
t [Gsl_cheb]
t [Gsl_multimin.NoDeriv]
t [Gsl_multimin.Deriv]
t [Gsl_min]
t [Gsl_multiroot.Deriv]
t [Gsl_multiroot.NoDeriv]
t [Gsl_root.Polish]
t [Gsl_root.Bracket]
t [Gsl_multifit_nlin]
t [Gsl_qrng]
t [Gsl_rng]
t [Gsl_interp]
transpose [Gsl_blas_gen]
transpose [Gsl_blas_flat]
transpose [Gsl_blas]

U
uplo [Gsl_blas_gen]
uplo [Gsl_blas_flat]
uplo [Gsl_blas]

V
vec [Gsl_vectmat]
vector [Gsl_vector_complex_flat]
vector [Gsl_vector_complex.Single]
vector [Gsl_vector_complex]
vector [Gsl_vector_flat]
vector [Gsl_vector.Single]
vector [Gsl_vector]
vegas_info [Gsl_monte]
vegas_mode [Gsl_monte]
vegas_params [Gsl_monte]
vegas_state [Gsl_monte]

W
wavetable [Gsl_fft.Complex]
wavetable [Gsl_fft.Halfcomplex]
wavetable [Gsl_fft.Real]
workspace [Gsl_fft.Complex]
workspace [Gsl_fft.Real]
workspace [Gsl_integration]
ws [Gsl_bspline]
ws [Gsl_wavelet]
ws [Gsl_sum.Trunc]
ws [Gsl_sum]
ws [Gsl_multifit]
ws_info [Gsl_sum.Trunc]
ws_info [Gsl_sum]

ocamlgsl-0.6.0/doc/type_Gsl_error.html0000664000076400007640000002134410607755576016514 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_error sig
  val version : string
  type errno =
      CONTINUE
    | FAILURE
    | EDOM
    | ERANGE
    | EFAULT
    | EINVAL
    | EFAILED
    | EFACTOR
    | ESANITY
    | ENOMEM
    | EBADFUNC
    | ERUNAWAY
    | EMAXITER
    | EZERODIV
    | EBADTOL
    | ETOL
    | EUNDRFLW
    | EOVRFLW
    | ELOSS
    | EROUND
    | EBADLEN
    | ENOTSQR
    | ESING
    | EDIVERGE
    | EUNSUP
    | EUNIMPL
    | ECACHE
    | ETABLE
    | ENOPROG
    | ENOPROGJ
    | ETOLF
    | ETOLX
    | ETOLG
    | EOF
  exception Gsl_exn of (Gsl_error.errno * string)
  val init : unit -> unit
  val uninit : unit -> unit
  external strerror : Gsl_error.errno -> string = "ml_gsl_strerror"
  val string_of_errno : Gsl_error.errno -> string
  val pprint_exn : exn -> string
  val handle_exn : ('-> 'b) -> '-> 'b
end
ocamlgsl-0.6.0/doc/type_Gsl_fft.html0000664000076400007640000004515010607755605016134 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft sig
  exception Wrong_layout
  type layout = Real | Halfcomplex | Halfcomplex_rad2 | Complex
  type fft_array = { mutable layout : Gsl_fft.layout; data : float array; }
  module Real :
    sig
      type workspace
      type wavetable
      val make_workspace : int -> Gsl_fft.Real.workspace
      val make_wavetable : int -> Gsl_fft.Real.wavetable
      external transform :
        ?stride:int ->
        Gsl_fft.fft_array ->
        Gsl_fft.Real.wavetable -> Gsl_fft.Real.workspace -> unit
        = "ml_gsl_fft_real_transform"
      external transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
        = "ml_gsl_fft_real_radix2_transform"
      val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
    end
  module Halfcomplex :
    sig
      type wavetable
      val make_wavetable : int -> Gsl_fft.Halfcomplex.wavetable
      external transform :
        ?stride:int ->
        Gsl_fft.fft_array ->
        Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
        = "ml_gsl_fft_halfcomplex_transform"
      external transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
        = "ml_gsl_fft_halfcomplex_radix2_transform"
      external backward :
        ?stride:int ->
        Gsl_fft.fft_array ->
        Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
        = "ml_gsl_fft_halfcomplex_backward"
      external backward_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
        = "ml_gsl_fft_halfcomplex_radix2_backward"
      external inverse :
        ?stride:int ->
        Gsl_fft.fft_array ->
        Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
        = "ml_gsl_fft_halfcomplex_inverse"
      external inverse_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
        = "ml_gsl_fft_halfcomplex_radix2_inverse"
      val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
    end
  module Complex :
    sig
      type workspace
      type wavetable
      type direction = Forward | Backward
      val make_workspace : int -> Gsl_fft.Complex.workspace
      val make_wavetable : int -> Gsl_fft.Complex.wavetable
      external forward :
        ?stride:int ->
        Gsl_complex.complex_array ->
        Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
        = "ml_gsl_fft_complex_forward"
      external forward_rad2 :
        ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
        = "ml_gsl_fft_complex_rad2_forward"
      external transform :
        ?stride:int ->
        Gsl_complex.complex_array ->
        Gsl_fft.Complex.wavetable ->
        Gsl_fft.Complex.workspace -> Gsl_fft.Complex.direction -> unit
        = "ml_gsl_fft_complex_transform"
      external transform_rad2 :
        ?dif:bool ->
        ?stride:int ->
        Gsl_complex.complex_array -> Gsl_fft.Complex.direction -> unit
        = "ml_gsl_fft_complex_rad2_transform"
      external backward :
        ?stride:int ->
        Gsl_complex.complex_array ->
        Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
        = "ml_gsl_fft_complex_backward"
      external backward_rad2 :
        ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
        = "ml_gsl_fft_complex_rad2_backward"
      external inverse :
        ?stride:int ->
        Gsl_complex.complex_array ->
        Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
        = "ml_gsl_fft_complex_inverse"
      external inverse_rad2 :
        ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
        = "ml_gsl_fft_complex_rad2_inverse"
    end
  val unpack : Gsl_fft.fft_array -> Gsl_complex.complex_array
  val hc_mult : Gsl_fft.fft_array -> Gsl_fft.fft_array -> unit
  val hc_mult_rad2 : Gsl_fft.fft_array -> Gsl_fft.fft_array -> unit
end
ocamlgsl-0.6.0/doc/Gsl_matrix.Single.html0000664000076400007640000002277610607755577017061 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix.Single

Module Gsl_matrix.Single


module Single: sig .. end

type float_mat_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t 
type matrix = float_mat_bigarr 
val create : ?init:float -> int -> int -> matrix
val dims : matrix -> int * int
val of_array : float array -> int -> int -> matrix
val of_arrays : float array array -> matrix
val to_array : matrix -> float array
val to_arrays : matrix -> float array array
val get : matrix -> int -> int -> float
val set : matrix -> int -> int -> float -> unit
val set_all : matrix -> float -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix -> dst:matrix -> unit
val copy : matrix -> matrix
val row : matrix -> int -> Gsl_vector.Single.vector
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> float -> unit
val add_constant : matrix -> float -> unit
val add_diagonal : matrix -> float -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
ocamlgsl-0.6.0/doc/Gsl_multiroot.NoDeriv.html0000664000076400007640000001524410607755605017720 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot.NoDeriv

Module Gsl_multiroot.NoDeriv


module NoDeriv: sig .. end


type kind =
| HYBRIDS
| HYBRID
| DNEWTON
| BROYDEN
type t 
val make : kind ->
int -> Gsl_fun.multi_fun -> Gsl_vector.vector -> t
val name : t -> string
val iterate : t -> unit
val root : t -> Gsl_vector.vector -> unit
val get_state : t ->
?x:Gsl_vector.vector ->
?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit
val test_delta : t -> epsabs:float -> epsrel:float -> bool
val test_residual : t -> epsabs:float -> bool
ocamlgsl-0.6.0/doc/type_Gsl_eigen.html0000664000076400007640000004427510607755604016452 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_eigen sig
  type symm_ws
  val make_symm_ws : int -> Gsl_eigen.symm_ws
  external _symm :
    Gsl_vectmat.mat -> Gsl_vectmat.vec -> Gsl_eigen.symm_ws -> unit
    = "ml_gsl_eigen_symm"
  val symm :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vector.vector
  type symmv_ws
  val make_symmv_ws : int -> Gsl_eigen.symmv_ws
  external _symmv :
    Gsl_vectmat.mat ->
    Gsl_vectmat.vec -> Gsl_vectmat.mat -> Gsl_eigen.symmv_ws -> unit
    = "ml_gsl_eigen_symmv"
  val symmv :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vector.vector * Gsl_matrix.matrix
  type sort = VAL_ASC | VAL_DESC | ABS_ASC | ABS_DESC
  external symmv_sort :
    Gsl_vector.vector * Gsl_matrix.matrix -> Gsl_eigen.sort -> unit
    = "ml_gsl_eigen_symmv_sort"
  type herm_ws
  val make_herm_ws : int -> Gsl_eigen.herm_ws
  external _herm :
    Gsl_vectmat.cmat -> Gsl_vectmat.vec -> Gsl_eigen.herm_ws -> unit
    = "ml_gsl_eigen_herm"
  val herm :
    ?protect:bool ->
    [< `CA of Gsl_complex.complex_array * int * int
     | `CM of Gsl_matrix_complex.matrix
     | `CMF of Gsl_matrix_complex_flat.matrix ] ->
    Gsl_vector.vector
  type hermv_ws
  val make_hermv_ws : int -> Gsl_eigen.hermv_ws
  external _hermv :
    Gsl_vectmat.cmat ->
    Gsl_vectmat.vec -> Gsl_vectmat.cmat -> Gsl_eigen.hermv_ws -> unit
    = "ml_gsl_eigen_hermv"
  val hermv :
    ?protect:bool ->
    [< `CA of Gsl_complex.complex_array * int * int
     | `CM of Gsl_matrix_complex.matrix
     | `CMF of Gsl_matrix_complex_flat.matrix ] ->
    Gsl_vector.vector * Gsl_matrix_complex.matrix
  external hermv_sort :
    Gsl_vector.vector * Gsl_matrix_complex.matrix -> Gsl_eigen.sort -> unit
    = "ml_gsl_eigen_hermv_sort"
  type nonsymm_ws
  val make_nonsymm_ws : int -> Gsl_eigen.nonsymm_ws
  external _nonsymm :
    Gsl_vectmat.mat -> Gsl_vectmat.cvec -> Gsl_eigen.nonsymm_ws -> unit
    = "ml_gsl_eigen_nonsymm"
  external _nonsymm_Z :
    Gsl_vectmat.mat ->
    Gsl_vectmat.cvec -> Gsl_vectmat.mat -> Gsl_eigen.nonsymm_ws -> unit
    = "ml_gsl_eigen_nonsymm_Z"
  val nonsymm :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vector_complex.vector
  type nonsymmv_ws
  val make_nonsymmv_ws : int -> Gsl_eigen.nonsymmv_ws
  external _nonsymmv :
    Gsl_vectmat.mat ->
    Gsl_vectmat.cvec -> Gsl_vectmat.cmat -> Gsl_eigen.nonsymmv_ws -> unit
    = "ml_gsl_eigen_nonsymmv"
  external _nonsymmv_Z :
    Gsl_vectmat.mat ->
    Gsl_vectmat.cvec ->
    Gsl_vectmat.cmat -> Gsl_vectmat.mat -> Gsl_eigen.nonsymmv_ws -> unit
    = "ml_gsl_eigen_nonsymmv_Z"
  val nonsymmv :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vector_complex.vector * Gsl_matrix_complex.matrix
  external nonsymmv_sort :
    Gsl_vector_complex.vector * Gsl_matrix_complex.matrix ->
    Gsl_eigen.sort -> unit = "ml_gsl_eigen_nonsymmv_sort"
end
ocamlgsl-0.6.0/doc/type_Gsl_fit.html0000664000076400007640000001357410607755604016143 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fit sig
  type linear_fit_coeffs = {
    c0 : float;
    c1 : float;
    cov00 : float;
    cov01 : float;
    cov11 : float;
    sumsq : float;
  }
  external linear :
    ?weight:float array ->
    float array -> float array -> Gsl_fit.linear_fit_coeffs
    = "ml_gsl_fit_linear"
  external linear_est :
    float -> coeffs:Gsl_fit.linear_fit_coeffs -> Gsl_fun.result
    = "ml_gsl_fit_linear_est"
  type mul_fit_coeffs = { m_c1 : float; m_cov11 : float; m_sumsq : float; }
  external mul :
    ?weight:float array ->
    float array -> float array -> Gsl_fit.mul_fit_coeffs = "ml_gsl_fit_mul"
  external mul_est : float -> coeffs:Gsl_fit.mul_fit_coeffs -> Gsl_fun.result
    = "ml_gsl_fit_mul_est"
end
ocamlgsl-0.6.0/doc/index_class_types.html0000664000076400007640000000716310607755611017226 0ustar olivoliv ocamlgsl 0.6.0 : Index of class types

Index of class types


ocamlgsl-0.6.0/doc/Gsl_ieee.html0000664000076400007640000002756710607755576015246 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_ieee

Module Gsl_ieee


module Gsl_ieee: sig .. end
IEEE floating-point arithmetic


Representation of floating point numbers



type ieee_type =
| NAN
| INF
| NORMAL
| DENORMAL
| ZERO

type float_rep = {
   sign : int;
   mantissa : string;
   exponent : int;
   ieee_type : ieee_type;
}
val rep_of_float : float -> float_rep
val print : float -> string

IEEE environment



type precision =
| SINGLE
| DOUBLE
| EXTENDED

type rounding =
| TO_NEAREST
| DOWN
| UP
| TO_ZERO

type exceptions =
| MASK_INVALID
| MASK_DENORMALIZED
| MASK_DIVISION_BY_ZERO
| MASK_OVERFLOW
| MASK_UNDERFLOW
| MASK_ALL
| TRAP_INEXACT
val set_mode : ?precision:precision ->
?rounding:rounding -> exceptions list -> unit
val env_setup : unit -> unit

FPU status word



type excepts =
| FE_INEXACT
| FE_DIVBYZERO
| FE_UNDERFLOW
| FE_OVERFLOW
| FE_INVALID
| FE_ALL_EXCEPT
val clear_except : excepts list -> unit
val test_except : excepts list -> excepts list
ocamlgsl-0.6.0/doc/Gsl_cheb.html0000664000076400007640000001310010607755605015203 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_cheb

Module Gsl_cheb


module Gsl_cheb: sig .. end
Chebyshev Approximations

type t 
val make : int -> t
val order : t -> int
val coefs : t -> float array
val init : t -> Gsl_fun.gsl_fun -> a:float -> b:float -> unit
val eval : t -> ?order:int -> float -> float
val eval_err : t -> ?order:int -> float -> Gsl_fun.result
val deriv : t -> t
val integ : t -> t
ocamlgsl-0.6.0/doc/type_Gsl_fft.Complex.html0000664000076400007640000002227110607755605017541 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Complex sig
  type workspace
  type wavetable
  type direction = Forward | Backward
  val make_workspace : int -> Gsl_fft.Complex.workspace
  val make_wavetable : int -> Gsl_fft.Complex.wavetable
  external forward :
    ?stride:int ->
    Gsl_complex.complex_array ->
    Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
    = "ml_gsl_fft_complex_forward"
  external forward_rad2 :
    ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
    = "ml_gsl_fft_complex_rad2_forward"
  external transform :
    ?stride:int ->
    Gsl_complex.complex_array ->
    Gsl_fft.Complex.wavetable ->
    Gsl_fft.Complex.workspace -> Gsl_fft.Complex.direction -> unit
    = "ml_gsl_fft_complex_transform"
  external transform_rad2 :
    ?dif:bool ->
    ?stride:int ->
    Gsl_complex.complex_array -> Gsl_fft.Complex.direction -> unit
    = "ml_gsl_fft_complex_rad2_transform"
  external backward :
    ?stride:int ->
    Gsl_complex.complex_array ->
    Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
    = "ml_gsl_fft_complex_backward"
  external backward_rad2 :
    ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
    = "ml_gsl_fft_complex_rad2_backward"
  external inverse :
    ?stride:int ->
    Gsl_complex.complex_array ->
    Gsl_fft.Complex.wavetable -> Gsl_fft.Complex.workspace -> unit
    = "ml_gsl_fft_complex_inverse"
  external inverse_rad2 :
    ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
    = "ml_gsl_fft_complex_rad2_inverse"
end
ocamlgsl-0.6.0/doc/type_Gsl_vector_complex_flat.html0000664000076400007640000002302610607755577021422 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex_flat sig
  type complex_vector_flat = private {
    data : float array;
    off : int;
    len : int;
    stride : int;
  }
  type vector = Gsl_vector_complex_flat.complex_vector_flat
  val create :
    ?init:Gsl_complex.complex -> int -> Gsl_vector_complex_flat.vector
  val of_array : Gsl_complex.complex array -> Gsl_vector_complex_flat.vector
  val to_array : Gsl_vector_complex_flat.vector -> Gsl_complex.complex array
  val of_complex_array :
    Gsl_complex.complex_array -> Gsl_vector_complex_flat.vector
  val to_complex_array :
    Gsl_vector_complex_flat.vector -> Gsl_complex.complex_array
  val length : Gsl_vector_complex_flat.vector -> int
  val get : Gsl_vector_complex_flat.vector -> int -> Gsl_complex.complex
  val set :
    Gsl_vector_complex_flat.vector -> int -> Gsl_complex.complex -> unit
  val set_all : Gsl_vector_complex_flat.vector -> Gsl_complex.complex -> unit
  val set_zero : Gsl_vector_complex_flat.vector -> unit
  val set_basis : Gsl_vector_complex_flat.vector -> int -> unit
  val memcpy :
    Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
  val copy : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector
  val swap_element : Gsl_vector_complex_flat.vector -> int -> int -> unit
  val reverse : Gsl_vector_complex_flat.vector -> unit
  val subvector :
    ?stride:int ->
    Gsl_vector_complex_flat.vector ->
    off:int -> len:int -> Gsl_vector_complex_flat.vector
  val view_complex_array :
    ?stride:int ->
    ?off:int ->
    ?len:int -> Gsl_complex.complex_array -> Gsl_vector_complex_flat.vector
  val real : Gsl_vector_complex_flat.vector -> Gsl_vector_flat.vector
  val imag : Gsl_vector_complex_flat.vector -> Gsl_vector_flat.vector
end
ocamlgsl-0.6.0/doc/type_Gsl_histo.html0000664000076400007640000002726610607755606016514 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_histo sig
  type t = private { n : int; range : float array; bin : float array; }
  val check : Gsl_histo.t -> bool
  val make : int -> Gsl_histo.t
  val copy : Gsl_histo.t -> Gsl_histo.t
  external set_ranges : Gsl_histo.t -> float array -> unit
    = "ml_gsl_histogram_set_ranges"
  external set_ranges_uniform :
    Gsl_histo.t -> xmin:float -> xmax:float -> unit
    = "ml_gsl_histogram_set_ranges_uniform"
  external accumulate : Gsl_histo.t -> ?w:float -> float -> unit
    = "ml_gsl_histogram_accumulate"
  val get : Gsl_histo.t -> int -> float
  val get_range : Gsl_histo.t -> int -> float * float
  val h_max : Gsl_histo.t -> float
  val h_min : Gsl_histo.t -> float
  val bins : Gsl_histo.t -> int
  val reset : Gsl_histo.t -> unit
  external find : Gsl_histo.t -> float -> int = "ml_gsl_histogram_find"
  external max_val : Gsl_histo.t -> float = "ml_gsl_histogram_max_val"
  external max_bin : Gsl_histo.t -> int = "ml_gsl_histogram_max_bin"
  external min_val : Gsl_histo.t -> float = "ml_gsl_histogram_min_val"
  external min_bin : Gsl_histo.t -> int = "ml_gsl_histogram_min_bin"
  external mean : Gsl_histo.t -> float = "ml_gsl_histogram_mean"
  external sigma : Gsl_histo.t -> float = "ml_gsl_histogram_sigma"
  external sum : Gsl_histo.t -> float = "ml_gsl_histogram_sum"
  external equal_bins_p : Gsl_histo.t -> Gsl_histo.t -> bool
    = "ml_gsl_histogram_equal_bins_p"
  external add : Gsl_histo.t -> Gsl_histo.t -> unit = "ml_gsl_histogram_add"
  external sub : Gsl_histo.t -> Gsl_histo.t -> unit = "ml_gsl_histogram_sub"
  external mul : Gsl_histo.t -> Gsl_histo.t -> unit = "ml_gsl_histogram_mul"
  external div : Gsl_histo.t -> Gsl_histo.t -> unit = "ml_gsl_histogram_div"
  external scale : Gsl_histo.t -> float -> unit = "ml_gsl_histogram_scale"
  external shift : Gsl_histo.t -> float -> unit = "ml_gsl_histogram_shift"
  type histo_pdf = private {
    pdf_n : int;
    pdf_range : float array;
    pdf_sum : float array;
  }
  val init : Gsl_histo.t -> Gsl_histo.histo_pdf
  external sample : Gsl_histo.histo_pdf -> float -> float
    = "ml_gsl_histogram_pdf_sample"
end
ocamlgsl-0.6.0/doc/type_Gsl_root.html0000664000076400007640000002315110607755605016335 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root sig
  module Bracket :
    sig
      type kind = BISECTION | FALSEPOS | BRENT
      type t
      val make :
        Gsl_root.Bracket.kind ->
        Gsl_fun.gsl_fun -> float -> float -> Gsl_root.Bracket.t
      external name : Gsl_root.Bracket.t -> string
        = "ml_gsl_root_fsolver_name"
      external iterate : Gsl_root.Bracket.t -> unit
        = "ml_gsl_root_fsolver_iterate"
      external root : Gsl_root.Bracket.t -> float
        = "ml_gsl_root_fsolver_root"
      external interval : Gsl_root.Bracket.t -> float * float
        = "ml_gsl_root_fsolver_x_interv"
    end
  module Polish :
    sig
      type kind = NEWTON | SECANT | STEFFENSON
      type t
      val make :
        Gsl_root.Polish.kind ->
        Gsl_fun.gsl_fun_fdf -> float -> Gsl_root.Polish.t
      external name : Gsl_root.Polish.t -> string
        = "ml_gsl_root_fdfsolver_name"
      external iterate : Gsl_root.Polish.t -> unit
        = "ml_gsl_root_fdfsolver_iterate"
      external root : Gsl_root.Polish.t -> float
        = "ml_gsl_root_fdfsolver_root"
    end
  external test_interval :
    lo:float -> up:float -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_root_test_interval"
  external test_delta :
    x1:float -> x0:float -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_root_test_delta"
  external test_residual : f:float -> epsabs:float -> bool
    = "ml_gsl_root_test_residual"
end
ocamlgsl-0.6.0/doc/Gsl_interp.html0000664000076400007640000002445010607755604015614 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_interp

Module Gsl_interp


module Gsl_interp: sig .. end
Interpolation

type t 
type accel 

type interp_type =
| LINEAR
| POLYNOMIAL
| CSPLINE
| CSPLINE_PERIODIC
| AKIMA
| 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 = {
   interp : t;
   accel : accel;
   xa : float array;
   ya : float array;
   size : int;
   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
ocamlgsl-0.6.0/doc/type_Gsl_sort.html0000664000076400007640000001522610607755603016343 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sort sig
  val vector : Gsl_vector.vector -> unit
  val vector_index : Gsl_vector.vector -> Gsl_permut.permut
  val vector_smallest : int -> Gsl_vector.vector -> float array
  val vector_largest : int -> Gsl_vector.vector -> float array
  val vector_smallest_index : int -> Gsl_vector.vector -> Gsl_permut.permut
  val vector_largest_index : int -> Gsl_vector.vector -> Gsl_permut.permut
  val vector_flat : Gsl_vector_flat.vector -> unit
  val vector_flat_index : Gsl_vector_flat.vector -> Gsl_permut.permut
  val vector_flat_smallest : int -> Gsl_vector_flat.vector -> float array
  val vector_flat_largest : int -> Gsl_vector_flat.vector -> float array
  val vector_flat_smallest_index :
    int -> Gsl_vector_flat.vector -> Gsl_permut.permut
  val vector_flat_largest_index :
    int -> Gsl_vector_flat.vector -> Gsl_permut.permut
end
ocamlgsl-0.6.0/doc/type_Gsl_diff.html0000664000076400007640000001131110607755605016255 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_diff sig
  external central : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
    = "ml_gsl_diff_central"
  external forward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
    = "ml_gsl_diff_forward"
  external backward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
    = "ml_gsl_diff_backward"
end
ocamlgsl-0.6.0/doc/type_Gsl_stats.html0000664000076400007640000002374110607755606016516 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_stats sig
  external mean : ?w:float array -> float array -> float
    = "ml_gsl_stats_mean"
  external variance : ?w:float array -> ?mean:float -> float array -> float
    = "ml_gsl_stats_variance"
  external sd : ?w:float array -> ?mean:float -> float array -> float
    = "ml_gsl_stats_sd"
  external variance_with_fixed_mean :
    ?w:float array -> mean:float -> float array -> float
    = "ml_gsl_stats_variance_with_fixed_mean"
  external sd_with_fixed_mean :
    ?w:float array -> mean:float -> float array -> float
    = "ml_gsl_stats_sd_with_fixed_mean"
  external absdev : ?w:float array -> ?mean:float -> float array -> float
    = "ml_gsl_stats_absdev"
  external skew : ?w:float array -> float array -> float
    = "ml_gsl_stats_skew"
  external skew_m_sd :
    ?w:float array -> mean:float -> sd:float -> float array -> float
    = "ml_gsl_stats_skew_m_sd"
  external kurtosis : ?w:float array -> float array -> float
    = "ml_gsl_stats_kurtosis"
  external kurtosis_m_sd :
    ?w:float array -> mean:float -> sd:float -> float array -> float
    = "ml_gsl_stats_kurtosis_m_sd"
  external lag1_autocorrelation : mean:float -> float array -> float
    = "ml_gsl_stats_lag1_autocorrelation"
  external covariance : float array -> float array -> float
    = "ml_gsl_stats_covariance"
  external covariance_m :
    mean1:float -> float array -> mean2:float -> float array -> float
    = "ml_gsl_stats_covariance_m"
  external max : float array -> float = "ml_gsl_stats_max"
  external min : float array -> float = "ml_gsl_stats_min"
  external minmax : float array -> float * float = "ml_gsl_stats_minmax"
  external max_index : float array -> int = "ml_gsl_stats_max_index"
  external min_index : float array -> int = "ml_gsl_stats_min_index"
  external minmax_index : float array -> int * int
    = "ml_gsl_stats_minmax_index"
  external quantile_from_sorted_data : float array -> float -> float
    = "ml_gsl_stats_quantile_from_sorted_data"
end
ocamlgsl-0.6.0/doc/Gsl_multifit_nlin.html0000664000076400007640000001525410607755604017172 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multifit_nlin

Module Gsl_multifit_nlin


module Gsl_multifit_nlin: sig .. end
Nonlinear Least-Squares Fitting

type t 

type kind =
| LMSDER
| LMDER
val make : kind ->
n:int ->
p:int -> Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> t
val name : t -> string
val iterate : t -> unit
val position : t -> Gsl_vector.vector -> unit
val get_state : t ->
?x:Gsl_vector.vector ->
?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit
val test_delta : t -> epsabs:float -> epsrel:float -> bool
val test_gradient : t -> epsabs:float -> Gsl_vector.vector -> bool
val covar : t -> epsrel:float -> Gsl_matrix.matrix -> unit
ocamlgsl-0.6.0/doc/Gsl_sf.html0000664000076400007640000020376110607755606014731 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sf

Module Gsl_sf


module Gsl_sf: sig .. end
Special functions

val airy_Ai : float -> Gsl_fun.mode -> float
val airy_Ai_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Bi : float -> Gsl_fun.mode -> float
val airy_Bi_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Ai_scaled : float -> Gsl_fun.mode -> float
val airy_Ai_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Bi_scaled : float -> Gsl_fun.mode -> float
val airy_Bi_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Ai_deriv : float -> Gsl_fun.mode -> float
val airy_Ai_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Bi_deriv : float -> Gsl_fun.mode -> float
val airy_Bi_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Ai_deriv_scaled : float -> Gsl_fun.mode -> float
val airy_Ai_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_Bi_deriv_scaled : float -> Gsl_fun.mode -> float
val airy_Bi_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result
val airy_zero_Ai : int -> float
val airy_zero_Ai_e : int -> Gsl_fun.result
val airy_zero_Bi : int -> float
val airy_zero_Bi_e : int -> Gsl_fun.result
val bessel_J0 : float -> float
val bessel_J0_e : float -> Gsl_fun.result
val bessel_J1 : float -> float
val bessel_J1_e : float -> Gsl_fun.result
val bessel_Jn : int -> float -> float
val bessel_Jn_e : int -> float -> Gsl_fun.result
val bessel_Jn_array : int -> float -> float array -> unit
val bessel_Y0 : float -> float
val bessel_Y0_e : float -> Gsl_fun.result
val bessel_Y1 : float -> float
val bessel_Y1_e : float -> Gsl_fun.result
val bessel_Yn : int -> float -> float
val bessel_Yn_e : int -> float -> Gsl_fun.result
val bessel_Yn_array : int -> float -> float array -> unit
val bessel_I0 : float -> float
val bessel_I0_e : float -> Gsl_fun.result
val bessel_I1 : float -> float
val bessel_I1_e : float -> Gsl_fun.result
val bessel_In : int -> float -> float
val bessel_In_e : int -> float -> Gsl_fun.result
val bessel_In_array : int -> float -> float array -> unit
val bessel_K0 : float -> float
val bessel_K0_e : float -> Gsl_fun.result
val bessel_K1 : float -> float
val bessel_K1_e : float -> Gsl_fun.result
val bessel_Kn : int -> float -> float
val bessel_Kn_e : int -> float -> Gsl_fun.result
val bessel_Kn_array : int -> float -> float array -> unit
val bessel_I0_scaled : float -> float
val bessel_I0_scaled_e : float -> Gsl_fun.result
val bessel_I1_scaled : float -> float
val bessel_I1_scaled_e : float -> Gsl_fun.result
val bessel_In : int -> float -> float
val bessel_In_e : int -> float -> Gsl_fun.result
val bessel_In_scaled_array : int -> float -> float array -> unit
val bessel_K0_scaled : float -> float
val bessel_K0_scaled_e : float -> Gsl_fun.result
val bessel_K1_scaled : float -> float
val bessel_K1_scaled_e : float -> Gsl_fun.result
val bessel_Kn : int -> float -> float
val bessel_Kn_e : int -> float -> Gsl_fun.result
val bessel_Kn_scaled_array : int -> float -> float array -> unit
val bessel_j0 : float -> float
val bessel_j0_e : float -> Gsl_fun.result
val bessel_j1 : float -> float
val bessel_j1_e : float -> Gsl_fun.result
val bessel_j2 : float -> float
val bessel_j2_e : float -> Gsl_fun.result
val bessel_jl : int -> float -> float
val bessel_jl_e : int -> float -> Gsl_fun.result
val bessel_jl_array : int -> float -> float array -> unit
val bessel_jl_steed_array : float -> float array -> unit
val bessel_y0 : float -> float
val bessel_y0_e : float -> Gsl_fun.result
val bessel_y1 : float -> float
val bessel_y1_e : float -> Gsl_fun.result
val bessel_y2 : float -> float
val bessel_y2_e : float -> Gsl_fun.result
val bessel_yl : int -> float -> float
val bessel_yl_e : int -> float -> Gsl_fun.result
val bessel_yl_array : int -> float -> float array -> unit
val bessel_i0_scaled : float -> float
val bessel_i0_scaled_e : float -> Gsl_fun.result
val bessel_i1_scaled : float -> float
val bessel_i1_scaled_e : float -> Gsl_fun.result
val bessel_il_scaled : int -> float -> float
val bessel_il_scaled_e : int -> float -> Gsl_fun.result
val bessel_il_scaled_array : int -> float -> float array -> unit
val bessel_k0_scaled : float -> float
val bessel_k0_scaled_e : float -> Gsl_fun.result
val bessel_k1_scaled : float -> float
val bessel_k1_scaled_e : float -> Gsl_fun.result
val bessel_kl_scaled : int -> float -> float
val bessel_kl_scaled_e : int -> float -> Gsl_fun.result
val bessel_kl_scaled_array : int -> float -> float array -> unit
val bessel_Jnu : float -> float -> float
val bessel_Jnu_e : float -> float -> Gsl_fun.result
val bessel_sequence_Jnu_e : float -> Gsl_fun.mode -> float array -> unit
val bessel_Ynu : float -> float -> float
val bessel_Ynu_e : float -> float -> Gsl_fun.result
val bessel_Inu : float -> float -> float
val bessel_Inu_e : float -> float -> Gsl_fun.result
val bessel_Inu_scaled : float -> float -> float
val bessel_Inu_scaled_e : float -> float -> Gsl_fun.result
val bessel_Knu : float -> float -> float
val bessel_Knu_e : float -> float -> Gsl_fun.result
val bessel_lnKnu : float -> float -> float
val bessel_lnKnu_e : float -> float -> Gsl_fun.result
val bessel_Knu_scaled : float -> float -> float
val bessel_Knu_scaled_e : float -> float -> Gsl_fun.result
val bessel_zero_J0 : int -> float
val bessel_zero_J0_e : int -> Gsl_fun.result
val bessel_zero_J1 : int -> float
val bessel_zero_J1_e : int -> Gsl_fun.result
val bessel_zero_Jnu : float -> int -> float
val bessel_zero_Jnu_e : float -> int -> Gsl_fun.result
val clausen : float -> float
val clausen_e : float -> Gsl_fun.result
val hydrogenicR_1 : float -> float -> float
val hydrogenicR_1_e : float -> float -> Gsl_fun.result
val hydrogenicR : int -> int -> float -> float -> float
val hydrogenicR_e : int -> int -> float -> float -> Gsl_fun.result
val coulomb_CL_e : float -> float -> Gsl_fun.result
val coulomb_CL_array : float -> float -> float array -> unit
val dawson : float -> float
val dawson_e : float -> Gsl_fun.result
val debye_1 : float -> float
val debye_1_e : float -> Gsl_fun.result
val debye_2 : float -> float
val debye_2_e : float -> Gsl_fun.result
val debye_3 : float -> float
val debye_3_e : float -> Gsl_fun.result
val debye_4 : float -> float
val debye_4_e : float -> Gsl_fun.result
val debye_5 : float -> float
val debye_5_e : float -> Gsl_fun.result
val debye_6 : float -> float
val debye_6_e : float -> Gsl_fun.result
val dilog : float -> float
val dilog_e : float -> Gsl_fun.result
val complex_dilog_xy_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val complex_dilog_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val complex_spence_xy_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val multiply_e : float -> float -> Gsl_fun.result
val multiply_err_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result
val ellint_Kcomp : float -> Gsl_fun.mode -> float
val ellint_Kcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_Ecomp : float -> Gsl_fun.mode -> float
val ellint_Ecomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_Pcomp : float -> float -> Gsl_fun.mode -> float
val ellint_Pcomp_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_Dcomp : float -> Gsl_fun.mode -> float
val ellint_Dcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_F : float -> float -> Gsl_fun.mode -> float
val ellint_F_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_E : float -> float -> Gsl_fun.mode -> float
val ellint_E_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_P : float -> float -> float -> Gsl_fun.mode -> float
val ellint_P_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_D : float -> float -> float -> Gsl_fun.mode -> float
val ellint_D_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_RC : float -> float -> Gsl_fun.mode -> float
val ellint_RC_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_RD : float -> float -> float -> Gsl_fun.mode -> float
val ellint_RD_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_RF : float -> float -> float -> Gsl_fun.mode -> float
val ellint_RF_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
val ellint_RJ : float -> float -> float -> float -> Gsl_fun.mode -> float
val ellint_RJ_e : float -> float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result
val erf : float -> float
val erf_e : float -> Gsl_fun.result
val erfc : float -> float
val erfc_e : float -> Gsl_fun.result
val log_erfc : float -> float
val log_erfc_e : float -> Gsl_fun.result
val erf_Z : float -> float
val erf_Z_e : float -> Gsl_fun.result
val erf_Q : float -> float
val erf_Q_e : float -> Gsl_fun.result
val exp : float -> float
val exp_e : float -> Gsl_fun.result
val exp_e10 : float -> Gsl_fun.result_e10
val exp_mult : float -> float -> float
val exp_mult_e : float -> float -> Gsl_fun.result
val exp_mult_e10 : float -> float -> Gsl_fun.result_e10
val expm1 : float -> float
val expm1_e : float -> Gsl_fun.result
val exprel : float -> float
val exprel_e : float -> Gsl_fun.result
val exprel_2 : float -> float
val exprel_2_e : float -> Gsl_fun.result
val exprel_n : int -> float -> float
val exprel_n_e : int -> float -> Gsl_fun.result
val exp_err_e : x:float -> dx:float -> Gsl_fun.result
val exp_err_e10 : x:float -> dx:float -> Gsl_fun.result_e10
val exp_mult_err_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result
val exp_mult_err_e10_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result_e10
val expint_E1 : float -> float
val expint_E1_e : float -> Gsl_fun.result
val expint_E2 : float -> float
val expint_E2_e : float -> Gsl_fun.result
val expint_E1_scaled : float -> float
val expint_E1_scaled_e : float -> Gsl_fun.result
val expint_E2_scaled : float -> float
val expint_E2_scaled_e : float -> Gsl_fun.result
val expint_Ei : float -> float
val expint_Ei_e : float -> Gsl_fun.result
val expint_Ei_scaled : float -> float
val expint_Ei_scaled_e : float -> Gsl_fun.result
val shi : float -> float
val chi : float -> float
val expint_3 : float -> float
val expint_3_e : float -> Gsl_fun.result
val si : float -> float
val ci : float -> float
val atanint : float -> float
val atanint_e : float -> Gsl_fun.result
val fermi_dirac_m1 : float -> float
val fermi_dirac_m1_e : float -> Gsl_fun.result
val fermi_dirac_0 : float -> float
val fermi_dirac_0_e : float -> Gsl_fun.result
val fermi_dirac_1 : float -> float
val fermi_dirac_1_e : float -> Gsl_fun.result
val fermi_dirac_2 : float -> float
val fermi_dirac_2_e : float -> Gsl_fun.result
val fermi_dirac_int : int -> float -> float
val fermi_dirac_int_e : int -> float -> Gsl_fun.result
val fermi_dirac_mhalf : float -> float
val fermi_dirac_mhalf_e : float -> Gsl_fun.result
val fermi_dirac_half : float -> float
val fermi_dirac_half_e : float -> Gsl_fun.result
val fermi_dirac_3half : float -> float
val fermi_dirac_3half_e : float -> Gsl_fun.result
val fermi_dirac_inc_0 : float -> float -> float
val fermi_dirac_inc_0_e : float -> float -> Gsl_fun.result
val gamma : float -> float
val gamma_e : float -> Gsl_fun.result
val lngamma : float -> float
val lngamma_e : float -> Gsl_fun.result
val lngamma_sgn_e : float -> Gsl_fun.result * float
val gammastar : float -> float
val gammastar_e : float -> Gsl_fun.result
val gammainv : float -> float
val gammainv_e : float -> Gsl_fun.result
val lngamma_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val taylorcoeff : int -> float -> float
val taylorcoeff_e : int -> float -> Gsl_fun.result
val fact : int -> float
val fact_e : int -> Gsl_fun.result
val doublefact : int -> float
val doublefact_e : int -> Gsl_fun.result
val lnfact : int -> float
val lnfact_e : int -> Gsl_fun.result
val lndoublefact : int -> float
val lndoublefact_e : int -> Gsl_fun.result
val choose : int -> int -> float
val choose_e : int -> int -> Gsl_fun.result
val lnchoose : int -> int -> float
val lnchoose_e : int -> int -> Gsl_fun.result
val poch : float -> float -> float
val poch_e : float -> float -> Gsl_fun.result
val lnpoch : float -> float -> float
val lnpoch_e : float -> float -> Gsl_fun.result
val lnpoch_sgn_e : float -> float -> Gsl_fun.result * float
val pochrel : float -> float -> float
val pochrel_e : float -> float -> Gsl_fun.result
val gamma_inc_Q : float -> float -> float
val gamma_inc_Q_e : float -> float -> Gsl_fun.result
val gamma_inc_P : float -> float -> float
val gamma_inc_P_e : float -> float -> Gsl_fun.result
val gamma_inc : float -> float -> float
val gamma_inc_e : float -> float -> Gsl_fun.result
val beta : float -> float -> float
val beta_e : float -> float -> Gsl_fun.result
val lnbeta : float -> float -> float
val lnbeta_e : float -> float -> Gsl_fun.result
val lnbeta_sgn_e : float -> float -> Gsl_fun.result * float
val beta_inc : float -> float -> float -> float
val beta_inc_e : float -> float -> float -> Gsl_fun.result
val gegenpoly_1 : float -> float -> float
val gegenpoly_1_e : float -> float -> Gsl_fun.result
val gegenpoly_2 : float -> float -> float
val gegenpoly_2_e : float -> float -> Gsl_fun.result
val gegenpoly_3 : float -> float -> float
val gegenpoly_3_e : float -> float -> Gsl_fun.result
val gegenpoly_n : int -> float -> float -> float
val gegenpoly_n_e : int -> float -> float -> Gsl_fun.result
val gegenpoly_array : float -> float -> float array -> unit
val laguerre_1 : float -> float -> float
val laguerre_1_e : float -> float -> Gsl_fun.result
val laguerre_2 : float -> float -> float
val laguerre_2_e : float -> float -> Gsl_fun.result
val laguerre_3 : float -> float -> float
val laguerre_3_e : float -> float -> Gsl_fun.result
val laguerre_n : int -> float -> float -> float
val laguerre_n_e : int -> float -> float -> Gsl_fun.result
val lambert_W0 : float -> float
val lambert_W0_e : float -> Gsl_fun.result
val lambert_Wm1 : float -> float
val lambert_Wm1_e : float -> Gsl_fun.result
val legendre_P1 : float -> float
val legendre_P1_e : float -> Gsl_fun.result
val legendre_P2 : float -> float
val legendre_P2_e : float -> Gsl_fun.result
val legendre_P3 : float -> float
val legendre_P3_e : float -> Gsl_fun.result
val legendre_Pl : int -> float -> float
val legendre_Pl_e : int -> float -> Gsl_fun.result
val legendre_Pl_array : float -> float array -> unit
val legendre_Q0 : float -> float
val legendre_Q0_e : float -> Gsl_fun.result
val legendre_Q1 : float -> float
val legendre_Q1_e : float -> Gsl_fun.result
val legendre_Ql : int -> float -> float
val legendre_Ql_e : int -> float -> Gsl_fun.result
val legendre_Plm : int -> int -> float -> float
val legendre_Plm_e : int -> int -> float -> Gsl_fun.result
val legendre_Plm_array : int -> int -> float -> float array -> unit
val legendre_sphPlm : int -> int -> float -> float
val legendre_sphPlm_e : int -> int -> float -> Gsl_fun.result
val legendre_sphPlm_array : int -> int -> float -> float array -> unit
val legendre_array_size : int -> int -> int
val log : float -> float
val log_e : float -> Gsl_fun.result
val log_abs : float -> float
val log_abs_e : float -> Gsl_fun.result
val log_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val log_1plusx : float -> float
val log_1plusx_e : float -> Gsl_fun.result
val log_1plusx_mx : float -> float
val log_1plusx_mx_e : float -> Gsl_fun.result
val pow_int : float -> int -> float
val pow_int_e : float -> int -> Gsl_fun.result
val psi_int : int -> float
val psi_int_e : int -> Gsl_fun.result
val psi : float -> float
val psi_e : float -> Gsl_fun.result
val psi_1piy : float -> float
val psi_1piy_e : float -> Gsl_fun.result
val psi_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val psi_1_int : int -> float
val psi_1_int_e : int -> Gsl_fun.result
val psi_1 : float -> float
val psi_1_e : float -> Gsl_fun.result
val psi_n : int -> float -> float
val psi_n_e : int -> float -> Gsl_fun.result
val synchrotron_1 : float -> float
val synchrotron_1_e : float -> Gsl_fun.result
val synchrotron_2 : float -> float
val synchrotron_2_e : float -> Gsl_fun.result
val transport_2 : float -> float
val transport_2_e : float -> Gsl_fun.result
val transport_3 : float -> float
val transport_3_e : float -> Gsl_fun.result
val transport_4 : float -> float
val transport_4_e : float -> Gsl_fun.result
val transport_5 : float -> float
val transport_5_e : float -> Gsl_fun.result
val sin : float -> float
val sin_e : float -> Gsl_fun.result
val cos : float -> float
val cos_e : float -> Gsl_fun.result
val hypot : float -> float
val hypot_e : float -> Gsl_fun.result
val sinc : float -> float
val sinc_e : float -> Gsl_fun.result
val complex_sin_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val complex_cos_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val complex_logsin_e : float -> float -> Gsl_fun.result * Gsl_fun.result
val lnsinh : float -> float
val lnsinh_e : float -> Gsl_fun.result
val lncosh : float -> float
val lncosh_e : float -> Gsl_fun.result
val rect_of_polar : r:float -> theta:float -> Gsl_fun.result * Gsl_fun.result
val polar_of_rect : x:float -> y:float -> Gsl_fun.result * Gsl_fun.result
val angle_restrict_symm : float -> float
val angle_restrict_pos : float -> float
val sin_err_e : float -> dx:float -> Gsl_fun.result
val cos_err_e : float -> dx:float -> Gsl_fun.result
val zeta_int : int -> float
val zeta_int_e : int -> Gsl_fun.result
val zeta : float -> float
val zeta_e : float -> Gsl_fun.result
val hzeta : float -> float -> float
val hzeta_e : float -> float -> Gsl_fun.result
val eta_int : int -> float
val eta_int_e : int -> Gsl_fun.result
val eta : float -> float
val eta_e : float -> Gsl_fun.result
ocamlgsl-0.6.0/doc/Gsl_integration.html0000664000076400007640000003057610607755604016644 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_integration

Module Gsl_integration


module Gsl_integration: sig .. end
Numerical Integration

val qng : Gsl_fun.gsl_fun ->
a:float -> b:float -> epsabs:float -> epsrel:float -> float * float * int
type workspace 
val make_ws : int -> workspace
val size : workspace -> int

type key =
| GAUSS15
| GAUSS21
| GAUSS31
| GAUSS41
| GAUSS51
| GAUSS61
val qag : Gsl_fun.gsl_fun ->
a:float ->
b:float ->
epsabs:float ->
epsrel:float ->
?limit:int ->
key -> workspace -> Gsl_fun.result
val qags : Gsl_fun.gsl_fun ->
a:float ->
b:float ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
val qagp : Gsl_fun.gsl_fun ->
pts:float array ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
val qagi : Gsl_fun.gsl_fun ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
val qagiu : Gsl_fun.gsl_fun ->
a:float ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
val qagil : Gsl_fun.gsl_fun ->
b:float ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
val qag_sing : Gsl_fun.gsl_fun ->
a:float ->
b:float ->
?pts:float array ->
?limit:int -> epsabs:float -> epsrel:float -> unit -> Gsl_fun.result
val qawc : Gsl_fun.gsl_fun ->
a:float ->
b:float ->
c:float ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
type qaws_table 
val alloc_qaws : alpha:float -> beta:float -> mu:int -> nu:int -> qaws_table
val set_qaws : qaws_table ->
alpha:float -> beta:float -> mu:int -> nu:int -> unit
val free_qaws : qaws_table -> unit
val qaws : Gsl_fun.gsl_fun ->
a:float ->
b:float ->
qaws_table ->
epsabs:float ->
epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result
type qawo_table 

type qawo_sine =
| QAWO_COSINE
| QAWO_SINE
val alloc_qawo : omega:float ->
l:float -> qawo_sine -> n:int -> qawo_table
val set_qawo : qawo_table ->
omega:float -> l:float -> qawo_sine -> unit
val free_qawo : qawo_table -> unit
val qawo : Gsl_fun.gsl_fun ->
a:float ->
epsabs:float ->
epsrel:float ->
?limit:int ->
workspace -> qawo_table -> Gsl_fun.result
val qawf : Gsl_fun.gsl_fun ->
a:float ->
epsabs:float ->
?limit:int ->
workspace ->
workspace -> qawo_table -> Gsl_fun.result
ocamlgsl-0.6.0/doc/Gsl_complex.html0000664000076400007640000004632310607755576015775 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_complex

Module Gsl_complex


module Gsl_complex: sig .. end
Complex arithmetic and simple functions

type complex = Complex.t = {
   re : float;
   im : float;
}
val complex : re:float -> im:float -> complex
type complex_array = float array 
val set : complex_array -> int -> complex -> unit
val get : complex_array -> int -> complex
val unpack : complex_array -> complex array
val pack : complex array -> complex_array
val mult : complex_array -> complex_array -> unit
val rect : float -> float -> complex
val polar : float -> float -> complex

Properties of complex numbers


val arg : complex -> float
val abs : complex -> float
val abs2 : complex -> float
val logabs : complex -> float

Complex arithmetic operators


val add : complex -> complex -> complex
val sub : complex -> complex -> complex
val mul : complex -> complex -> complex
val div : complex -> complex -> complex
val add_real : complex -> float -> complex
val sub_real : complex -> float -> complex
val mul_real : complex -> float -> complex
val div_real : complex -> float -> complex
val add_imag : complex -> float -> complex
val sub_imag : complex -> float -> complex
val mul_imag : complex -> float -> complex
val div_imag : complex -> float -> complex
val conjugate : complex -> complex
val inverse : complex -> complex
val negative : complex -> complex

Elementary complex functions


val sqrt : complex -> complex
val sqrt_real : float -> complex
val pow : complex -> complex -> complex
val pow_real : complex -> float -> complex
val exp : complex -> complex
val log : complex -> complex
val log10 : complex -> complex
val log_b : complex -> complex -> complex

Complex trigonometric functions


val sin : complex -> complex
val cos : complex -> complex
val tan : complex -> complex
val sec : complex -> complex
val csc : complex -> complex
val cot : complex -> complex

Inverse complex trigonometric functions


val arcsin : complex -> complex
val arcsin_real : float -> complex
val arccos : complex -> complex
val arccos_real : float -> complex
val arctan : complex -> complex
val arcsec : complex -> complex
val arcsec_real : float -> complex
val arccsc : complex -> complex
val arccsc_real : float -> complex
val arccot : complex -> complex

Complex hyperbolic functions


val sinh : complex -> complex
val cosh : complex -> complex
val tanh : complex -> complex
val sech : complex -> complex
val csch : complex -> complex
val coth : complex -> complex

Inverse complex hyperbolic functions


val arcsinh : complex -> complex
val arccosh : complex -> complex
val arccosh_real : float -> complex
val arctanh : complex -> complex
val arctanh_real : float -> complex
val arcsech : complex -> complex
val arccsch : complex -> complex
val arccoth : complex -> complex
ocamlgsl-0.6.0/doc/type_Gsl_blas_gen.Complex.html0000664000076400007640000005613310607755602020535 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_gen.Complex sig
  external dotu :
    [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
    = "ml_gsl_blas_zdotu"
  external dotc :
    [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex
    = "ml_gsl_blas_zdotc"
  external nrm2 : [< Gsl_vectmat.cvec ] -> float = "ml_gsl_blas_znrm2"
  external asum : [< Gsl_vectmat.cvec ] -> float = "ml_gsl_blas_zasum"
  external iamax : [< Gsl_vectmat.cvec ] -> int = "ml_gsl_blas_izamax"
  external swap : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zswap"
  external copy : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zcopy"
  external axpy :
    Gsl_complex.complex ->
    [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zaxpy"
  external scal : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zscal"
  external zdscal : float -> [< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zdscal"
  external gemv :
    Gsl_blas_gen.transpose ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    x:[< Gsl_vectmat.cvec ] ->
    beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
  external trmv :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_ztrmv"
  external trsv :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_ztrsv"
  external hemv :
    Gsl_blas_gen.uplo ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    x:[< Gsl_vectmat.cvec ] ->
    beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit
    = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
  external geru :
    alpha:Gsl_complex.complex ->
    x:[< Gsl_vectmat.cvec ] ->
    y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zgeru"
  external gerc :
    alpha:Gsl_complex.complex ->
    x:[< Gsl_vectmat.cvec ] ->
    y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zgerc"
  external her :
    Gsl_blas_gen.uplo ->
    alpha:float -> x:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zher"
  external her2 :
    Gsl_blas_gen.uplo ->
    alpha:Gsl_complex.complex ->
    x:[< Gsl_vectmat.cvec ] ->
    y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zher2"
  external gemm :
    ta:Gsl_blas_gen.transpose ->
    tb:Gsl_blas_gen.transpose ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    b:[< Gsl_vectmat.cmat ] ->
    beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
  external symm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    b:[< Gsl_vectmat.cmat ] ->
    beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
  external syrk :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
  external syr2k :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    b:[< Gsl_vectmat.cmat ] ->
    beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
  external trmm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm"
  external trsm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    Gsl_blas_gen.diag ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm"
  external hemm :
    Gsl_blas_gen.side ->
    Gsl_blas_gen.uplo ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    b:[< Gsl_vectmat.cmat ] ->
    beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
  external herk :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:float ->
    a:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
  external her2k :
    Gsl_blas_gen.uplo ->
    Gsl_blas_gen.transpose ->
    alpha:Gsl_complex.complex ->
    a:[< Gsl_vectmat.cmat ] ->
    b:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit
    = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
end
ocamlgsl-0.6.0/doc/Gsl_stats.html0000664000076400007640000001610210607755606015446 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_stats

Module Gsl_stats


module Gsl_stats: sig .. end
Statistics

val mean : ?w:float array -> float array -> float
val variance : ?w:float array -> ?mean:float -> float array -> float
val sd : ?w:float array -> ?mean:float -> float array -> float
val variance_with_fixed_mean : ?w:float array -> mean:float -> float array -> float
val sd_with_fixed_mean : ?w:float array -> mean:float -> float array -> float
val absdev : ?w:float array -> ?mean:float -> float array -> float
val skew : ?w:float array -> float array -> float
val skew_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float
val kurtosis : ?w:float array -> float array -> float
val kurtosis_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float
val lag1_autocorrelation : mean:float -> float array -> float
val covariance : float array -> float array -> float
val covariance_m : mean1:float -> float array -> mean2:float -> float array -> float
val max : float array -> float
val min : float array -> float
val minmax : float array -> float * float
val max_index : float array -> int
val min_index : float array -> int
val minmax_index : float array -> int * int
val quantile_from_sorted_data : float array -> float -> float
ocamlgsl-0.6.0/doc/Gsl_qrng.html0000664000076400007640000001377510607755604015272 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_qrng

Module Gsl_qrng


module Gsl_qrng: sig .. end
Quasi-Random Sequences


type qrng_type =
| NIEDERREITER_2
| SOBOL
type t 
val make : qrng_type -> int -> t
val init : t -> unit
val get : t -> float array -> unit
val sample : t -> float array
val name : t -> string
val dimension : t -> int
val memcpy : src:t -> dst:t -> unit
val clone : t -> t
ocamlgsl-0.6.0/doc/Gsl_siman.html0000664000076400007640000001644710607755606015433 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_siman

Module Gsl_siman


module Gsl_siman: sig .. end
Simulated Annealing


NB: This module is not interfaced to GSL, it is implemented in OCaml. It is quite simple in fact, so rather than using it you may want to copy the code and tweak the algorithm in your own program.

type params = {
   iters_fixed_T : int; (*The number of iterations at each temperature*)
   step_size : float; (*The maximum step size in the random walk*)
   k : float; (*parameter of the Boltzmann distribution*)
   t_initial : float; (*initial temperature*)
   mu_t : float; (*cooling factor*)
   t_min : float; (*minimum temperature*)
}
val solve : Gsl_rng.t ->
'a ->
energ_func:('a -> float) ->
step_func:(Gsl_rng.t -> 'a -> float -> 'a) ->
?print_func:('a -> unit) -> params -> 'a
ocamlgsl-0.6.0/doc/Gsl_sum.Trunc.html0000664000076400007640000001240610607755605016210 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sum.Trunc

Module Gsl_sum.Trunc


module Trunc: sig .. end

type ws 
val make : int -> ws
val accel : float array -> ws -> Gsl_fun.result

type ws_info = {
   size : int;
   terms_used : int;
   sum_plain : float;
}
val get_info : ws -> ws_info
ocamlgsl-0.6.0/doc/type_Gsl_multimin.Deriv.html0000664000076400007640000001603710607755605020265 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin.Deriv sig
  type kind =
      CONJUGATE_FR
    | CONJUGATE_PR
    | VECTOR_BFGS
    | VECTOR_BFGS2
    | STEEPEST_DESCENT
  type t
  val make :
    Gsl_multimin.Deriv.kind ->
    int ->
    Gsl_fun.multim_fun_fdf ->
    x:Gsl_vector.vector -> step:float -> tol:float -> Gsl_multimin.Deriv.t
  external name : Gsl_multimin.Deriv.t -> string
    = "ml_gsl_multimin_fdfminimizer_name"
  external iterate : Gsl_multimin.Deriv.t -> unit
    = "ml_gsl_multimin_fdfminimizer_iterate"
  external restart : Gsl_multimin.Deriv.t -> unit
    = "ml_gsl_multimin_fdfminimizer_restart"
  external minimum :
    ?x:Gsl_vector.vector ->
    ?dx:Gsl_vector.vector ->
    ?g:Gsl_vector.vector -> Gsl_multimin.Deriv.t -> float
    = "ml_gsl_multimin_fdfminimizer_minimum"
  external test_gradient : Gsl_multimin.Deriv.t -> float -> bool
    = "ml_gsl_multimin_test_gradient"
end
ocamlgsl-0.6.0/doc/Gsl_root.Polish.html0000664000076400007640000001304710607755605016534 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root.Polish

Module Gsl_root.Polish


module Polish: sig .. end


type kind =
| NEWTON
| SECANT
| STEFFENSON
type t 
val make : kind -> Gsl_fun.gsl_fun_fdf -> float -> t
val name : t -> string
val iterate : t -> unit
val root : t -> float
ocamlgsl-0.6.0/doc/Gsl_root.html0000664000076400007640000001177210607755605015302 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root

Module Gsl_root


module Gsl_root: sig .. end
One dimensional Root-Finding

module Bracket: sig .. end
module Polish: sig .. end
val test_interval : lo:float -> up:float -> epsabs:float -> epsrel:float -> bool
val test_delta : x1:float -> x0:float -> epsabs:float -> epsrel:float -> bool
val test_residual : f:float -> epsabs:float -> bool
ocamlgsl-0.6.0/doc/Gsl_blas_gen.html0000664000076400007640000003501610607755602016063 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_gen

Module Gsl_blas_gen


module Gsl_blas_gen: sig .. end

type order = Gsl_blas.order = 
| RowMajor
| ColMajor
type transpose = Gsl_blas.transpose = 
| NoTrans
| Trans
| ConjTrans
type uplo = Gsl_blas.uplo = 
| Upper
| Lower
type diag = Gsl_blas.diag = 
| NonUnit
| Unit
type side = Gsl_blas.side = 
| Left
| Right
val dot : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float
val nrm2 : [< Gsl_vectmat.vec ] -> float
val asum : [< Gsl_vectmat.vec ] -> float
val iamax : [< Gsl_vectmat.vec ] -> int
val swap : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
val copy : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
val axpy : float -> [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit
val rot : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float -> float -> unit
val scal : float -> [< Gsl_vectmat.vec ] -> unit
val gemv : transpose ->
alpha:float ->
a:[< Gsl_vectmat.mat ] ->
x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit
val trmv : uplo ->
transpose ->
diag -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit
val trsv : uplo ->
transpose ->
diag -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit
val symv : uplo ->
alpha:float ->
a:[< Gsl_vectmat.mat ] ->
x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit
val dger : alpha:float ->
x:[< Gsl_vectmat.vec ] ->
y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
val syr : uplo ->
alpha:float -> x:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
val syr2 : uplo ->
alpha:float ->
x:[< Gsl_vectmat.vec ] ->
y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit
val gemm : ta:transpose ->
tb:transpose ->
alpha:float ->
a:[< Gsl_vectmat.mat ] ->
b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
val symm : side ->
uplo ->
alpha:float ->
a:[< Gsl_vectmat.mat ] ->
b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
val trmm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit
val trsm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit
val syrk : uplo ->
transpose ->
alpha:float ->
a:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
val syr2k : uplo ->
transpose ->
alpha:float ->
a:[< Gsl_vectmat.mat ] ->
b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit
module Complex: sig .. end
ocamlgsl-0.6.0/doc/type_Gsl_fft.Halfcomplex.html0000664000076400007640000001643510607755605020401 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Halfcomplex sig
  type wavetable
  val make_wavetable : int -> Gsl_fft.Halfcomplex.wavetable
  external transform :
    ?stride:int ->
    Gsl_fft.fft_array ->
    Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
    = "ml_gsl_fft_halfcomplex_transform"
  external transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
    = "ml_gsl_fft_halfcomplex_radix2_transform"
  external backward :
    ?stride:int ->
    Gsl_fft.fft_array ->
    Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
    = "ml_gsl_fft_halfcomplex_backward"
  external backward_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
    = "ml_gsl_fft_halfcomplex_radix2_backward"
  external inverse :
    ?stride:int ->
    Gsl_fft.fft_array ->
    Gsl_fft.Halfcomplex.wavetable -> Gsl_fft.Real.workspace -> unit
    = "ml_gsl_fft_halfcomplex_inverse"
  external inverse_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
    = "ml_gsl_fft_halfcomplex_radix2_inverse"
  val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
end
ocamlgsl-0.6.0/doc/type_Gsl_vector_complex.Single.html0000664000076400007640000002254410607755576021637 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex.Single sig
  type complex_float_vector_bigarr =
      (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout)
      Bigarray.Array1.t
  type vector = Gsl_vector_complex.Single.complex_float_vector_bigarr
  val create :
    ?init:Gsl_complex.complex -> int -> Gsl_vector_complex.Single.vector
  val of_array :
    Gsl_complex.complex array -> Gsl_vector_complex.Single.vector
  val to_array :
    Gsl_vector_complex.Single.vector -> Gsl_complex.complex array
  val of_complex_array :
    Gsl_complex.complex_array -> Gsl_vector_complex.Single.vector
  val to_complex_array :
    Gsl_vector_complex.Single.vector -> Gsl_complex.complex_array
  val length : Gsl_vector_complex.Single.vector -> int
  val get : Gsl_vector_complex.Single.vector -> int -> Gsl_complex.complex
  val set :
    Gsl_vector_complex.Single.vector -> int -> Gsl_complex.complex -> unit
  val set_all :
    Gsl_vector_complex.Single.vector -> Gsl_complex.complex -> unit
  val set_zero : Gsl_vector_complex.Single.vector -> unit
  val set_basis : Gsl_vector_complex.Single.vector -> int -> unit
  val memcpy :
    src:Gsl_vector_complex.Single.vector ->
    dst:Gsl_vector_complex.Single.vector -> unit
  val copy :
    Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector
  val swap_element : Gsl_vector_complex.Single.vector -> int -> int -> unit
  val reverse : Gsl_vector_complex.Single.vector -> unit
  val subvector :
    Gsl_vector_complex.Single.vector ->
    off:int -> len:int -> Gsl_vector_complex.Single.vector
end
ocamlgsl-0.6.0/doc/type_Gsl_cdf.html0000664000076400007640000011072310607755610016104 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_cdf sig
  external ugaussian_P : x:float -> float = "ml_gsl_cdf_ugaussian_P"
    "gsl_cdf_ugaussian_P" "float"
  external ugaussian_Q : x:float -> float = "ml_gsl_cdf_ugaussian_Q"
    "gsl_cdf_ugaussian_Q" "float"
  external ugaussian_Pinv : p:float -> float = "ml_gsl_cdf_ugaussian_Pinv"
    "gsl_cdf_ugaussian_Pinv" "float"
  external ugaussian_Qinv : q:float -> float = "ml_gsl_cdf_ugaussian_Qinv"
    "gsl_cdf_ugaussian_Qinv" "float"
  external gaussian_P : x:float -> sigma:float -> float
    = "ml_gsl_cdf_gaussian_P" "gsl_cdf_gaussian_P" "float"
  external gaussian_Q : x:float -> sigma:float -> float
    = "ml_gsl_cdf_gaussian_Q" "gsl_cdf_gaussian_Q" "float"
  external gaussian_Pinv : p:float -> sigma:float -> float
    = "ml_gsl_cdf_gaussian_Pinv" "gsl_cdf_gaussian_Pinv" "float"
  external gaussian_Qinv : q:float -> sigma:float -> float
    = "ml_gsl_cdf_gaussian_Qinv" "gsl_cdf_gaussian_Qinv" "float"
  external gamma_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gamma_P" "gsl_cdf_gamma_P" "float"
  external gamma_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gamma_Q" "gsl_cdf_gamma_Q" "float"
  external gamma_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gamma_Pinv" "gsl_cdf_gamma_Pinv" "float"
  external gamma_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gamma_Qinv" "gsl_cdf_gamma_Qinv" "float"
  external cauchy_P : x:float -> a:float -> float = "ml_gsl_cdf_cauchy_P"
    "gsl_cdf_cauchy_P" "float"
  external cauchy_Q : x:float -> a:float -> float = "ml_gsl_cdf_cauchy_Q"
    "gsl_cdf_cauchy_Q" "float"
  external cauchy_Pinv : p:float -> a:float -> float
    = "ml_gsl_cdf_cauchy_Pinv" "gsl_cdf_cauchy_Pinv" "float"
  external cauchy_Qinv : q:float -> a:float -> float
    = "ml_gsl_cdf_cauchy_Qinv" "gsl_cdf_cauchy_Qinv" "float"
  external laplace_P : x:float -> a:float -> float = "ml_gsl_cdf_laplace_P"
    "gsl_cdf_laplace_P" "float"
  external laplace_Q : x:float -> a:float -> float = "ml_gsl_cdf_laplace_Q"
    "gsl_cdf_laplace_Q" "float"
  external laplace_Pinv : p:float -> a:float -> float
    = "ml_gsl_cdf_laplace_Pinv" "gsl_cdf_laplace_Pinv" "float"
  external laplace_Qinv : q:float -> a:float -> float
    = "ml_gsl_cdf_laplace_Qinv" "gsl_cdf_laplace_Qinv" "float"
  external rayleigh_P : x:float -> sigma:float -> float
    = "ml_gsl_cdf_rayleigh_P" "gsl_cdf_rayleigh_P" "float"
  external rayleigh_Q : x:float -> sigma:float -> float
    = "ml_gsl_cdf_rayleigh_Q" "gsl_cdf_rayleigh_Q" "float"
  external rayleigh_Pinv : p:float -> sigma:float -> float
    = "ml_gsl_cdf_rayleigh_Pinv" "gsl_cdf_rayleigh_Pinv" "float"
  external rayleigh_Qinv : q:float -> sigma:float -> float
    = "ml_gsl_cdf_rayleigh_Qinv" "gsl_cdf_rayleigh_Qinv" "float"
  external chisq_P : x:float -> nu:float -> float = "ml_gsl_cdf_chisq_P"
    "gsl_cdf_chisq_P" "float"
  external chisq_Q : x:float -> nu:float -> float = "ml_gsl_cdf_chisq_Q"
    "gsl_cdf_chisq_Q" "float"
  external chisq_Pinv : p:float -> nu:float -> float
    = "ml_gsl_cdf_chisq_Pinv" "gsl_cdf_chisq_Pinv" "float"
  external chisq_Qinv : q:float -> nu:float -> float
    = "ml_gsl_cdf_chisq_Qinv" "gsl_cdf_chisq_Qinv" "float"
  external exponential_P : x:float -> mu:float -> float
    = "ml_gsl_cdf_exponential_P" "gsl_cdf_exponential_P" "float"
  external exponential_Q : x:float -> mu:float -> float
    = "ml_gsl_cdf_exponential_Q" "gsl_cdf_exponential_Q" "float"
  external exponential_Pinv : p:float -> mu:float -> float
    = "ml_gsl_cdf_exponential_Pinv" "gsl_cdf_exponential_Pinv" "float"
  external exponential_Qinv : q:float -> mu:float -> float
    = "ml_gsl_cdf_exponential_Qinv" "gsl_cdf_exponential_Qinv" "float"
  external exppow_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_exppow_P" "gsl_cdf_exppow_P" "float"
  external exppow_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_exppow_Q" "gsl_cdf_exppow_Q" "float"
  external tdist_P : x:float -> nu:float -> float = "ml_gsl_cdf_tdist_P"
    "gsl_cdf_tdist_P" "float"
  external tdist_Q : x:float -> nu:float -> float = "ml_gsl_cdf_tdist_Q"
    "gsl_cdf_tdist_Q" "float"
  external tdist_Pinv : p:float -> nu:float -> float
    = "ml_gsl_cdf_tdist_Pinv" "gsl_cdf_tdist_Pinv" "float"
  external tdist_Qinv : q:float -> nu:float -> float
    = "ml_gsl_cdf_tdist_Qinv" "gsl_cdf_tdist_Qinv" "float"
  external fdist_P : x:float -> nu1:float -> nu2:float -> float
    = "ml_gsl_cdf_fdist_P" "gsl_cdf_fdist_P" "float"
  external fdist_Q : x:float -> nu1:float -> nu2:float -> float
    = "ml_gsl_cdf_fdist_Q" "gsl_cdf_fdist_Q" "float"
  external fdist_Pinv : p:float -> nu1:float -> nu2:float -> float
    = "ml_gsl_cdf_fdist_Pinv" "gsl_cdf_fdist_Pinv" "float"
  external fdist_Qinv : q:float -> nu1:float -> nu2:float -> float
    = "ml_gsl_cdf_fdist_Qinv" "gsl_cdf_fdist_Qinv" "float"
  external beta_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_beta_P" "gsl_cdf_beta_P" "float"
  external beta_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_beta_Q" "gsl_cdf_beta_Q" "float"
  external beta_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_beta_Pinv" "gsl_cdf_beta_Pinv" "float"
  external beta_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_beta_Qinv" "gsl_cdf_beta_Qinv" "float"
  external flat_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_flat_P" "gsl_cdf_flat_P" "float"
  external flat_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_flat_Q" "gsl_cdf_flat_Q" "float"
  external flat_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_flat_Pinv" "gsl_cdf_flat_Pinv" "float"
  external flat_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_flat_Qinv" "gsl_cdf_flat_Qinv" "float"
  external lognormal_P : x:float -> zeta:float -> sigma:float -> float
    = "ml_gsl_cdf_lognormal_P" "gsl_cdf_lognormal_P" "float"
  external lognormal_Q : x:float -> zeta:float -> sigma:float -> float
    = "ml_gsl_cdf_lognormal_Q" "gsl_cdf_lognormal_Q" "float"
  external lognormal_Pinv : p:float -> zeta:float -> sigma:float -> float
    = "ml_gsl_cdf_lognormal_Pinv" "gsl_cdf_lognormal_Pinv" "float"
  external lognormal_Qinv : q:float -> zeta:float -> sigma:float -> float
    = "ml_gsl_cdf_lognormal_Qinv" "gsl_cdf_lognormal_Qinv" "float"
  external gumbel1_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel1_P" "gsl_cdf_gumbel1_P" "float"
  external gumbel1_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel1_Q" "gsl_cdf_gumbel1_Q" "float"
  external gumbel1_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel1_Pinv" "gsl_cdf_gumbel1_Pinv" "float"
  external gumbel1_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel1_Qinv" "gsl_cdf_gumbel1_Qinv" "float"
  external gumbel2_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel2_P" "gsl_cdf_gumbel2_P" "float"
  external gumbel2_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel2_Q" "gsl_cdf_gumbel2_Q" "float"
  external gumbel2_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel2_Pinv" "gsl_cdf_gumbel2_Pinv" "float"
  external gumbel2_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_gumbel2_Qinv" "gsl_cdf_gumbel2_Qinv" "float"
  external weibull_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_weibull_P" "gsl_cdf_weibull_P" "float"
  external weibull_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_weibull_Q" "gsl_cdf_weibull_Q" "float"
  external weibull_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_weibull_Pinv" "gsl_cdf_weibull_Pinv" "float"
  external weibull_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_weibull_Qinv" "gsl_cdf_weibull_Qinv" "float"
  external pareto_P : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_pareto_P" "gsl_cdf_pareto_P" "float"
  external pareto_Q : x:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_pareto_Q" "gsl_cdf_pareto_Q" "float"
  external pareto_Pinv : p:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_pareto_Pinv" "gsl_cdf_pareto_Pinv" "float"
  external pareto_Qinv : q:float -> a:float -> b:float -> float
    = "ml_gsl_cdf_pareto_Qinv" "gsl_cdf_pareto_Qinv" "float"
  external logistic_P : x:float -> a:float -> float = "ml_gsl_cdf_logistic_P"
    "gsl_cdf_logistic_P" "float"
  external logistic_Q : x:float -> a:float -> float = "ml_gsl_cdf_logistic_Q"
    "gsl_cdf_logistic_Q" "float"
  external logistic_Pinv : p:float -> a:float -> float
    = "ml_gsl_cdf_logistic_Pinv" "gsl_cdf_logistic_Pinv" "float"
  external logistic_Qinv : q:float -> a:float -> float
    = "ml_gsl_cdf_logistic_Qinv" "gsl_cdf_logistic_Qinv" "float"
  external binomial_P : k:int -> p:float -> n:int -> float
    = "ml_gsl_cdf_binomial_P"
  external binomial_Q : k:int -> p:float -> n:int -> float
    = "ml_gsl_cdf_binomial_Q"
  external poisson_P : k:int -> mu:float -> float = "ml_gsl_cdf_poisson_P"
  external poisson_Q : k:int -> mu:float -> float = "ml_gsl_cdf_poisson_Q"
  external geometric_P : k:int -> p:float -> float = "ml_gsl_cdf_geometric_P"
  external geometric_Q : k:int -> p:float -> float = "ml_gsl_cdf_geometric_Q"
  external negative_binomial_P : k:int -> p:float -> n:float -> float
    = "ml_gsl_cdf_negative_binomial_P"
  external negative_binomial_Q : k:int -> p:float -> n:float -> float
    = "ml_gsl_cdf_negative_binomial_Q"
  external pascal_P : k:int -> p:float -> n:int -> float
    = "ml_gsl_cdf_pascal_P"
  external pascal_Q : k:int -> p:float -> n:int -> float
    = "ml_gsl_cdf_pascal_Q"
end
ocamlgsl-0.6.0/doc/Gsl_wavelet.html0000664000076400007640000002526510607755606015771 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_wavelet

Module Gsl_wavelet


module Gsl_wavelet: sig .. end
Wavelet Transforms

type t 
type ws 

type kind =
| DAUBECHIES
| DAUBECHIES_CENTERED
| HAAR
| HAAR_CENTERED
| BSPLINE
| BSPLINE_CENTERED

type direction =
| FORWARD
| BACKWARD
val make : kind -> int -> t
val name : t -> string
val workspace_make : int -> ws
val workspace_size : ws -> int

1D transforms


val transform_array : t ->
direction ->
?ws:ws ->
?stride:int -> ?off:int -> ?len:int -> float array -> unit
val transform_forward : t ->
?ws:ws ->
?stride:int -> ?off:int -> ?len:int -> float array -> unit
val transform_inverse : t ->
?ws:ws ->
?stride:int -> ?off:int -> ?len:int -> float array -> unit
val transform_vector_flat : t ->
direction -> ?ws:ws -> Gsl_vector_flat.vector -> unit
val transform_vector : t ->
direction -> ?ws:ws -> Gsl_vector.vector -> unit
val transform_gen : t ->
direction -> ?ws:ws -> [< Gsl_vectmat.vec ] -> unit

2D transforms



type ordering =
| STANDARD
| NON_STANDARD
val transform_matrix_flat : t ->
ordering ->
direction -> ?ws:ws -> Gsl_matrix_flat.matrix -> unit
val transform_matrix : t ->
ordering ->
direction -> ?ws:ws -> Gsl_matrix.matrix -> unit
val transform_matrix_gen : t ->
ordering ->
direction -> ?ws:ws -> [< Gsl_vectmat.mat ] -> unit
ocamlgsl-0.6.0/doc/type_Gsl_matrix.html0000664000076400007640000005573210607755577016700 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix sig
  type double_mat_bigarr =
      (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t
  type matrix = Gsl_matrix.double_mat_bigarr
  val create : ?init:float -> int -> int -> Gsl_matrix.matrix
  val dims : Gsl_matrix.matrix -> int * int
  val of_array : float array -> int -> int -> Gsl_matrix.matrix
  val of_arrays : float array array -> Gsl_matrix.matrix
  val to_array : Gsl_matrix.matrix -> float array
  val to_arrays : Gsl_matrix.matrix -> float array array
  val get : Gsl_matrix.matrix -> int -> int -> float
  val set : Gsl_matrix.matrix -> int -> int -> float -> unit
  val set_all : Gsl_matrix.matrix -> float -> unit
  val set_zero : Gsl_matrix.matrix -> unit
  val set_id : Gsl_matrix.matrix -> unit
  val memcpy : src:Gsl_matrix.matrix -> dst:Gsl_matrix.matrix -> unit
  val copy : Gsl_matrix.matrix -> Gsl_matrix.matrix
  val row : Gsl_matrix.matrix -> int -> Gsl_vector.vector
  external add : Gsl_matrix.matrix -> Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_add"
  external sub : Gsl_matrix.matrix -> Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_sub"
  external mul_elements : Gsl_matrix.matrix -> Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_mul"
  external div_elements : Gsl_matrix.matrix -> Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_div"
  external scale : Gsl_matrix.matrix -> float -> unit = "ml_gsl_matrix_scale"
  external add_constant : Gsl_matrix.matrix -> float -> unit
    = "ml_gsl_matrix_add_constant"
  external add_diagonal : Gsl_matrix.matrix -> float -> unit
    = "ml_gsl_matrix_add_diagonal"
  external is_null : Gsl_matrix.matrix -> bool = "ml_gsl_matrix_isnull"
  external swap_rows : Gsl_matrix.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_rows"
  external swap_columns : Gsl_matrix.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_columns"
  external swap_rowcol : Gsl_matrix.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_rowcol"
  external transpose : Gsl_matrix.matrix -> Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_transpose_memcpy"
  external transpose_in_place : Gsl_matrix.matrix -> unit
    = "ml_gsl_matrix_transpose"
  module Single :
    sig
      type float_mat_bigarr =
          (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t
      type matrix = Gsl_matrix.Single.float_mat_bigarr
      val create : ?init:float -> int -> int -> Gsl_matrix.Single.matrix
      val dims : Gsl_matrix.Single.matrix -> int * int
      val of_array : float array -> int -> int -> Gsl_matrix.Single.matrix
      val of_arrays : float array array -> Gsl_matrix.Single.matrix
      val to_array : Gsl_matrix.Single.matrix -> float array
      val to_arrays : Gsl_matrix.Single.matrix -> float array array
      val get : Gsl_matrix.Single.matrix -> int -> int -> float
      val set : Gsl_matrix.Single.matrix -> int -> int -> float -> unit
      val set_all : Gsl_matrix.Single.matrix -> float -> unit
      val set_zero : Gsl_matrix.Single.matrix -> unit
      val set_id : Gsl_matrix.Single.matrix -> unit
      val memcpy :
        src:Gsl_matrix.Single.matrix -> dst:Gsl_matrix.Single.matrix -> unit
      val copy : Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix
      val row : Gsl_matrix.Single.matrix -> int -> Gsl_vector.Single.vector
      external add :
        Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_add"
      external sub :
        Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_sub"
      external mul_elements :
        Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_mul"
      external div_elements :
        Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_div"
      external scale : Gsl_matrix.Single.matrix -> float -> unit
        = "ml_gsl_matrix_float_scale"
      external add_constant : Gsl_matrix.Single.matrix -> float -> unit
        = "ml_gsl_matrix_float_add_constant"
      external add_diagonal : Gsl_matrix.Single.matrix -> float -> unit
        = "ml_gsl_matrix_float_add_diagonal"
      external is_null : Gsl_matrix.Single.matrix -> bool
        = "ml_gsl_matrix_float_isnull"
      external swap_rows : Gsl_matrix.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_float_swap_rows"
      external swap_columns : Gsl_matrix.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_float_swap_columns"
      external swap_rowcol : Gsl_matrix.Single.matrix -> int -> int -> unit
        = "ml_gsl_matrix_float_swap_rowcol"
      external transpose :
        Gsl_matrix.Single.matrix -> Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_transpose_memcpy"
      external transpose_in_place : Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_matrix_float_transpose"
    end
end
ocamlgsl-0.6.0/doc/type_Gsl_vector_flat.html0000664000076400007640000003020610607755576017670 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_flat sig
  type double_vector_flat = private {
    data : float array;
    off : int;
    len : int;
    stride : int;
  }
  type vector = Gsl_vector_flat.double_vector_flat
  val check : Gsl_vector_flat.vector -> Gsl_vector_flat.vector
  val create : ?init:float -> int -> Gsl_vector_flat.vector
  val of_array : float array -> Gsl_vector_flat.vector
  val to_array : Gsl_vector_flat.vector -> float array
  val length : Gsl_vector_flat.vector -> int
  val get : Gsl_vector_flat.vector -> int -> float
  val set : Gsl_vector_flat.vector -> int -> float -> unit
  val set_all : Gsl_vector_flat.vector -> float -> unit
  val set_zero : Gsl_vector_flat.vector -> unit
  val set_basis : Gsl_vector_flat.vector -> int -> unit
  val memcpy :
    src:Gsl_vector_flat.vector -> dst:Gsl_vector_flat.vector -> unit
  val copy : Gsl_vector_flat.vector -> Gsl_vector_flat.vector
  val swap_element : Gsl_vector_flat.vector -> int -> int -> unit
  val reverse : Gsl_vector_flat.vector -> unit
  external add : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_vector_add"
  external sub : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_vector_sub"
  external mul : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_vector_mul"
  external div : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_vector_div"
  external scale : Gsl_vector_flat.vector -> float -> unit
    = "ml_gsl_vector_scale"
  external add_constant : Gsl_vector_flat.vector -> float -> unit
    = "ml_gsl_vector_add_constant"
  external is_null : Gsl_vector_flat.vector -> bool = "ml_gsl_vector_isnull"
  external max : Gsl_vector_flat.vector -> float = "ml_gsl_vector_max"
  external min : Gsl_vector_flat.vector -> float = "ml_gsl_vector_min"
  external minmax : Gsl_vector_flat.vector -> float * float
    = "ml_gsl_vector_minmax"
  external max_index : Gsl_vector_flat.vector -> int
    = "ml_gsl_vector_maxindex"
  external min_index : Gsl_vector_flat.vector -> int
    = "ml_gsl_vector_minindex"
  external minmax_index : Gsl_vector_flat.vector -> int * int
    = "ml_gsl_vector_minmaxindex"
  val subvector :
    ?stride:int ->
    Gsl_vector_flat.vector -> off:int -> len:int -> Gsl_vector_flat.vector
  val view_array :
    ?stride:int ->
    ?off:int -> ?len:int -> float array -> Gsl_vector_flat.vector
end
ocamlgsl-0.6.0/doc/type_Gsl_sum.html0000664000076400007640000001446610607755605016167 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sum sig
  type ws
  val make : int -> Gsl_sum.ws
  external accel : float array -> Gsl_sum.ws -> Gsl_fun.result
    = "ml_gsl_sum_levin_u_accel"
  type ws_info = { size : int; terms_used : int; sum_plain : float; }
  external get_info : Gsl_sum.ws -> Gsl_sum.ws_info
    = "ml_gsl_sum_levin_u_getinfo"
  module Trunc :
    sig
      type ws
      val make : int -> Gsl_sum.Trunc.ws
      external accel : float array -> Gsl_sum.Trunc.ws -> Gsl_fun.result
        = "ml_gsl_sum_levin_utrunc_accel"
      type ws_info = { size : int; terms_used : int; sum_plain : float; }
      external get_info : Gsl_sum.Trunc.ws -> Gsl_sum.Trunc.ws_info
        = "ml_gsl_sum_levin_utrunc_getinfo"
    end
end
ocamlgsl-0.6.0/doc/type_Gsl_multiroot.NoDeriv.html0000664000076400007640000001637610607755605020770 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot.NoDeriv sig
  type kind = HYBRIDS | HYBRID | DNEWTON | BROYDEN
  type t
  val make :
    Gsl_multiroot.NoDeriv.kind ->
    int -> Gsl_fun.multi_fun -> Gsl_vector.vector -> Gsl_multiroot.NoDeriv.t
  external name : Gsl_multiroot.NoDeriv.t -> string
    = "ml_gsl_multiroot_fsolver_name"
  external iterate : Gsl_multiroot.NoDeriv.t -> unit
    = "ml_gsl_multiroot_fsolver_iterate"
  external root : Gsl_multiroot.NoDeriv.t -> Gsl_vector.vector -> unit
    = "ml_gsl_multiroot_fsolver_root"
  external get_state :
    Gsl_multiroot.NoDeriv.t ->
    ?x:Gsl_vector.vector ->
    ?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit
    = "ml_gsl_multiroot_fsolver_get_state"
  external test_delta :
    Gsl_multiroot.NoDeriv.t -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_multiroot_test_delta_f"
  external test_residual : Gsl_multiroot.NoDeriv.t -> epsabs:float -> bool
    = "ml_gsl_multiroot_test_residual_f"
end
ocamlgsl-0.6.0/doc/type_Gsl_ieee.html0000664000076400007640000002051210607755576016266 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_ieee sig
  type ieee_type = NAN | INF | NORMAL | DENORMAL | ZERO
  type float_rep = {
    sign : int;
    mantissa : string;
    exponent : int;
    ieee_type : Gsl_ieee.ieee_type;
  }
  external rep_of_float : float -> Gsl_ieee.float_rep
    = "ml_gsl_ieee_double_to_rep"
  val print : float -> string
  type precision = SINGLE | DOUBLE | EXTENDED
  type rounding = TO_NEAREST | DOWN | UP | TO_ZERO
  type exceptions =
      MASK_INVALID
    | MASK_DENORMALIZED
    | MASK_DIVISION_BY_ZERO
    | MASK_OVERFLOW
    | MASK_UNDERFLOW
    | MASK_ALL
    | TRAP_INEXACT
  external set_mode :
    ?precision:Gsl_ieee.precision ->
    ?rounding:Gsl_ieee.rounding -> Gsl_ieee.exceptions list -> unit
    = "ml_gsl_ieee_set_mode"
  external env_setup : unit -> unit = "ml_gsl_ieee_env_setup"
  type excepts =
      FE_INEXACT
    | FE_DIVBYZERO
    | FE_UNDERFLOW
    | FE_OVERFLOW
    | FE_INVALID
    | FE_ALL_EXCEPT
  external clear_except : Gsl_ieee.excepts list -> unit = "ml_feclearexcept"
  external test_except : Gsl_ieee.excepts list -> Gsl_ieee.excepts list
    = "ml_fetestexcept"
end
ocamlgsl-0.6.0/doc/Gsl_sum.html0000664000076400007640000001307010607755605015114 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_sum

Module Gsl_sum


module Gsl_sum: sig .. end
Series Acceleration

type ws 
val make : int -> ws
val accel : float array -> ws -> Gsl_fun.result

type ws_info = {
   size : int;
   terms_used : int;
   sum_plain : float;
}
val get_info : ws -> ws_info
module Trunc: sig .. end
ocamlgsl-0.6.0/doc/type_Gsl_fun.html0000664000076400007640000001673610607755603016153 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fun sig
  type result = { res : float; err : float; }
  type result_e10 = { res_e10 : float; err_e10 : float; e10 : int; }
  type mode = DOUBLE | SIMPLE | APPROX
  external smash : Gsl_fun.result_e10 -> Gsl_fun.result
    = "ml_gsl_sf_result_smash_e"
  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
  type multi_fun = x:Gsl_vector.vector -> f:Gsl_vector.vector -> unit
  type multi_fun_fdf = {
    multi_f : x:Gsl_vector.vector -> f:Gsl_vector.vector -> unit;
    multi_df : x:Gsl_vector.vector -> j:Gsl_matrix.matrix -> unit;
    multi_fdf :
      x:Gsl_vector.vector ->
      f:Gsl_vector.vector -> j:Gsl_matrix.matrix -> unit;
  }
  type multim_fun = x:Gsl_vector.vector -> float
  type multim_fun_fdf = {
    multim_f : x:Gsl_vector.vector -> float;
    multim_df : x:Gsl_vector.vector -> g:Gsl_vector.vector -> unit;
    multim_fdf : x:Gsl_vector.vector -> g:Gsl_vector.vector -> float;
  }
end
ocamlgsl-0.6.0/doc/Gsl_fit.html0000664000076400007640000001556110607755604015100 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fit

Module Gsl_fit


module Gsl_fit: sig .. end
Least-Squares Fitting


type linear_fit_coeffs = {
   c0 : float;
   c1 : float;
   cov00 : float;
   cov01 : float;
   cov11 : float;
   sumsq : float;
}
val linear : ?weight:float array ->
float array -> float array -> linear_fit_coeffs
val linear_est : float -> coeffs:linear_fit_coeffs -> Gsl_fun.result

type mul_fit_coeffs = {
   m_c1 : float;
   m_cov11 : float;
   m_sumsq : float;
}
val mul : ?weight:float array -> float array -> float array -> mul_fit_coeffs
val mul_est : float -> coeffs:mul_fit_coeffs -> Gsl_fun.result
ocamlgsl-0.6.0/doc/type_Gsl_matrix_flat.html0000664000076400007640000003550310607755577017700 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_flat sig
  type double_mat_flat = private {
    data : float array;
    off : int;
    dim1 : int;
    dim2 : int;
    tda : int;
  }
  type matrix = Gsl_matrix_flat.double_mat_flat
  val create : ?init:float -> int -> int -> Gsl_matrix_flat.matrix
  val dims : Gsl_matrix_flat.matrix -> int * int
  val of_array : float array -> int -> int -> Gsl_matrix_flat.matrix
  val of_arrays : float array array -> Gsl_matrix_flat.matrix
  val to_array : matrix -> float array
  val to_arrays : Gsl_matrix_flat.matrix -> float array array
  val to_array : Gsl_matrix_flat.matrix -> float array
  val get : Gsl_matrix_flat.matrix -> int -> int -> float
  val set : Gsl_matrix_flat.matrix -> int -> int -> float -> unit
  val set_all : Gsl_matrix_flat.matrix -> float -> unit
  val set_zero : Gsl_matrix_flat.matrix -> unit
  val set_id : Gsl_matrix_flat.matrix -> unit
  val memcpy :
    src:Gsl_matrix_flat.matrix -> dst:Gsl_matrix_flat.matrix -> unit
  val copy : Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix
  external add : Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_add"
  external sub : Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_sub"
  external mul_elements :
    Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_mul"
  external div_elements :
    Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_div"
  external scale : Gsl_matrix_flat.matrix -> float -> unit
    = "ml_gsl_matrix_scale"
  external add_constant : Gsl_matrix_flat.matrix -> float -> unit
    = "ml_gsl_matrix_add_constant"
  external add_diagonal : Gsl_matrix_flat.matrix -> float -> unit
    = "ml_gsl_matrix_add_diagonal"
  external is_null : Gsl_matrix_flat.matrix -> bool = "ml_gsl_matrix_isnull"
  external swap_rows : Gsl_matrix_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_rows"
  external swap_columns : Gsl_matrix_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_columns"
  external swap_rowcol : Gsl_matrix_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_swap_rowcol"
  external transpose :
    Gsl_matrix_flat.matrix -> Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_transpose_memcpy"
  external transpose_in_place : Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_matrix_transpose"
  val submatrix :
    Gsl_matrix_flat.matrix ->
    k1:int -> k2:int -> n1:int -> n2:int -> Gsl_matrix_flat.matrix
  val row : Gsl_matrix_flat.matrix -> int -> Gsl_vector_flat.vector
  val column : Gsl_matrix_flat.matrix -> int -> Gsl_vector_flat.vector
  val diagonal : Gsl_matrix_flat.matrix -> Gsl_vector_flat.vector
  val subdiagonal : Gsl_matrix_flat.matrix -> int -> Gsl_vector_flat.vector
  val superdiagonal : Gsl_matrix_flat.matrix -> int -> Gsl_vector_flat.vector
  val view_array :
    float array ->
    ?off:int -> int -> ?tda:int -> int -> Gsl_matrix_flat.matrix
  val view_vector :
    Gsl_vector_flat.vector ->
    ?off:int -> int -> ?tda:int -> int -> Gsl_matrix_flat.matrix
end
ocamlgsl-0.6.0/doc/type_Gsl_blas.html0000664000076400007640000025344610607755601016303 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas sig
  type order = RowMajor | ColMajor
  type transpose = NoTrans | Trans | ConjTrans
  type uplo = Upper | Lower
  type diag = NonUnit | Unit
  type side = Left | Right
  external dot : Gsl_vector.vector -> Gsl_vector.vector -> float
    = "ml_gsl_blas_ddot"
  external nrm2 : Gsl_vector.vector -> float = "ml_gsl_blas_dnrm2"
  external asum : Gsl_vector.vector -> float = "ml_gsl_blas_dasum"
  external iamax : Gsl_vector.vector -> int = "ml_gsl_blas_idamax"
  external swap : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_blas_dswap"
  external copy : Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_blas_dcopy"
  external axpy : float -> Gsl_vector.vector -> Gsl_vector.vector -> unit
    = "ml_gsl_blas_daxpy"
  external rot :
    Gsl_vector.vector -> Gsl_vector.vector -> float -> float -> unit
    = "ml_gsl_blas_drot"
  external scal : float -> Gsl_vector.vector -> unit = "ml_gsl_blas_dscal"
  external gemv :
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.matrix ->
    x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit
    = "ml_gsl_blas_dgemv_bc" "ml_gsl_blas_dgemv"
  external trmv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit
    = "ml_gsl_blas_dtrmv"
  external trsv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit
    = "ml_gsl_blas_dtrsv"
  external symv :
    Gsl_blas.uplo ->
    alpha:float ->
    a:Gsl_matrix.matrix ->
    x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit
    = "ml_gsl_blas_dsymv_bc" "ml_gsl_blas_dsymv"
  external dger :
    alpha:float ->
    x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dger"
  external syr :
    Gsl_blas.uplo ->
    alpha:float -> x:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dsyr"
  external syr2 :
    Gsl_blas.uplo ->
    alpha:float ->
    x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dsyr2"
  external gemm :
    ta:Gsl_blas.transpose ->
    tb:Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.matrix ->
    b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dgemm_bc" "ml_gsl_blas_dgemm"
  external symm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:float ->
    a:Gsl_matrix.matrix ->
    b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dsymm_bc" "ml_gsl_blas_dsymm"
  external trmm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm"
  external trsm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm"
  external syrk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dsyrk_bc" "ml_gsl_blas_dsyrk"
  external syr2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix.matrix ->
    b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
    = "ml_gsl_blas_dsyr2k_bc" "ml_gsl_blas_dsyr2k"
  module Single :
    sig
      external sdsdot :
        alpha:float ->
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
        = "ml_gsl_blas_sdsdot"
      external dsdot :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
        = "ml_gsl_blas_dsdot"
      external dot :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float
        = "ml_gsl_blas_sdot"
      external nrm2 : Gsl_vector.Single.vector -> float = "ml_gsl_blas_snrm2"
      external asum : Gsl_vector.Single.vector -> float = "ml_gsl_blas_sasum"
      external iamax : Gsl_vector.Single.vector -> int = "ml_gsl_blas_isamax"
      external swap :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_sswap"
      external copy :
        Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_scopy"
      external axpy :
        float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_saxpy"
      external rot :
        Gsl_vector.Single.vector ->
        Gsl_vector.Single.vector -> float -> float -> unit
        = "ml_gsl_blas_srot"
      external scal : float -> Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_sscal"
      external gemv :
        Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        x:Gsl_vector.Single.vector ->
        beta:float -> y:Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_sgemv_bc" "ml_gsl_blas_sgemv"
      external trmv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_strmv"
      external trsv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_strsv"
      external symv :
        Gsl_blas.uplo ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        x:Gsl_vector.Single.vector ->
        beta:float -> y:Gsl_vector.Single.vector -> unit
        = "ml_gsl_blas_ssymv_bc" "ml_gsl_blas_ssymv"
      external dger :
        alpha:float ->
        x:Gsl_vector.Single.vector ->
        y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_sger"
      external syr :
        Gsl_blas.uplo ->
        alpha:float ->
        x:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_ssyr"
      external syr2 :
        Gsl_blas.uplo ->
        alpha:float ->
        x:Gsl_vector.Single.vector ->
        y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_ssyr2"
      external gemm :
        ta:Gsl_blas.transpose ->
        tb:Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        b:Gsl_matrix.Single.matrix ->
        beta:float -> c:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_sgemm_bc" "ml_gsl_blas_sgemm"
      external symm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        b:Gsl_matrix.Single.matrix ->
        beta:float -> c:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_ssymm_bc" "ml_gsl_blas_ssymm"
      external syrk :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        beta:float -> c:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_ssyrk_bc" "ml_gsl_blas_ssyrk"
      external syr2k :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix ->
        b:Gsl_matrix.Single.matrix ->
        beta:float -> c:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_ssyr2k_bc" "ml_gsl_blas_ssyr2k"
      external trmm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_strmm_bc" "ml_gsl_blas_strmm"
      external trsm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:float ->
        a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit
        = "ml_gsl_blas_strsm_bc" "ml_gsl_blas_strsm"
    end
  module Complex :
    sig
      external dotu :
        Gsl_vector_complex.vector ->
        Gsl_vector_complex.vector -> Gsl_complex.complex
        = "ml_gsl_blas_zdotu"
      external dotc :
        Gsl_vector_complex.vector ->
        Gsl_vector_complex.vector -> Gsl_complex.complex
        = "ml_gsl_blas_zdotc"
      external nrm2 : Gsl_vector_complex.vector -> float
        = "ml_gsl_blas_znrm2"
      external asum : Gsl_vector_complex.vector -> float
        = "ml_gsl_blas_zasum"
      external iamax : Gsl_vector_complex.vector -> int
        = "ml_gsl_blas_izamax"
      external swap :
        Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zswap"
      external copy :
        Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zcopy"
      external axpy :
        Gsl_complex.complex ->
        Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zaxpy"
      external scal :
        Gsl_complex.complex -> Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zscal"
      external zdscal : float -> Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zdscal"
      external gemv :
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        x:Gsl_vector_complex.vector ->
        beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
      external trmv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_ztrmv"
      external trsv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_ztrsv"
      external hemv :
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        x:Gsl_vector_complex.vector ->
        beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
        = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
      external geru :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.vector ->
        y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zgeru"
      external gerc :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.vector ->
        y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zgerc"
      external her :
        Gsl_blas.uplo ->
        alpha:float ->
        x:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zher"
      external her2 :
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.vector ->
        y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zher2"
      external gemm :
        ta:Gsl_blas.transpose ->
        tb:Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        b:Gsl_matrix_complex.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
      external symm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        b:Gsl_matrix_complex.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
      external syrk :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
      external syr2k :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        b:Gsl_matrix_complex.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
      external trmm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm"
      external trsm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm"
      external hemm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        b:Gsl_matrix_complex.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
      external herk :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix_complex.matrix ->
        beta:float -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
      external her2k :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.matrix ->
        b:Gsl_matrix_complex.matrix ->
        beta:float -> c:Gsl_matrix_complex.matrix -> unit
        = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
    end
  module Complex_Single :
    sig
      external dotu :
        Gsl_vector_complex.Single.vector ->
        Gsl_vector_complex.Single.vector -> Gsl_complex.complex
        = "ml_gsl_blas_cdotu"
      external dotc :
        Gsl_vector_complex.Single.vector ->
        Gsl_vector_complex.Single.vector -> Gsl_complex.complex
        = "ml_gsl_blas_cdotc"
      external nrm2 : Gsl_vector_complex.Single.vector -> float
        = "ml_gsl_blas_scnrm2"
      external asum : Gsl_vector_complex.Single.vector -> float
        = "ml_gsl_blas_scasum"
      external iamax : Gsl_vector_complex.Single.vector -> int
        = "ml_gsl_blas_icamax"
      external swap :
        Gsl_vector_complex.Single.vector ->
        Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_cswap"
      external copy :
        Gsl_vector_complex.Single.vector ->
        Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ccopy"
      external axpy :
        Gsl_complex.complex ->
        Gsl_vector_complex.Single.vector ->
        Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_caxpy"
      external scal :
        Gsl_complex.complex -> Gsl_vector_complex.Single.vector -> unit
        = "ml_gsl_blas_cscal"
      external csscal : float -> Gsl_vector_complex.Single.vector -> unit
        = "ml_gsl_blas_csscal"
      external gemv :
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        x:Gsl_vector_complex.Single.vector ->
        beta:Gsl_complex.complex ->
        y:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_cgemv_bc"
        "ml_gsl_blas_cgemv"
      external trmv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix_complex.Single.matrix ->
        x:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ctrmv"
      external trsv :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        a:Gsl_matrix_complex.Single.matrix ->
        x:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ctrsv"
      external hemv :
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        x:Gsl_vector_complex.Single.vector ->
        beta:Gsl_complex.complex ->
        y:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_chemv_bc"
        "ml_gsl_blas_chemv"
      external geru :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.Single.vector ->
        y:Gsl_vector_complex.Single.vector ->
        a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cgeru"
      external gerc :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.Single.vector ->
        y:Gsl_vector_complex.Single.vector ->
        a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cgerc"
      external her :
        Gsl_blas.uplo ->
        alpha:float ->
        x:Gsl_vector_complex.Single.vector ->
        a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cher"
      external her2 :
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex.Single.vector ->
        y:Gsl_vector_complex.Single.vector ->
        a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cher2"
      external gemm :
        ta:Gsl_blas.transpose ->
        tb:Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix ->
        beta:Gsl_complex.complex ->
        c:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cgemm_bc"
        "ml_gsl_blas_cgemm"
      external symm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix ->
        beta:Gsl_complex.complex ->
        c:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_csymm_bc"
        "ml_gsl_blas_csymm"
      external syrk :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        beta:Gsl_complex.complex ->
        c:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_csyrk_bc"
        "ml_gsl_blas_csyrk"
      external syr2k :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix ->
        beta:Gsl_complex.complex ->
        c:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_csyr2k_bc"
        "ml_gsl_blas_csyr2k"
      external trmm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_ctrmm_bc"
        "ml_gsl_blas_ctrmm"
      external trsm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        Gsl_blas.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_ctrsm_bc"
        "ml_gsl_blas_ctrsm"
      external hemm :
        Gsl_blas.side ->
        Gsl_blas.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix ->
        beta:Gsl_complex.complex ->
        c:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_chemm_bc"
        "ml_gsl_blas_chemm"
      external herk :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:float ->
        a:Gsl_matrix_complex.Single.matrix ->
        beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_blas_cherk_bc" "ml_gsl_blas_cherk"
      external her2k :
        Gsl_blas.uplo ->
        Gsl_blas.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex.Single.matrix ->
        b:Gsl_matrix_complex.Single.matrix ->
        beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
        = "ml_gsl_blas_cher2k_bc" "ml_gsl_blas_cher2k"
    end
end
ocamlgsl-0.6.0/doc/Gsl_vector_complex_flat.html0000664000076400007640000002356010607755577020364 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex_flat

Module Gsl_vector_complex_flat


module Gsl_vector_complex_flat: sig .. end
Vector of complex numbers implemented with a float array


type complex_vector_flat = private {
   data : float array;
   off : int;
   len : int;
   stride : int;
}
type vector = complex_vector_flat 

Operations


val create : ?init:Gsl_complex.complex -> int -> vector
val of_array : Gsl_complex.complex array -> vector
val to_array : vector -> Gsl_complex.complex array
val of_complex_array : Gsl_complex.complex_array -> vector
val to_complex_array : vector -> Gsl_complex.complex_array
val length : vector -> int
val get : vector -> int -> Gsl_complex.complex
val set : vector -> int -> Gsl_complex.complex -> unit
val set_all : vector -> Gsl_complex.complex -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : vector -> vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit

No-copy operations


val subvector : ?stride:int ->
vector ->
off:int -> len:int -> vector
val view_complex_array : ?stride:int ->
?off:int ->
?len:int -> Gsl_complex.complex_array -> vector
val real : vector -> Gsl_vector_flat.vector
val imag : vector -> Gsl_vector_flat.vector
ocamlgsl-0.6.0/doc/Gsl_matrix_complex.html0000664000076400007640000002623710607755577017364 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex

Module Gsl_matrix_complex


module Gsl_matrix_complex: sig .. end
Matrices of complex numbers implemented with Bigarray

type complex_mat_bigarr = (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout) Bigarray.Array2.t 
type matrix = complex_mat_bigarr 
val create : ?init:Gsl_complex.complex -> int -> int -> matrix
val dims : matrix -> int * int
val of_array : Gsl_complex.complex array -> int -> int -> matrix
val of_arrays : Gsl_complex.complex array array -> matrix
val to_array : matrix -> Gsl_complex.complex array
val to_arrays : matrix -> Gsl_complex.complex array array
val of_complex_array : Gsl_complex.complex_array -> int -> int -> matrix
val to_complex_array : matrix -> Gsl_complex.complex_array
val get : matrix -> int -> int -> Gsl_complex.complex
val set : matrix -> int -> int -> Gsl_complex.complex -> unit
val set_all : matrix -> Gsl_complex.complex -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix -> dst:matrix -> unit
val copy : matrix -> matrix
val row : matrix -> int -> Gsl_vector_complex.vector
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> Gsl_complex.complex -> unit
val add_constant : matrix -> Gsl_complex.complex -> unit
val add_diagonal : matrix -> Gsl_complex.complex -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
module Single: sig .. end
ocamlgsl-0.6.0/doc/Gsl_blas.Complex_Single.html0000664000076400007640000004143010607755600020134 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Complex_Single

Module Gsl_blas.Complex_Single


module Complex_Single: sig .. end


LEVEL 1


val dotu : Gsl_vector_complex.Single.vector ->
Gsl_vector_complex.Single.vector -> Gsl_complex.complex
val dotc : Gsl_vector_complex.Single.vector ->
Gsl_vector_complex.Single.vector -> Gsl_complex.complex
val nrm2 : Gsl_vector_complex.Single.vector -> float
val asum : Gsl_vector_complex.Single.vector -> float
val iamax : Gsl_vector_complex.Single.vector -> int
val swap : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit
val copy : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit
val axpy : Gsl_complex.complex ->
Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit
val scal : Gsl_complex.complex -> Gsl_vector_complex.Single.vector -> unit
val csscal : float -> Gsl_vector_complex.Single.vector -> unit

LEVEL 2


val gemv : Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
x:Gsl_vector_complex.Single.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit
val trmv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix_complex.Single.matrix ->
x:Gsl_vector_complex.Single.vector -> unit
val trsv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix_complex.Single.matrix ->
x:Gsl_vector_complex.Single.vector -> unit
val hemv : Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
x:Gsl_vector_complex.Single.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit
val geru : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.Single.vector ->
y:Gsl_vector_complex.Single.vector ->
a:Gsl_matrix_complex.Single.matrix -> unit
val gerc : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.Single.vector ->
y:Gsl_vector_complex.Single.vector ->
a:Gsl_matrix_complex.Single.matrix -> unit
val her : Gsl_blas.uplo ->
alpha:float ->
x:Gsl_vector_complex.Single.vector ->
a:Gsl_matrix_complex.Single.matrix -> unit
val her2 : Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.Single.vector ->
y:Gsl_vector_complex.Single.vector ->
a:Gsl_matrix_complex.Single.matrix -> unit

LEVEL 3


val gemm : ta:Gsl_blas.transpose ->
tb:Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
val symm : Gsl_blas.side ->
Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
val syrk : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
val syr2k : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
val trmm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix -> unit
val trsm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix -> unit
val hemm : Gsl_blas.side ->
Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
val herk : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix_complex.Single.matrix ->
beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
val her2k : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.Single.matrix ->
b:Gsl_matrix_complex.Single.matrix ->
beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
ocamlgsl-0.6.0/doc/Gsl_multifit.html0000664000076400007640000001463110607755604016150 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multifit

Module Gsl_multifit


module Gsl_multifit: sig .. end
Multi-parameter Least-Squares Fitting

type ws 
val make : n:int -> p:int -> ws
val _linear : ?weight:Gsl_vectmat.vec ->
x:Gsl_vectmat.mat ->
y:Gsl_vectmat.vec ->
c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> ws -> float
val _linear_svd : ?weight:Gsl_vectmat.vec ->
x:Gsl_vectmat.mat ->
y:Gsl_vectmat.vec ->
tol:float ->
c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> ws -> int * float
val linear : ?weight:Gsl_vectmat.vec ->
Gsl_vectmat.mat ->
Gsl_vectmat.vec -> Gsl_vector.vector * Gsl_matrix.matrix * float
val linear_est : x:Gsl_vectmat.vec ->
c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> Gsl_fun.result
val fit_poly : ?weight:float array ->
x:float array ->
y:float array -> int -> float array * float array array * float
ocamlgsl-0.6.0/doc/type_Gsl_matrix_complex_flat.html0000664000076400007640000004121410607755600021406 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_complex_flat sig
  type complex_mat_flat = private {
    data : float array;
    off : int;
    dim1 : int;
    dim2 : int;
    tda : int;
  }
  type matrix = Gsl_matrix_complex_flat.complex_mat_flat
  val create :
    ?init:Gsl_complex.complex -> int -> int -> Gsl_matrix_complex_flat.matrix
  val dims : Gsl_matrix_complex_flat.matrix -> int * int
  val of_arrays :
    Gsl_complex.complex array array -> Gsl_matrix_complex_flat.matrix
  val of_array :
    Gsl_complex.complex array -> int -> int -> Gsl_matrix_complex_flat.matrix
  val to_arrays :
    Gsl_matrix_complex_flat.matrix -> Gsl_complex.complex array array
  val to_array : Gsl_matrix_complex_flat.matrix -> Gsl_complex.complex array
  val of_complex_array :
    float array -> int -> int -> Gsl_matrix_complex_flat.matrix
  val to_complex_array :
    Gsl_matrix_complex_flat.matrix -> Gsl_complex.complex_array
  val get :
    Gsl_matrix_complex_flat.matrix -> int -> int -> Gsl_complex.complex
  val set :
    Gsl_matrix_complex_flat.matrix ->
    int -> int -> Gsl_complex.complex -> unit
  val set_all : Gsl_matrix_complex_flat.matrix -> Gsl_complex.complex -> unit
  val set_zero : Gsl_matrix_complex_flat.matrix -> unit
  val set_id : Gsl_matrix_complex_flat.matrix -> unit
  val memcpy :
    src:Gsl_matrix_complex_flat.matrix ->
    dst:Gsl_matrix_complex_flat.matrix -> unit
  val copy : Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix
  external add :
    Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_add"
  external sub :
    Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_sub"
  external mul_elements :
    Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_mul"
  external div_elements :
    Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_div"
  external scale : Gsl_matrix_complex_flat.matrix -> float -> unit
    = "ml_gsl_matrix_complex_scale"
  external add_constant : Gsl_matrix_complex_flat.matrix -> float -> unit
    = "ml_gsl_matrix_complex_add_constant"
  external add_diagonal :
    Gsl_matrix_complex_flat.matrix -> Gsl_complex.complex -> unit
    = "ml_gsl_matrix_complex_add_diagonal"
  external is_null : Gsl_matrix_complex_flat.matrix -> bool
    = "ml_gsl_matrix_complex_isnull"
  external swap_rows : Gsl_matrix_complex_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_rows"
  external swap_columns :
    Gsl_matrix_complex_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_columns"
  external swap_rowcol : Gsl_matrix_complex_flat.matrix -> int -> int -> unit
    = "ml_gsl_matrix_complex_swap_rowcol"
  external transpose :
    Gsl_matrix_complex_flat.matrix -> Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_transpose_memcpy"
  external transpose_in_place : Gsl_matrix_complex_flat.matrix -> unit
    = "ml_gsl_matrix_complex_transpose"
  val submatrix :
    Gsl_matrix_complex_flat.matrix ->
    k1:int -> k2:int -> n1:int -> n2:int -> Gsl_matrix_complex_flat.matrix
  val row :
    Gsl_matrix_complex_flat.matrix -> int -> Gsl_vector_complex_flat.vector
  val column :
    Gsl_matrix_complex_flat.matrix -> int -> Gsl_vector_complex_flat.vector
  val diagonal :
    Gsl_matrix_complex_flat.matrix -> Gsl_vector_complex_flat.vector
  val subdiagonal :
    Gsl_matrix_complex_flat.matrix -> int -> Gsl_vector_complex_flat.vector
  val superdiagonal :
    Gsl_matrix_complex_flat.matrix -> int -> Gsl_vector_complex_flat.vector
  val view_complex_array :
    Gsl_complex.complex_array ->
    ?off:int -> int -> ?tda:int -> int -> Gsl_matrix_complex_flat.matrix
  val view_vector :
    Gsl_vector_complex_flat.vector ->
    ?off:int -> int -> ?tda:int -> int -> Gsl_matrix_complex_flat.matrix
end
ocamlgsl-0.6.0/doc/Gsl_blas_flat.Complex.html0000664000076400007640000004057710607755601017655 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_flat.Complex

Module Gsl_blas_flat.Complex


module Complex: sig .. end

val dotu : Gsl_vector_complex_flat.vector ->
Gsl_vector_complex_flat.vector -> Gsl_complex.complex
val dotc : Gsl_vector_complex_flat.vector ->
Gsl_vector_complex_flat.vector -> Gsl_complex.complex
val nrm2 : Gsl_vector_complex_flat.vector -> float
val asum : Gsl_vector_complex_flat.vector -> float
val iamax : Gsl_vector_complex_flat.vector -> int
val swap : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
val copy : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
val axpy : Gsl_complex.complex ->
Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit
val scal : Gsl_complex.complex -> Gsl_vector_complex_flat.vector -> unit
val zdscal : float -> Gsl_vector_complex_flat.vector -> unit
val gemv : Gsl_blas_flat.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
x:Gsl_vector_complex_flat.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
val trmv : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
Gsl_blas_flat.diag ->
a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> unit
val trsv : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
Gsl_blas_flat.diag ->
a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> unit
val hemv : Gsl_blas_flat.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
x:Gsl_vector_complex_flat.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
val geru : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex_flat.vector ->
y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit
val gerc : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex_flat.vector ->
y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit
val her : Gsl_blas_flat.uplo ->
alpha:float ->
x:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit
val her2 : Gsl_blas_flat.uplo ->
alpha:Gsl_complex.complex ->
x:Gsl_vector_complex_flat.vector ->
y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit
val gemm : ta:Gsl_blas_flat.transpose ->
tb:Gsl_blas_flat.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
b:Gsl_matrix_complex_flat.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
val symm : Gsl_blas_flat.side ->
Gsl_blas_flat.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
b:Gsl_matrix_complex_flat.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
val syrk : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
val syr2k : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
b:Gsl_matrix_complex_flat.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
val trmm : Gsl_blas_flat.side ->
Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
Gsl_blas_flat.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> unit
val trsm : Gsl_blas_flat.side ->
Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
Gsl_blas_flat.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> unit
val hemm : Gsl_blas_flat.side ->
Gsl_blas_flat.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
b:Gsl_matrix_complex_flat.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
val herk : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
alpha:float ->
a:Gsl_matrix_complex_flat.matrix ->
beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
val her2k : Gsl_blas_flat.uplo ->
Gsl_blas_flat.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex_flat.matrix ->
b:Gsl_matrix_complex_flat.matrix ->
beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
ocamlgsl-0.6.0/doc/type_Gsl_root.Bracket.html0000664000076400007640000001327410607755605017714 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root.Bracket sig
  type kind = BISECTION | FALSEPOS | BRENT
  type t
  val make :
    Gsl_root.Bracket.kind ->
    Gsl_fun.gsl_fun -> float -> float -> Gsl_root.Bracket.t
  external name : Gsl_root.Bracket.t -> string = "ml_gsl_root_fsolver_name"
  external iterate : Gsl_root.Bracket.t -> unit
    = "ml_gsl_root_fsolver_iterate"
  external root : Gsl_root.Bracket.t -> float = "ml_gsl_root_fsolver_root"
  external interval : Gsl_root.Bracket.t -> float * float
    = "ml_gsl_root_fsolver_x_interv"
end
ocamlgsl-0.6.0/doc/Gsl_matrix_flat.html0000664000076400007640000003046410607755577016640 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_matrix_flat

Module Gsl_matrix_flat


module Gsl_matrix_flat: sig .. end
Matrices of floats implemented with float array


type double_mat_flat = private {
   data : float array;
   off : int;
   dim1 : int;
   dim2 : int;
   tda : int;
}
type matrix = double_mat_flat 
val create : ?init:float -> int -> int -> matrix
val dims : matrix -> int * int
val of_array : float array -> int -> int -> matrix
val of_arrays : float array array -> matrix
val to_array : matrix -> float array
val to_arrays : matrix -> float array array
val to_array : matrix -> float array
val get : matrix -> int -> int -> float
val set : matrix -> int -> int -> float -> unit
val set_all : matrix -> float -> unit
val set_zero : matrix -> unit
val set_id : matrix -> unit
val memcpy : src:matrix -> dst:matrix -> unit
val copy : matrix -> matrix
val add : matrix -> matrix -> unit
val sub : matrix -> matrix -> unit
val mul_elements : matrix -> matrix -> unit
val div_elements : matrix -> matrix -> unit
val scale : matrix -> float -> unit
val add_constant : matrix -> float -> unit
val add_diagonal : matrix -> float -> unit
val is_null : matrix -> bool
val swap_rows : matrix -> int -> int -> unit
val swap_columns : matrix -> int -> int -> unit
val swap_rowcol : matrix -> int -> int -> unit
val transpose : matrix -> matrix -> unit
val transpose_in_place : matrix -> unit
val submatrix : matrix ->
k1:int -> k2:int -> n1:int -> n2:int -> matrix
val row : matrix -> int -> Gsl_vector_flat.vector
val column : matrix -> int -> Gsl_vector_flat.vector
val diagonal : matrix -> Gsl_vector_flat.vector
val subdiagonal : matrix -> int -> Gsl_vector_flat.vector
val superdiagonal : matrix -> int -> Gsl_vector_flat.vector
val view_array : float array -> ?off:int -> int -> ?tda:int -> int -> matrix
val view_vector : Gsl_vector_flat.vector ->
?off:int -> int -> ?tda:int -> int -> matrix
ocamlgsl-0.6.0/doc/type_Gsl_blas.Complex_Single.html0000664000076400007640000006206010607755600021177 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Complex_Single sig
  external dotu :
    Gsl_vector_complex.Single.vector ->
    Gsl_vector_complex.Single.vector -> Gsl_complex.complex
    = "ml_gsl_blas_cdotu"
  external dotc :
    Gsl_vector_complex.Single.vector ->
    Gsl_vector_complex.Single.vector -> Gsl_complex.complex
    = "ml_gsl_blas_cdotc"
  external nrm2 : Gsl_vector_complex.Single.vector -> float
    = "ml_gsl_blas_scnrm2"
  external asum : Gsl_vector_complex.Single.vector -> float
    = "ml_gsl_blas_scasum"
  external iamax : Gsl_vector_complex.Single.vector -> int
    = "ml_gsl_blas_icamax"
  external swap :
    Gsl_vector_complex.Single.vector ->
    Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_cswap"
  external copy :
    Gsl_vector_complex.Single.vector ->
    Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ccopy"
  external axpy :
    Gsl_complex.complex ->
    Gsl_vector_complex.Single.vector ->
    Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_caxpy"
  external scal :
    Gsl_complex.complex -> Gsl_vector_complex.Single.vector -> unit
    = "ml_gsl_blas_cscal"
  external csscal : float -> Gsl_vector_complex.Single.vector -> unit
    = "ml_gsl_blas_csscal"
  external gemv :
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    x:Gsl_vector_complex.Single.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit
    = "ml_gsl_blas_cgemv_bc" "ml_gsl_blas_cgemv"
  external trmv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix_complex.Single.matrix ->
    x:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ctrmv"
  external trsv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix_complex.Single.matrix ->
    x:Gsl_vector_complex.Single.vector -> unit = "ml_gsl_blas_ctrsv"
  external hemv :
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    x:Gsl_vector_complex.Single.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit
    = "ml_gsl_blas_chemv_bc" "ml_gsl_blas_chemv"
  external geru :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.Single.vector ->
    y:Gsl_vector_complex.Single.vector ->
    a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cgeru"
  external gerc :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.Single.vector ->
    y:Gsl_vector_complex.Single.vector ->
    a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cgerc"
  external her :
    Gsl_blas.uplo ->
    alpha:float ->
    x:Gsl_vector_complex.Single.vector ->
    a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cher"
  external her2 :
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.Single.vector ->
    y:Gsl_vector_complex.Single.vector ->
    a:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_cher2"
  external gemm :
    ta:Gsl_blas.transpose ->
    tb:Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_cgemm_bc" "ml_gsl_blas_cgemm"
  external symm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_csymm_bc" "ml_gsl_blas_csymm"
  external syrk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_csyrk_bc" "ml_gsl_blas_csyrk"
  external syr2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_csyr2k_bc" "ml_gsl_blas_csyr2k"
  external trmm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_ctrmm_bc"
    "ml_gsl_blas_ctrmm"
  external trsm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix -> unit = "ml_gsl_blas_ctrsm_bc"
    "ml_gsl_blas_ctrsm"
  external hemm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_chemm_bc" "ml_gsl_blas_chemm"
  external herk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix_complex.Single.matrix ->
    beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_cherk_bc" "ml_gsl_blas_cherk"
  external her2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.Single.matrix ->
    b:Gsl_matrix_complex.Single.matrix ->
    beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit
    = "ml_gsl_blas_cher2k_bc" "ml_gsl_blas_cher2k"
end
ocamlgsl-0.6.0/doc/type_Gsl_bspline.html0000664000076400007640000001327310607755606017013 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_bspline sig
  type ws
  val make : k:int -> nbreak:int -> Gsl_bspline.ws
  external ncoeffs : Gsl_bspline.ws -> int = "ml_gsl_bspline_ncoeffs"
    "noalloc"
  external knots : [< Gsl_vectmat.vec ] -> Gsl_bspline.ws -> unit
    = "ml_gsl_bspline_knots"
  external knots_uniform : a:float -> b:float -> Gsl_bspline.ws -> unit
    = "ml_gsl_bspline_knots_uniform"
  external _eval : float -> [< Gsl_vectmat.vec ] -> Gsl_bspline.ws -> unit
    = "ml_gsl_bspline_eval"
  val eval : Gsl_bspline.ws -> float -> [> Gsl_vectmat.vec ]
end
ocamlgsl-0.6.0/doc/type_Gsl_blas_flat.html0000664000076400007640000012444310607755602017304 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas_flat sig
  type order = Gsl_blas.order = RowMajor | ColMajor
  type transpose = Gsl_blas.transpose = NoTrans | Trans | ConjTrans
  type uplo = Gsl_blas.uplo = Upper | Lower
  type diag = Gsl_blas.diag = NonUnit | Unit
  type side = Gsl_blas.side = Left | Right
  external dot : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> float
    = "ml_gsl_blas_ddot"
  external nrm2 : Gsl_vector_flat.vector -> float = "ml_gsl_blas_dnrm2"
  external asum : Gsl_vector_flat.vector -> float = "ml_gsl_blas_dasum"
  external iamax : Gsl_vector_flat.vector -> int = "ml_gsl_blas_idamax"
  external swap : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_dswap"
  external copy : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_dcopy"
  external axpy :
    float -> Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_daxpy"
  external rot :
    Gsl_vector_flat.vector ->
    Gsl_vector_flat.vector -> float -> float -> unit = "ml_gsl_blas_drot"
  external scal : float -> Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_dscal"
  external gemv :
    Gsl_blas_flat.transpose ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    x:Gsl_vector_flat.vector ->
    beta:float -> y:Gsl_vector_flat.vector -> unit = "ml_gsl_blas_dgemv_bc"
    "ml_gsl_blas_dgemv"
  external trmv :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_dtrmv"
  external trsv :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit
    = "ml_gsl_blas_dtrsv"
  external symv :
    Gsl_blas_flat.uplo ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    x:Gsl_vector_flat.vector ->
    beta:float -> y:Gsl_vector_flat.vector -> unit = "ml_gsl_blas_dsymv_bc"
    "ml_gsl_blas_dsymv"
  external dger :
    alpha:float ->
    x:Gsl_vector_flat.vector ->
    y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_blas_dger"
  external syr :
    Gsl_blas_flat.uplo ->
    alpha:float ->
    x:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_blas_dsyr"
  external syr2 :
    Gsl_blas_flat.uplo ->
    alpha:float ->
    x:Gsl_vector_flat.vector ->
    y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_blas_dsyr2"
  external gemm :
    ta:Gsl_blas_flat.transpose ->
    tb:Gsl_blas_flat.transpose ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    b:Gsl_matrix_flat.matrix ->
    beta:float -> c:Gsl_matrix_flat.matrix -> unit = "ml_gsl_blas_dgemm_bc"
    "ml_gsl_blas_dgemm"
  external symm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    b:Gsl_matrix_flat.matrix ->
    beta:float -> c:Gsl_matrix_flat.matrix -> unit = "ml_gsl_blas_dsymm_bc"
    "ml_gsl_blas_dsymm"
  external trmm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_blas_dtrmm_bc" "ml_gsl_blas_dtrmm"
  external trsm :
    Gsl_blas_flat.side ->
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    Gsl_blas_flat.diag ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit
    = "ml_gsl_blas_dtrsm_bc" "ml_gsl_blas_dtrsm"
  external syrk :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    beta:float -> c:Gsl_matrix_flat.matrix -> unit = "ml_gsl_blas_dsyrk_bc"
    "ml_gsl_blas_dsyrk"
  external syr2k :
    Gsl_blas_flat.uplo ->
    Gsl_blas_flat.transpose ->
    alpha:float ->
    a:Gsl_matrix_flat.matrix ->
    b:Gsl_matrix_flat.matrix ->
    beta:float -> c:Gsl_matrix_flat.matrix -> unit = "ml_gsl_blas_dsyr2k_bc"
    "ml_gsl_blas_dsyr2k"
  module Complex :
    sig
      external dotu :
        Gsl_vector_complex_flat.vector ->
        Gsl_vector_complex_flat.vector -> Gsl_complex.complex
        = "ml_gsl_blas_zdotu"
      external dotc :
        Gsl_vector_complex_flat.vector ->
        Gsl_vector_complex_flat.vector -> Gsl_complex.complex
        = "ml_gsl_blas_zdotc"
      external nrm2 : Gsl_vector_complex_flat.vector -> float
        = "ml_gsl_blas_znrm2"
      external asum : Gsl_vector_complex_flat.vector -> float
        = "ml_gsl_blas_zasum"
      external iamax : Gsl_vector_complex_flat.vector -> int
        = "ml_gsl_blas_izamax"
      external swap :
        Gsl_vector_complex_flat.vector ->
        Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_zswap"
      external copy :
        Gsl_vector_complex_flat.vector ->
        Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_zcopy"
      external axpy :
        Gsl_complex.complex ->
        Gsl_vector_complex_flat.vector ->
        Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_zaxpy"
      external scal :
        Gsl_complex.complex -> Gsl_vector_complex_flat.vector -> unit
        = "ml_gsl_blas_zscal"
      external zdscal : float -> Gsl_vector_complex_flat.vector -> unit
        = "ml_gsl_blas_zdscal"
      external gemv :
        Gsl_blas_flat.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        x:Gsl_vector_complex_flat.vector ->
        beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
        = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
      external trmv :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        Gsl_blas_flat.diag ->
        a:Gsl_matrix_complex_flat.matrix ->
        x:Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_ztrmv"
      external trsv :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        Gsl_blas_flat.diag ->
        a:Gsl_matrix_complex_flat.matrix ->
        x:Gsl_vector_complex_flat.vector -> unit = "ml_gsl_blas_ztrsv"
      external hemv :
        Gsl_blas_flat.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        x:Gsl_vector_complex_flat.vector ->
        beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit
        = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
      external geru :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex_flat.vector ->
        y:Gsl_vector_complex_flat.vector ->
        a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zgeru"
      external gerc :
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex_flat.vector ->
        y:Gsl_vector_complex_flat.vector ->
        a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zgerc"
      external her :
        Gsl_blas_flat.uplo ->
        alpha:float ->
        x:Gsl_vector_complex_flat.vector ->
        a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zher"
      external her2 :
        Gsl_blas_flat.uplo ->
        alpha:Gsl_complex.complex ->
        x:Gsl_vector_complex_flat.vector ->
        y:Gsl_vector_complex_flat.vector ->
        a:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_zher2"
      external gemm :
        ta:Gsl_blas_flat.transpose ->
        tb:Gsl_blas_flat.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
      external symm :
        Gsl_blas_flat.side ->
        Gsl_blas_flat.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
      external syrk :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
      external syr2k :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
      external trmm :
        Gsl_blas_flat.side ->
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        Gsl_blas_flat.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_ztrmm_bc"
        "ml_gsl_blas_ztrmm"
      external trsm :
        Gsl_blas_flat.side ->
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        Gsl_blas_flat.diag ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix -> unit = "ml_gsl_blas_ztrsm_bc"
        "ml_gsl_blas_ztrsm"
      external hemm :
        Gsl_blas_flat.side ->
        Gsl_blas_flat.uplo ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix ->
        beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
      external herk :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        alpha:float ->
        a:Gsl_matrix_complex_flat.matrix ->
        beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
      external her2k :
        Gsl_blas_flat.uplo ->
        Gsl_blas_flat.transpose ->
        alpha:Gsl_complex.complex ->
        a:Gsl_matrix_complex_flat.matrix ->
        b:Gsl_matrix_complex_flat.matrix ->
        beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit
        = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
    end
end
ocamlgsl-0.6.0/doc/Gsl_vector_complex.Single.html0000664000076400007640000002005110607755576020565 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector_complex.Single

Module Gsl_vector_complex.Single


module Single: sig .. end

type complex_float_vector_bigarr = (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout) Bigarray.Array1.t 
type vector = complex_float_vector_bigarr 
val create : ?init:Gsl_complex.complex -> int -> vector
val of_array : Gsl_complex.complex array -> vector
val to_array : vector -> Gsl_complex.complex array
val of_complex_array : Gsl_complex.complex_array -> vector
val to_complex_array : vector -> Gsl_complex.complex_array
val length : vector -> int
val get : vector -> int -> Gsl_complex.complex
val set : vector -> int -> Gsl_complex.complex -> unit
val set_all : vector -> Gsl_complex.complex -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : src:vector ->
dst:vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit
val subvector : vector ->
off:int -> len:int -> vector
ocamlgsl-0.6.0/doc/Gsl_blas.html0000664000076400007640000003611510607755600015231 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas

Module Gsl_blas


module Gsl_blas: sig .. end
BLAS support


type order =
| RowMajor
| ColMajor

type transpose =
| NoTrans
| Trans
| ConjTrans

type uplo =
| Upper
| Lower

type diag =
| NonUnit
| Unit

type side =
| Left
| Right

LEVEL 1


val dot : Gsl_vector.vector -> Gsl_vector.vector -> float
val nrm2 : Gsl_vector.vector -> float
val asum : Gsl_vector.vector -> float
val iamax : Gsl_vector.vector -> int
val swap : Gsl_vector.vector -> Gsl_vector.vector -> unit
val copy : Gsl_vector.vector -> Gsl_vector.vector -> unit
val axpy : float -> Gsl_vector.vector -> Gsl_vector.vector -> unit
val rot : Gsl_vector.vector -> Gsl_vector.vector -> float -> float -> unit
val scal : float -> Gsl_vector.vector -> unit

LEVEL 2


val gemv : transpose ->
alpha:float ->
a:Gsl_matrix.matrix ->
x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit
val trmv : uplo ->
transpose ->
diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit
val trsv : uplo ->
transpose ->
diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit
val symv : uplo ->
alpha:float ->
a:Gsl_matrix.matrix ->
x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit
val dger : alpha:float ->
x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit
val syr : uplo ->
alpha:float -> x:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit
val syr2 : uplo ->
alpha:float ->
x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit

LEVEL 3


val gemm : ta:transpose ->
tb:transpose ->
alpha:float ->
a:Gsl_matrix.matrix ->
b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
val symm : side ->
uplo ->
alpha:float ->
a:Gsl_matrix.matrix ->
b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
val trmm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit
val trsm : side ->
uplo ->
transpose ->
diag ->
alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit
val syrk : uplo ->
transpose ->
alpha:float ->
a:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit
val syr2k : uplo ->
transpose ->
alpha:float ->
a:Gsl_matrix.matrix ->
b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit

Single precision


module Single: sig .. end

Complex


module Complex: sig .. end

Complex single precision


module Complex_Single: sig .. end
ocamlgsl-0.6.0/doc/Gsl_root.Bracket.html0000664000076400007640000001333110607755605016645 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_root.Bracket

Module Gsl_root.Bracket


module Bracket: sig .. end


type kind =
| BISECTION
| FALSEPOS
| BRENT
type t 
val make : kind ->
Gsl_fun.gsl_fun -> float -> float -> t
val name : t -> string
val iterate : t -> unit
val root : t -> float
val interval : t -> float * float
ocamlgsl-0.6.0/doc/type_Gsl_permut.html0000664000076400007640000002024110607755603016661 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_permut sig
  type permut = (int, Bigarray.int_elt, Bigarray.c_layout) Bigarray.Array1.t
  val of_array : int array -> Gsl_permut.permut
  val to_array : Gsl_permut.permut -> int array
  val init : Gsl_permut.permut -> unit
  val create : int -> Gsl_permut.permut
  val make : int -> Gsl_permut.permut
  val swap : Gsl_permut.permut -> int -> int -> unit
  val size : Gsl_permut.permut -> int
  val valid : Gsl_permut.permut -> bool
  external reverse : Gsl_permut.permut -> unit = "ml_gsl_permutation_reverse"
  val inverse : Gsl_permut.permut -> Gsl_permut.permut
  external next : Gsl_permut.permut -> unit = "ml_gsl_permutation_next"
  external prev : Gsl_permut.permut -> unit = "ml_gsl_permutation_prev"
  external permute : Gsl_permut.permut -> 'a array -> unit = "ml_gsl_permute"
  external permute_barr :
    Gsl_permut.permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit
    = "ml_gsl_permute_barr"
  external permute_inverse : Gsl_permut.permut -> 'a array -> unit
    = "ml_gsl_permute_inverse"
  external permute_inverse_barr :
    Gsl_permut.permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit
    = "ml_gsl_permute_inverse_barr"
end
ocamlgsl-0.6.0/doc/index_classes.html0000664000076400007640000000715310607755611016331 0ustar olivoliv ocamlgsl 0.6.0 : Index of classes

Index of classes


ocamlgsl-0.6.0/doc/type_Gsl_blas.Complex.html0000664000076400007640000005506710607755600017707 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Complex sig
  external dotu :
    Gsl_vector_complex.vector ->
    Gsl_vector_complex.vector -> Gsl_complex.complex = "ml_gsl_blas_zdotu"
  external dotc :
    Gsl_vector_complex.vector ->
    Gsl_vector_complex.vector -> Gsl_complex.complex = "ml_gsl_blas_zdotc"
  external nrm2 : Gsl_vector_complex.vector -> float = "ml_gsl_blas_znrm2"
  external asum : Gsl_vector_complex.vector -> float = "ml_gsl_blas_zasum"
  external iamax : Gsl_vector_complex.vector -> int = "ml_gsl_blas_izamax"
  external swap :
    Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zswap"
  external copy :
    Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zcopy"
  external axpy :
    Gsl_complex.complex ->
    Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zaxpy"
  external scal : Gsl_complex.complex -> Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zscal"
  external zdscal : float -> Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zdscal"
  external gemv :
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    x:Gsl_vector_complex.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zgemv_bc" "ml_gsl_blas_zgemv"
  external trmv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_ztrmv"
  external trsv :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_ztrsv"
  external hemv :
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    x:Gsl_vector_complex.vector ->
    beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
    = "ml_gsl_blas_zhemv_bc" "ml_gsl_blas_zhemv"
  external geru :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.vector ->
    y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zgeru"
  external gerc :
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.vector ->
    y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zgerc"
  external her :
    Gsl_blas.uplo ->
    alpha:float ->
    x:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zher"
  external her2 :
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    x:Gsl_vector_complex.vector ->
    y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zher2"
  external gemm :
    ta:Gsl_blas.transpose ->
    tb:Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    b:Gsl_matrix_complex.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zgemm_bc" "ml_gsl_blas_zgemm"
  external symm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    b:Gsl_matrix_complex.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zsymm_bc" "ml_gsl_blas_zsymm"
  external syrk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zsyrk_bc" "ml_gsl_blas_zsyrk"
  external syr2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    b:Gsl_matrix_complex.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zsyr2k_bc" "ml_gsl_blas_zsyr2k"
  external trmm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_ztrmm_bc" "ml_gsl_blas_ztrmm"
  external trsm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    Gsl_blas.diag ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_ztrsm_bc" "ml_gsl_blas_ztrsm"
  external hemm :
    Gsl_blas.side ->
    Gsl_blas.uplo ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    b:Gsl_matrix_complex.matrix ->
    beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zhemm_bc" "ml_gsl_blas_zhemm"
  external herk :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:float ->
    a:Gsl_matrix_complex.matrix ->
    beta:float -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zherk_bc" "ml_gsl_blas_zherk"
  external her2k :
    Gsl_blas.uplo ->
    Gsl_blas.transpose ->
    alpha:Gsl_complex.complex ->
    a:Gsl_matrix_complex.matrix ->
    b:Gsl_matrix_complex.matrix ->
    beta:float -> c:Gsl_matrix_complex.matrix -> unit
    = "ml_gsl_blas_zher2k_bc" "ml_gsl_blas_zher2k"
end
ocamlgsl-0.6.0/doc/Gsl_histo.html0000664000076400007640000002740210607755606015443 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_histo

Module Gsl_histo


module Gsl_histo: sig .. end
Histograms


type t = private {
   n : int; (*number of histogram bins*)
   range : float array; (*ranges of the bins ; n+1 elements*)
   bin : float array; (*counts for each bin ; n elements*)
}
The histogram type
val check : t -> bool

Allocating histograms


val make : int -> t
val copy : t -> t
val set_ranges : t -> float array -> unit
val set_ranges_uniform : t -> xmin:float -> xmax:float -> unit

Updating and accessing histogram elements


val accumulate : t -> ?w:float -> float -> unit
val get : t -> int -> float
val get_range : t -> int -> float * float
val h_max : t -> float
val h_min : t -> float
val bins : t -> int
val reset : t -> unit

Searching histogram ranges


val find : t -> float -> int

Histograms statistics


val max_val : t -> float
val max_bin : t -> int
val min_val : t -> float
val min_bin : t -> int
val mean : t -> float
val sigma : t -> float
val sum : t -> float

Histogram operations


val equal_bins_p : t -> t -> bool
val add : t -> t -> unit
val sub : t -> t -> unit
val mul : t -> t -> unit
val div : t -> t -> unit
val scale : t -> float -> unit
val shift : t -> float -> unit

Resampling



type histo_pdf = private {
   pdf_n : int;
   pdf_range : float array;
   pdf_sum : float array;
}
val init : t -> histo_pdf
val sample : histo_pdf -> float -> float
ocamlgsl-0.6.0/doc/type_Gsl_linalg.html0000664000076400007640000016426610607755603016633 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_linalg sig
  external matmult :
    a:Gsl_vectmat.mat ->
    ?transpa:bool ->
    b:Gsl_vectmat.mat -> ?transpb:bool -> Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_matmult_mod"
  external _LU_decomp : Gsl_vectmat.mat -> Gsl_permut.permut -> int
    = "ml_gsl_linalg_LU_decomp"
  external _LU_solve :
    Gsl_vectmat.mat ->
    Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LU_solve"
  external _LU_svx :
    Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LU_svx"
  external _LU_refine :
    a:Gsl_vectmat.mat ->
    lu:Gsl_vectmat.mat ->
    Gsl_permut.permut ->
    b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LU_refine_bc" "ml_gsl_linalg_LU_refine"
  external _LU_invert :
    Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_LU_invert"
  external _LU_det : Gsl_vectmat.mat -> int -> float = "ml_gsl_linalg_LU_det"
  external _LU_lndet : Gsl_vectmat.mat -> float = "ml_gsl_linalg_LU_lndet"
  external _LU_sgndet : Gsl_vectmat.mat -> int -> int
    = "ml_gsl_linalg_LU_sgndet"
  val decomp_LU :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vectmat.mat * Gsl_permut.permut * int
  val solve_LU :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    [< `A of float array
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    float array
  val det_LU :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    float
  val invert_LU :
    ?protect:bool ->
    ?result:Gsl_vectmat.mat ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    Gsl_vectmat.mat
  external complex_LU_decomp : Gsl_vectmat.cmat -> Gsl_permut.permut -> int
    = "ml_gsl_linalg_complex_LU_decomp"
  external complex_LU_solve :
    Gsl_vectmat.cmat ->
    Gsl_permut.permut -> b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> unit
    = "ml_gsl_linalg_complex_LU_solve"
  external complex_LU_svx :
    Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cvec -> unit
    = "ml_gsl_linalg_complex_LU_svx"
  external complex_LU_refine :
    a:Gsl_vectmat.cmat ->
    lu:Gsl_vectmat.cmat ->
    Gsl_permut.permut ->
    b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> res:Gsl_vectmat.cvec -> unit
    = "ml_gsl_linalg_complex_LU_refine_bc" "ml_gsl_linalg_complex_LU_refine"
  external complex_LU_invert :
    Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cmat -> unit
    = "ml_gsl_linalg_complex_LU_invert"
  external complex_LU_det : Gsl_vectmat.cmat -> int -> Gsl_complex.complex
    = "ml_gsl_linalg_complex_LU_det"
  external complex_LU_lndet : Gsl_vectmat.cmat -> float
    = "ml_gsl_linalg_complex_LU_lndet"
  external complex_LU_sgndet : Gsl_vectmat.cmat -> int -> Gsl_complex.complex
    = "ml_gsl_linalg_complex_LU_sgndet"
  external _QR_decomp : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_decomp"
  external _QR_solve :
    Gsl_vectmat.mat ->
    Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_solve"
  external _QR_svx :
    Gsl_vectmat.mat -> Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_svx"
  external _QR_lssolve :
    Gsl_vectmat.mat ->
    Gsl_vectmat.vec ->
    b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_lssolve"
  external _QR_QTvec :
    Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_QTvec"
  external _QR_Qvec :
    Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_Qvec"
  external _QR_Rsolve :
    Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_Rsolve"
  external _QR_Rsvx : Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_Rsvx"
  external _QR_unpack :
    Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_QR_unpack"
  external _QR_QRsolve :
    Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_QRsolve"
  external _QR_update :
    Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat -> w:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QR_update"
  external _R_solve :
    r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_R_solve"
  external _QRPT_decomp :
    a:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
    = "ml_gsl_linalg_QRPT_decomp"
  external _QRPT_decomp2 :
    a:Gsl_vectmat.mat ->
    q:Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
    = "ml_gsl_linalg_QRPT_decomp2_bc" "ml_gsl_linalg_QRPT_decomp2"
  external _QRPT_solve :
    qr:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec ->
    p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_solve"
  external _QRPT_svx :
    qr:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_svx"
  external _QRPT_QRsolve :
    q:Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat ->
    p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_QRsolve"
  external _QRPT_update :
    q:Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat ->
    p:Gsl_permut.permut -> u:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_update"
  external _QRPT_Rsolve :
    qr:Gsl_vectmat.mat ->
    p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_Rsolve"
  external _QRPT_Rsvx :
    qr:Gsl_vectmat.mat -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_QRPT_Rsolve"
  external _SV_decomp :
    a:Gsl_vectmat.mat ->
    v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_SV_decomp"
  external _SV_decomp_mod :
    a:Gsl_vectmat.mat ->
    x:Gsl_vectmat.mat ->
    v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_SV_decomp_mod"
  external _SV_decomp_jacobi :
    a:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_SV_decomp_jacobi"
  external _SV_solve :
    u:Gsl_vectmat.mat ->
    v:Gsl_vectmat.mat ->
    s:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_SV_solve"
  external _LQ_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_decomp"
  external _LQ_solve_T :
    lq:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_solve_T"
  external _LQ_svx_T :
    lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_svx_T"
  external _LQ_lssolve_T :
    lq:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec ->
    b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_lssolve_T"
  external _LQ_Lsolve_T :
    lq:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_Lsolve_T"
  external _LQ_Lsvx_T : lq:Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_Lsvx_T"
  external _L_solve_T :
    l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_L_solve_T"
  external _LQ_vecQ :
    lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_vecQ"
  external _LQ_vecQT :
    lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_vecQT"
  external _LQ_unpack :
    lq:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_LQ_unpack"
  external _LQ_update :
    q:Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_update"
  external _LQ_LQsolve :
    q:Gsl_vectmat.mat ->
    l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_LQ_LQsolve"
  external _PTLQ_decomp :
    a:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
    = "ml_gsl_linalg_PTLQ_decomp"
  external _PTLQ_decomp2 :
    a:Gsl_vectmat.mat ->
    q:Gsl_vectmat.mat ->
    r:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int
    = "ml_gsl_linalg_PTLQ_decomp2_bc" "ml_gsl_linalg_PTLQ_decomp2"
  external _PTLQ_solve_T :
    qr:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec ->
    Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_solve_T"
  external _PTLQ_svx_T :
    lq:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_svx_T"
  external _PTLQ_LQsolve_T :
    q:Gsl_vectmat.mat ->
    l:Gsl_vectmat.mat ->
    Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_LQsolve_T"
  external _PTLQ_Lsolve_T :
    lq:Gsl_vectmat.mat ->
    Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_Lsolve_T"
  external _PTLQ_Lsvx_T :
    lq:Gsl_vectmat.mat -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_Lsvx_T"
  external _PTLQ_update :
    q:Gsl_vectmat.mat ->
    l:Gsl_vectmat.mat ->
    Gsl_permut.permut -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_PTLQ_update"
  external cho_decomp : Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_cholesky_decomp"
  external cho_solve :
    Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_cholesky_solve"
  external cho_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_cholesky_svx"
  external cho_decomp_unit : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_cholesky_decomp_unit"
  external symmtd_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_symmtd_decomp"
  external symmtd_unpack :
    a:Gsl_vectmat.mat ->
    tau:Gsl_vectmat.vec ->
    q:Gsl_vectmat.mat ->
    diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_symmtd_unpack"
  external symmtd_unpack_T :
    a:Gsl_vectmat.mat ->
    diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_symmtd_unpack_T"
  external hermtd_decomp : a:Gsl_vectmat.cmat -> tau:Gsl_vectmat.cvec -> unit
    = "ml_gsl_linalg_hermtd_decomp"
  external hermtd_unpack :
    a:Gsl_vectmat.cmat ->
    tau:Gsl_vectmat.cvec ->
    q:Gsl_vectmat.cmat ->
    diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_hermtd_unpack"
  external hermtd_unpack_T :
    a:Gsl_vectmat.cmat ->
    diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_hermtd_unpack_T"
  external bidiag_decomp :
    a:Gsl_vectmat.mat ->
    tau_u:Gsl_vectmat.vec -> tau_v:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_bidiag_decomp"
  external bidiag_unpack :
    a:Gsl_vectmat.mat ->
    tau_u:Gsl_vectmat.vec ->
    u:Gsl_vectmat.mat ->
    tau_v:Gsl_vectmat.vec ->
    v:Gsl_vectmat.mat ->
    diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_bidiag_unpack_bc" "ml_gsl_linalg_bidiag_unpack"
  external bidiag_unpack2 :
    a:Gsl_vectmat.mat ->
    tau_u:Gsl_vectmat.vec ->
    tau_v:Gsl_vectmat.vec -> v:Gsl_vectmat.mat -> unit
    = "ml_gsl_linalg_bidiag_unpack2"
  external bidiag_unpack_B :
    a:Gsl_vectmat.mat ->
    diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_bidiag_unpack_B"
  external _HH_solve :
    Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_HH_solve"
  external _HH_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_HH_svx"
  val solve_HH :
    ?protect:bool ->
    [< `A of float array * int * int
     | `AA of float array array
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    [< `A of float array
     | `V of Gsl_vector.vector
     | `VF of Gsl_vector_flat.vector ] ->
    float array
  external solve_symm_tridiag :
    diag:Gsl_vectmat.vec ->
    offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_solve_symm_tridiag"
  external solve_tridiag :
    diag:Gsl_vectmat.vec ->
    abovediag:Gsl_vectmat.vec ->
    belowdiag:Gsl_vectmat.vec ->
    b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_solve_tridiag"
  external solve_symm_cyc_tridiag :
    diag:Gsl_vectmat.vec ->
    offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_solve_symm_cyc_tridiag"
  external solve_cyc_tridiag :
    diag:Gsl_vectmat.vec ->
    abovediag:Gsl_vectmat.vec ->
    belowdiag:Gsl_vectmat.vec ->
    b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit
    = "ml_gsl_linalg_solve_cyc_tridiag"
  external _exponential :
    Gsl_vectmat.mat -> Gsl_vectmat.mat -> Gsl_fun.mode -> unit
    = "ml_gsl_linalg_exponential_ss"
  val exponential :
    ?mode:Gsl_fun.mode ->
    [< `A of float array * int * int
     | `M of Gsl_matrix.matrix
     | `MF of Gsl_matrix_flat.matrix ] ->
    [ `M of Gsl_matrix.matrix ]
end
ocamlgsl-0.6.0/doc/Gsl_multiroot.html0000664000076400007640000001102710607755605016346 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multiroot

Module Gsl_multiroot


module Gsl_multiroot: sig .. end
Multidimensional Root-Finding

module NoDeriv: sig .. end
module Deriv: sig .. end
ocamlgsl-0.6.0/doc/Gsl_fft.Real.html0000664000076400007640000001254610607755605015760 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Real

Module Gsl_fft.Real


module Real: sig .. end

type workspace 
type wavetable 
val make_workspace : int -> workspace
val make_wavetable : int -> wavetable
val transform : ?stride:int ->
Gsl_fft.fft_array -> wavetable -> workspace -> unit
val transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit
val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array
ocamlgsl-0.6.0/doc/Gsl_blas.Complex.html0000664000076400007640000003767310607755600016651 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_blas.Complex

Module Gsl_blas.Complex


module Complex: sig .. end


LEVEL 1


val dotu : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> Gsl_complex.complex
val dotc : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> Gsl_complex.complex
val nrm2 : Gsl_vector_complex.vector -> float
val asum : Gsl_vector_complex.vector -> float
val iamax : Gsl_vector_complex.vector -> int
val swap : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
val copy : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
val axpy : Gsl_complex.complex ->
Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit
val scal : Gsl_complex.complex -> Gsl_vector_complex.vector -> unit
val zdscal : float -> Gsl_vector_complex.vector -> unit

LEVEL 2


val gemv : Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
x:Gsl_vector_complex.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
val trmv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
val trsv : Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit
val hemv : Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
x:Gsl_vector_complex.vector ->
beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit
val geru : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.vector ->
y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
val gerc : alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.vector ->
y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
val her : Gsl_blas.uplo ->
alpha:float ->
x:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit
val her2 : Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
x:Gsl_vector_complex.vector ->
y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit

LEVEL 3


val gemm : ta:Gsl_blas.transpose ->
tb:Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
b:Gsl_matrix_complex.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
val symm : Gsl_blas.side ->
Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
b:Gsl_matrix_complex.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
val syrk : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
val syr2k : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
b:Gsl_matrix_complex.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
val trmm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
val trsm : Gsl_blas.side ->
Gsl_blas.uplo ->
Gsl_blas.transpose ->
Gsl_blas.diag ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit
val hemm : Gsl_blas.side ->
Gsl_blas.uplo ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
b:Gsl_matrix_complex.matrix ->
beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit
val herk : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:float ->
a:Gsl_matrix_complex.matrix ->
beta:float -> c:Gsl_matrix_complex.matrix -> unit
val her2k : Gsl_blas.uplo ->
Gsl_blas.transpose ->
alpha:Gsl_complex.complex ->
a:Gsl_matrix_complex.matrix ->
b:Gsl_matrix_complex.matrix ->
beta:float -> c:Gsl_matrix_complex.matrix -> unit
ocamlgsl-0.6.0/doc/Gsl_fft.Complex.html0000664000076400007640000001704110607755605016477 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_fft.Complex

Module Gsl_fft.Complex


module Complex: sig .. end

type workspace 
type wavetable 

type direction =
| Forward
| Backward
val make_workspace : int -> workspace
val make_wavetable : int -> wavetable
val forward : ?stride:int ->
Gsl_complex.complex_array ->
wavetable -> workspace -> unit
val forward_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
val transform : ?stride:int ->
Gsl_complex.complex_array ->
wavetable ->
workspace -> direction -> unit
val transform_rad2 : ?dif:bool ->
?stride:int -> Gsl_complex.complex_array -> direction -> unit
val backward : ?stride:int ->
Gsl_complex.complex_array ->
wavetable -> workspace -> unit
val backward_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
val inverse : ?stride:int ->
Gsl_complex.complex_array ->
wavetable -> workspace -> unit
val inverse_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit
ocamlgsl-0.6.0/doc/Gsl_diff.html0000664000076400007640000001143410607755605015222 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_diff

Module Gsl_diff


module Gsl_diff: sig .. end
Numerical Differentiation

val central : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
val forward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
val backward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result
ocamlgsl-0.6.0/doc/Gsl_multimin.html0000664000076400007640000001101610607755605016144 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multimin

Module Gsl_multimin


module Gsl_multimin: sig .. end
Multidimensional Minimization

module Deriv: sig .. end
module NoDeriv: sig .. end
ocamlgsl-0.6.0/doc/Gsl_vector.Single.html0000664000076400007640000002270610607755576017047 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_vector.Single

Module Gsl_vector.Single


module Single: sig .. end

type float_vector_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t 
type vector = float_vector_bigarr 
val create : ?init:float -> int -> vector
val of_array : float array -> vector
val to_array : vector -> float array
val length : vector -> int
val get : vector -> int -> float
val set : vector -> int -> float -> unit
val set_all : vector -> float -> unit
val set_zero : vector -> unit
val set_basis : vector -> int -> unit
val memcpy : src:vector -> dst:vector -> unit
val copy : vector -> vector
val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit
val add : vector -> vector -> unit
val sub : vector -> vector -> unit
val mul : vector -> vector -> unit
val div : vector -> vector -> unit
val scale : vector -> float -> unit
val add_constant : vector -> float -> unit
val is_null : vector -> bool
val max : vector -> float
val min : vector -> float
val minmax : vector -> float * float
val max_index : vector -> int
val min_index : vector -> int
val minmax_index : vector -> int * int

No-copy operations


val subvector : vector -> off:int -> len:int -> vector
ocamlgsl-0.6.0/doc/type_Gsl_rng.html0000664000076400007640000004000010607755604016127 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_rng sig
  type rng_type =
      BOROSH13
    | COVEYOU
    | CMRG
    | FISHMAN18
    | FISHMAN20
    | FISHMAN2X
    | GFSR4
    | KNUTHRAN
    | KNUTHRAN2
    | KNUTHRAN2002
    | LECUYER21
    | MINSTD
    | MRG
    | MT19937
    | MT19937_1999
    | MT19937_1998
    | R250
    | RAN0
    | RAN1
    | RAN2
    | RAN3
    | RAND
    | RAND48
    | RANDOM128_BSD
    | RANDOM128_GLIBC2
    | RANDOM128_LIBC5
    | RANDOM256_BSD
    | RANDOM256_GLIBC2
    | RANDOM256_LIBC5
    | RANDOM32_BSD
    | RANDOM32_GLIBC2
    | RANDOM32_LIBC5
    | RANDOM64_BSD
    | RANDOM64_GLIBC2
    | RANDOM64_LIBC5
    | RANDOM8_BSD
    | RANDOM8_GLIBC2
    | RANDOM8_LIBC5
    | RANDOM_BSD
    | RANDOM_GLIBC2
    | RANDOM_LIBC5
    | RANDU
    | RANF
    | RANLUX
    | RANLUX389
    | RANLXD1
    | RANLXD2
    | RANLXS0
    | RANLXS1
    | RANLXS2
    | RANMAR
    | SLATEC
    | TAUS
    | TAUS_2
    | TAUS_113
    | TRANSPUTER
    | TT800
    | UNI
    | UNI32
    | VAX
    | WATERMAN14
    | ZUF
  type t
  external default : unit -> Gsl_rng.rng_type = "ml_gsl_rng_get_default"
  external default_seed : unit -> nativeint = "ml_gsl_rng_get_default_seed"
  external set_default : Gsl_rng.rng_type -> unit = "ml_gsl_rng_set_default"
  external set_default_seed : nativeint -> unit
    = "ml_gsl_rng_set_default_seed"
  external env_setup : unit -> unit = "ml_gsl_rng_env_setup"
  val make : Gsl_rng.rng_type -> Gsl_rng.t
  external set : Gsl_rng.t -> nativeint -> unit = "ml_gsl_rng_set"
  external name : Gsl_rng.t -> string = "ml_gsl_rng_name"
  external get_type : Gsl_rng.t -> Gsl_rng.rng_type = "ml_gsl_rng_get_type"
  external max : Gsl_rng.t -> nativeint = "ml_gsl_rng_max"
  external min : Gsl_rng.t -> nativeint = "ml_gsl_rng_min"
  external memcpy : Gsl_rng.t -> Gsl_rng.t -> unit = "ml_gsl_rng_memcpy"
  external clone : Gsl_rng.t -> Gsl_rng.t = "ml_gsl_rng_clone"
  external dump_state : Gsl_rng.t -> string * string
    = "ml_gsl_rng_dump_state"
  external set_state : Gsl_rng.t -> string * string -> unit
    = "ml_gsl_rng_set_state"
  external get : Gsl_rng.t -> nativeint = "ml_gsl_rng_get"
  external uniform : Gsl_rng.t -> float = "ml_gsl_rng_uniform"
  external uniform_pos : Gsl_rng.t -> float = "ml_gsl_rng_uniform_pos"
  external uniform_int : Gsl_rng.t -> int -> int = "ml_gsl_rng_uniform_int"
    "noalloc"
  external uniform_arr : Gsl_rng.t -> float array -> unit
    = "ml_gsl_rng_uniform_arr" "noalloc"
  external uniform_pos_arr : Gsl_rng.t -> float array -> unit
    = "ml_gsl_rng_uniform_pos_arr" "noalloc"
end
ocamlgsl-0.6.0/doc/type_Gsl_multifit_nlin.html0000664000076400007640000001673010607755605020234 0ustar olivoliv ocamlgsl 0.6.0 : Gsl_multifit_nlin sig
  type t
  type kind = LMSDER | LMDER
  val make :
    Gsl_multifit_nlin.kind ->
    n:int ->
    p:int ->
    Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> Gsl_multifit_nlin.t
  external name : Gsl_multifit_nlin.t -> string
    = "ml_gsl_multifit_fdfsolver_name"
  external iterate : Gsl_multifit_nlin.t -> unit
    = "ml_gsl_multifit_fdfsolver_iterate"
  external position : Gsl_multifit_nlin.t -> Gsl_vector.vector -> unit
    = "ml_gsl_multifit_fdfsolver_position"
  external get_state :
    Gsl_multifit_nlin.t ->
    ?x:Gsl_vector.vector ->
    ?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit
    = "ml_gsl_multifit_fdfsolver_get_state"
  external test_delta :
    Gsl_multifit_nlin.t -> epsabs:float -> epsrel:float -> bool
    = "ml_gsl_multifit_test_delta"
  external test_gradient :
    Gsl_multifit_nlin.t -> epsabs:float -> Gsl_vector.vector -> bool
    = "ml_gsl_multifit_test_gradient"
  external covar :
    Gsl_multifit_nlin.t -> epsrel:float -> Gsl_matrix.matrix -> unit
    = "ml_gsl_multifit_covar"
end
ocamlgsl-0.6.0/doc/index_exceptions.html0000664000076400007640000000766510607755611017065 0ustar olivoliv ocamlgsl 0.6.0 : Index of exceptions

Index of exceptions


G
Gsl_exn [Gsl_error]

W
Wrong_layout [Gsl_fft]

ocamlgsl-0.6.0/test/gsl_vector.test.ml0000664000076400007640000001237610600031632016472 0ustar olivoliv#load "bigarray.cma" #load "gsl.cma" (** The common signature of vector modules *) module type VECTOR = sig type vector val create : ?init:float -> int -> vector val of_array : float array -> vector val to_array : vector -> float array val length : vector -> int val get : vector -> int -> float val set : vector -> int -> float -> unit val set_all : vector -> float -> unit val set_zero : vector -> unit val set_basis : vector -> int -> unit val memcpy : src:vector -> dst:vector -> unit val copy : vector -> vector val swap_element : vector -> int -> int -> unit val reverse : vector -> unit val add : vector -> vector -> unit val sub : vector -> vector -> unit val mul : vector -> vector -> unit val div : vector -> vector -> unit val scale : vector -> float -> unit val add_constant : vector -> float -> unit val max : vector -> float val min : vector -> float val minmax : vector -> float * float val max_index : vector -> int val min_index : vector -> int val minmax_index : vector -> int * int end ;; module Test = functor (M : VECTOR) -> struct let test () = Fort.expect_pass "base ops" (fun () -> let len = 10 in let vec = M.create len in let v1, v2 = (1., 2.) in Fort.expect_equal ~msg:"length" len (M.length vec) ; Fort.expect_equal ~msg:"array conversion" vec (M.of_array (M.to_array vec)) ; Fort.expect_equal ~msg:"set/get" v2 (M.set vec 0 v2 ; M.get vec 0) ; Fort.expect_equal ~msg:"init" v1 (M.get (M.create ~init:v1 len) 0) ; Fort.expect_equal ~msg:"set_all" v1 (M.set_all vec v1 ; M.get vec 1) ; Fort.expect_equal ~msg:"set_zero" 0. (M.set_zero vec ; M.get vec 1) ; Fort.expect_equal ~msg:"set_basis" (0., 1.) (M.set_basis vec 1; (M.get vec 0, M.get vec 1)) ; let vec' = M.copy vec in Fort.expect_equal ~msg:"copy" vec' vec ; for i=0 to pred len do M.set vec i (float i) done ; Fort.expect_equal ~msg:"memcpy" vec (M.memcpy vec vec'; vec') ; let vec1 = M.of_array [| 1.; 2.; 3.; |] in let vec2 = M.of_array [| 2.; 1.; 3.; |] in let vec3 = M.of_array [| 3.; 1.; 2.; |] in Fort.expect_equal ~msg:"swap_element" vec2 (M.swap_element vec1 0 1; vec1) ; Fort.expect_equal ~msg:"reverse1" vec3 (M.reverse vec1; vec1) ; let vec1 = M.of_array [| 1.; 2.; 3.; 4.; |] in let vec2 = M.of_array [| 4.; 3.; 2.; 1.; |] in Fort.expect_equal ~msg:"reverse2" vec2 (M.reverse vec1; vec1) ; ) ; Fort.expect_pass "arith ops" (fun () -> let v1 = M.of_array [| 1.; 2.; 3. |] in let v2 = M.of_array [| 4.; 5.; 6. |] in let v3 = M.of_array [| 5.; 7.; 9. |] in let v4 = M.of_array [| 3.; 3.; 3. |] in let v5 = M.of_array [| 4.; 10.; 18. |] in let v6 = M.of_array [| 0.5; 1.; 1.5 |] in Fort.expect_equal ~msg:"add" v3 (let v = M.copy v1 in M.add v v2 ; v) ; Fort.expect_equal ~msg:"sub" v4 (let v = M.copy v2 in M.sub v v1 ; v) ; Fort.expect_equal ~msg:"mul" v5 (let v = M.copy v1 in M.mul v v2 ; v) ; Fort.expect_equal ~msg:"div" v2 (let v = M.copy v5 in M.div v v1 ; v) ; Fort.expect_equal ~msg:"scale" v6 (let v = M.copy v1 in M.scale v 0.5 ; v) ; Fort.expect_equal ~msg:"add_constant" v2 (let v = M.copy v1 in M.add_constant v 3. ; v) ; ) ; Fort.expect_pass "index ops" (fun () -> let v = M.of_array [| 3.; 7.; 2.; 5.|] in Fort.expect_equal ~msg:"min" 2. (M.min v) ; Fort.expect_equal ~msg:"max" 7. (M.max v) ; Fort.expect_equal ~msg:"minmax" (2., 7.) (M.minmax v) ; Fort.expect_equal ~msg:"min_index" 2 (M.min_index v) ; Fort.expect_equal ~msg:"max_index" 1 (M.max_index v) ; Fort.expect_equal ~msg:"minmax_index" (2, 1) (M.minmax_index v) ) end ;; module M = Test(Gsl_vector) ;; M.test() ;; module M = Test(Gsl_vector.Single);; M.test() ;; module M = Test(Gsl_vector_flat);; M.test() ;; (** Test subvector thing *) module M = Gsl_vector;; Fort.expect_pass "subvector bigarray" (fun () -> let len = 10 in let v = M.create ~init:0. len in for i=0 to pred len do v.{i} <- float i done ; let s = M.subvector v ~off:2 ~len:3 in Fort.expect_equal [| 2.; 3.; 4. |] (M.to_array s) ) ;; module M = Gsl_vector.Single;; Fort.expect_pass "subvector bigarray single" (fun () -> let len = 10 in let v = M.create ~init:0. len in for i=0 to pred len do v.{i} <- float i done ; let s = M.subvector v ~off:2 ~len:3 in Fort.expect_equal [| 2.; 3.; 4. |] (M.to_array s) ) ;; module M = Gsl_vector_flat;; Fort.expect_pass "subvector flat" (fun () -> let len = 10 in let a = Array.init len (fun i -> float i) in let v = M.of_array a in let s = M.subvector v ~off:2 ~len:3 in Fort.expect_equal ~msg:"no stride" [| 2.; 3.; 4. |] (M.to_array s) ; let s2 = M.subvector ~stride:2 v ~off:1 ~len:3 in Fort.expect_equal ~msg:"with stride" [| 1.; 3.; 5. |] (M.to_array s2) ; M.set s2 0 (-1.) ; Fort.expect_equal ~msg:"sharing" (M.get s2 0) (M.get v s2.M.off) ) ;; Fort.expect_pass "view_array flat" (fun () -> let len = 10 in let a = Array.init len (fun i -> float i) in let v = M.view_array ~stride:2 ~off:3 ~len:2 a in Fort.expect_equal [| 3.; 5.; |] (M.to_array v) ; let k = v.M.off + v.M.stride in a.(k) <- -1. ; Fort.expect_equal ~msg:"sharing" (M.get v 1) a.(k) ) ;; ocamlgsl-0.6.0/ocamlgsl.info0000664000076400007640000000425710607755612014533 0ustar olivolivThis is ocamlgsl.info, produced by makeinfo version 4.8 from ocamlgsl.texi. INFO-DIR-SECTION Objective Caml START-INFO-DIR-ENTRY * ocamlgsl 0.6.0: (ocamlgsl). END-INFO-DIR-ENTRY This file was generated by Ocamldoc using the Texinfo generator.  Indirect: ocamlgsl.info-1: 248 ocamlgsl.info-2: 183382  Tag Table: (Indirect) Node: Top248 Node: Gsl_error2469 Node: Gsl_ieee4839 Node: Gsl_math6190 Node: Gsl_complex7585 Node: Gsl_vector11627 Node: Gsl_vector/Single13647 Node: Gsl_vector_flat15318 Node: Gsl_vector_complex17383 Node: Gsl_vector_complex/Single18926 Node: Gsl_vector_complex_flat20236 Node: Gsl_matrix21976 Node: Gsl_matrix/Single23949 Node: Gsl_matrix_flat25693 Node: Gsl_matrix_complex28188 Node: Gsl_matrix_complex/Single30538 Node: Gsl_matrix_complex_flat32667 Node: Gsl_vectmat35502 Node: Gsl_blas39742 Node: Gsl_blas/Single43267 Node: Gsl_blas/Complex46892 Node: Gsl_blas/Complex_Single51582 Node: Gsl_blas_flat56745 Node: Gsl_blas_flat/Complex60130 Node: Gsl_blas_gen65154 Node: Gsl_blas_gen/Complex68427 Node: Gsl_fun72842 Node: Gsl_permut74683 Node: Gsl_sort75769 Node: Gsl_linalg76922 Node: Gsl_eigen89904 Node: Gsl_poly93349 Node: Gsl_interp94496 Node: Gsl_rng96282 Node: Gsl_qrng98634 Node: Gsl_randist99245 Node: Gsl_integration105479 Node: Gsl_fit108470 Node: Gsl_multifit109276 Node: Gsl_multifit_nlin110376 Node: Gsl_root111288 Node: Gsl_root/Bracket112008 Node: Gsl_root/Polish112495 Node: Gsl_multiroot112921 Node: Gsl_multiroot/NoDeriv113399 Node: Gsl_multiroot/Deriv114170 Node: Gsl_min114973 Node: Gsl_multimin115615 Node: Gsl_multimin/Deriv116088 Node: Gsl_multimin/NoDeriv116833 Node: Gsl_diff117440 Node: Gsl_cheb117872 Node: Gsl_sum118479 Node: Gsl_sum/Trunc119052 Node: Gsl_fft119439 Node: Gsl_fft/Real120374 Node: Gsl_fft/Halfcomplex120953 Node: Gsl_fft/Complex121906 Node: Gsl_monte123172 Node: Gsl_siman125563 Node: Gsl_odeiv126563 Node: Gsl_histo128534 Node: Gsl_stats130649 Node: Gsl_wavelet132279 Node: Gsl_bspline134060 Node: Gsl_const134636 Node: Gsl_sf143506 Node: Gsl_cdf166160 Node: Types index171783 Node: Exceptions index183080 Node: Values index183382 Node: Modules index331801  End Tag Table ocamlgsl-0.6.0/ocamlgsl.info-10000664000076400007640000054612610607755612014677 0ustar olivolivThis is ocamlgsl.info, produced by makeinfo version 4.8 from ocamlgsl.texi. INFO-DIR-SECTION Objective Caml START-INFO-DIR-ENTRY * ocamlgsl 0.6.0: (ocamlgsl). END-INFO-DIR-ENTRY This file was generated by Ocamldoc using the Texinfo generator.  File: ocamlgsl.info, Node: Top, Up: (dir) ocamlgsl 0.6.0 ************** Documentation for ocamlgsl 0.6.0 * Menu: * Gsl_error:: Module * Gsl_ieee:: Module * Gsl_math:: Module * Gsl_complex:: Module * Gsl_vector:: Module * Gsl_vector_flat:: Module * Gsl_vector_complex:: Module * Gsl_vector_complex_flat:: Module * Gsl_matrix:: Module * Gsl_matrix_flat:: Module * Gsl_matrix_complex:: Module * Gsl_matrix_complex_flat:: Module * Gsl_vectmat:: Module * Gsl_blas:: Module * Gsl_blas_flat:: Module * Gsl_blas_gen:: Module * Gsl_fun:: Module * Gsl_permut:: Module * Gsl_sort:: Module * Gsl_linalg:: Module * Gsl_eigen:: Module * Gsl_poly:: Module * Gsl_interp:: Module * Gsl_rng:: Module * Gsl_qrng:: Module * Gsl_randist:: Module * Gsl_integration:: Module * Gsl_fit:: Module * Gsl_multifit:: Module * Gsl_multifit_nlin:: Module * Gsl_root:: Module * Gsl_multiroot:: Module * Gsl_min:: Module * Gsl_multimin:: Module * Gsl_diff:: Module * Gsl_cheb:: Module * Gsl_sum:: Module * Gsl_fft:: Module * Gsl_monte:: Module * Gsl_siman:: Module * Gsl_odeiv:: Module * Gsl_histo:: Module * Gsl_stats:: Module * Gsl_wavelet:: Module * Gsl_bspline:: Module * Gsl_const:: Module * Gsl_sf:: Module * Gsl_cdf:: Module Indices : * Types index:: * Exceptions index:: * Values index:: * Modules index::  File: ocamlgsl.info, Node: Gsl_error, Next: Gsl_ieee, Prev: Top, Up: Top 1 Module `Gsl_error' ******************** 1.1 Description =============== Error reporting 1.2 Interface ============= - val version : string version of GSL library - type errno = | CONTINUE (* iteration has not converged *) | FAILURE | EDOM (* input domain error, e.g sqrt(-1) *) | ERANGE (* output range error, e.g. exp(1e100) *) | EFAULT (* invalid pointer *) | EINVAL (* invalid argument supplied by user *) | EFAILED (* generic failure *) | EFACTOR (* factorization failed *) | ESANITY (* sanity check failed - shouldn't happen *) | ENOMEM (* malloc failed *) | EBADFUNC (* problem with user-supplied function *) | ERUNAWAY (* iterative process is out of control *) | EMAXITER (* exceeded max number of iterations *) | EZERODIV (* tried to divide by zero *) | EBADTOL (* user specified an invalid tolerance *) | ETOL (* failed to reach the specified tolerance *) | EUNDRFLW (* underflow *) | EOVRFLW (* overflow *) | ELOSS (* loss of accuracy *) | EROUND (* failed because of roundoff error *) | EBADLEN (* matrix, vector lengths are not conformant *) | ENOTSQR (* matrix not square *) | ESING (* apparent singularity detected *) | EDIVERGE (* integral or series is divergent *) | EUNSUP (* requested feature is not supported by the hardware *) | EUNIMPL (* requested feature not (yet) implemented *) | ECACHE (* cache limit exceeded *) | ETABLE (* table limit exceeded *) | ENOPROG (* iteration is not making progress towards solution *) | ENOPROGJ (* jacobian evaluations are not improving the solution *) | ETOLF (* cannot reach the specified tolerance in F *) | ETOLX (* cannot reach the specified tolerance in X *) | ETOLG (* cannot reach the specified tolerance in gradient *) | EOF (* end of file *) - exception Gsl_exn of (Gsl_error.errno * string) - val init : unit -> unit - val uninit : unit -> unit - val strerror : errno -> string - val string_of_errno : errno -> string - val pprint_exn : exn -> string - val handle_exn : ('a -> 'b) -> 'a -> 'b  File: ocamlgsl.info, Node: Gsl_ieee, Next: Gsl_math, Prev: Gsl_error, Up: Top 2 Module `Gsl_ieee' ******************* 2.1 Description =============== IEEE floating-point arithmetic 2.2 Interface ============= 2.2.1 Representation of floating point numbers ---------------------------------------------- - type ieee_type = | NAN | INF | NORMAL | DENORMAL | ZERO - type float_rep = { sign : int ; mantissa : string ; exponent : int ; ieee_type : Gsl_ieee.ieee_type ; } - val rep_of_float : float -> float_rep - val print : float -> string 2.2.2 IEEE environment ---------------------- - type precision = | SINGLE | DOUBLE | EXTENDED - type rounding = | TO_NEAREST | DOWN | UP | TO_ZERO - type exceptions = | MASK_INVALID | MASK_DENORMALIZED | MASK_DIVISION_BY_ZERO | MASK_OVERFLOW | MASK_UNDERFLOW | MASK_ALL | TRAP_INEXACT - val set_mode : ?precision:precision -> ?rounding:rounding -> exceptions list -> unit - val env_setup : unit -> unit 2.2.3 FPU status word --------------------- - type excepts = | FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_ALL_EXCEPT - val clear_except : excepts list -> unit - val test_except : excepts list -> excepts list  File: ocamlgsl.info, Node: Gsl_math, Next: Gsl_complex, Prev: Gsl_ieee, Up: Top 3 Module `Gsl_math' ******************* 3.1 Description =============== Mathematical constants and some simple functions 3.2 Interface ============= 3.2.1 Constants --------------- - val e : float e - val log2e : float log_2 (e) - val log10e : float log_10 (e) - val sqrt2 : float sqrt(2) - val sqrt1_2 : float sqrt(1/2) - val sqrt3 : float sqrt(3) - val pi : float pi - val pi_2 : float pi/2 - val pi_4 : float pi/4 - val sqrtpi : float sqrt(pi) - val i_2_sqrtpi : float 2/sqrt(pi) - val i_1_pi : float 1/pi - val i_2_pi : float 2/pi - val ln10 : float ln(10) - val ln2 : float ln(2) - val lnpi : float ln(pi) - val euler : float Euler constant 3.2.2 Simple Functions ---------------------- - val pow_int : float -> int -> float - val log1p : float -> float - val expm1 : float -> float - val hypot : float -> float -> float - val acosh : float -> float - val asinh : float -> float - val atanh : float -> float - val fcmp : float -> float -> epsilon:float -> int  File: ocamlgsl.info, Node: Gsl_complex, Next: Gsl_vector, Prev: Gsl_math, Up: Top 4 Module `Gsl_complex' ********************** 4.1 Description =============== Complex arithmetic and simple functions 4.2 Interface ============= - type complex = Complex.t = { re : float ; im : float ; } - val complex : re:float -> im:float -> complex - type complex_array = float array - val set : complex_array -> int -> complex -> unit - val get : complex_array -> int -> complex - val unpack : complex_array -> complex array - val pack : complex array -> complex_array - val mult : complex_array -> complex_array -> unit - val rect : float -> float -> complex - val polar : float -> float -> complex 4.2.0.1 Properties of complex numbers ..................................... - val arg : complex -> float - val abs : complex -> float - val abs2 : complex -> float - val logabs : complex -> float 4.2.0.2 Complex arithmetic operators .................................... - val add : complex -> complex -> complex - val sub : complex -> complex -> complex - val mul : complex -> complex -> complex - val div : complex -> complex -> complex - val add_real : complex -> float -> complex - val sub_real : complex -> float -> complex - val mul_real : complex -> float -> complex - val div_real : complex -> float -> complex - val add_imag : complex -> float -> complex - val sub_imag : complex -> float -> complex - val mul_imag : complex -> float -> complex - val div_imag : complex -> float -> complex - val conjugate : complex -> complex - val inverse : complex -> complex - val negative : complex -> complex 4.2.0.3 Elementary complex functions .................................... - val sqrt : complex -> complex - val sqrt_real : float -> complex - val pow : complex -> complex -> complex - val pow_real : complex -> float -> complex - val exp : complex -> complex - val log : complex -> complex - val log10 : complex -> complex - val log_b : complex -> complex -> complex 4.2.0.4 Complex trigonometric functions ....................................... - val sin : complex -> complex - val cos : complex -> complex - val tan : complex -> complex - val sec : complex -> complex - val csc : complex -> complex - val cot : complex -> complex 4.2.0.5 Inverse complex trigonometric functions ............................................... - val arcsin : complex -> complex - val arcsin_real : float -> complex - val arccos : complex -> complex - val arccos_real : float -> complex - val arctan : complex -> complex - val arcsec : complex -> complex - val arcsec_real : float -> complex - val arccsc : complex -> complex - val arccsc_real : float -> complex - val arccot : complex -> complex 4.2.0.6 Complex hyperbolic functions .................................... - val sinh : complex -> complex - val cosh : complex -> complex - val tanh : complex -> complex - val sech : complex -> complex - val csch : complex -> complex - val coth : complex -> complex 4.2.0.7 Inverse complex hyperbolic functions ............................................ - val arcsinh : complex -> complex - val arccosh : complex -> complex - val arccosh_real : float -> complex - val arctanh : complex -> complex - val arctanh_real : float -> complex - val arcsech : complex -> complex - val arccsch : complex -> complex - val arccoth : complex -> complex  File: ocamlgsl.info, Node: Gsl_vector, Next: Gsl_vector_flat, Prev: Gsl_complex, Up: Top 5 Module `Gsl_vector' ********************* 5.1 Description =============== Vector of floats implemented with `Bigarray' Subparts ======== * Menu: * Single: Gsl_vector/Single. Module 5.2 Interface ============= 5.2.1 Double precision ---------------------- - type double_vector_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t - type vector = double_vector_bigarr 5.2.1.1 Operations .................. - val create : ?init:float -> int -> vector - val of_array : float array -> vector - val to_array : vector -> float array - val length : vector -> int - val get : vector -> int -> float - val set : vector -> int -> float -> unit - val set_all : vector -> float -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : src:vector -> dst:vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit - val add : vector -> vector -> unit - val sub : vector -> vector -> unit - val mul : vector -> vector -> unit - val div : vector -> vector -> unit - val scale : vector -> float -> unit - val add_constant : vector -> float -> unit - val is_null : vector -> bool - val max : vector -> float - val min : vector -> float - val minmax : vector -> float * float - val max_index : vector -> int - val min_index : vector -> int - val minmax_index : vector -> int * int 5.2.1.2 No-copy operations .......................... - val subvector : vector -> off:int -> len:int -> vector 5.2.2 Single precision ---------------------- - module Single *Note Module Single: Gsl_vector/Single.  File: ocamlgsl.info, Node: Gsl_vector/Single, Up: Gsl_vector 5.3 Module `Gsl_vector.Single' ============================== 5.3.1 Interface --------------- - type float_vector_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t - type vector = float_vector_bigarr - val create : ?init:float -> int -> vector - val of_array : float array -> vector - val to_array : vector -> float array - val length : vector -> int - val get : vector -> int -> float - val set : vector -> int -> float -> unit - val set_all : vector -> float -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : src:vector -> dst:vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit - val add : vector -> vector -> unit - val sub : vector -> vector -> unit - val mul : vector -> vector -> unit - val div : vector -> vector -> unit - val scale : vector -> float -> unit - val add_constant : vector -> float -> unit - val is_null : vector -> bool - val max : vector -> float - val min : vector -> float - val minmax : vector -> float * float - val max_index : vector -> int - val min_index : vector -> int - val minmax_index : vector -> int * int 5.3.1.1 No-copy operations .......................... - val subvector : vector -> off:int -> len:int -> vector  File: ocamlgsl.info, Node: Gsl_vector_flat, Next: Gsl_vector_complex, Prev: Gsl_vector, Up: Top 6 Module `Gsl_vector_flat' ************************** 6.1 Description =============== Vector of floats implemented with a `float array' 6.2 Interface ============= - type double_vector_flat = private { data : float array ; off : int ; len : int ; stride : int ; } - type vector = double_vector_flat - val check : vector -> vector *Raises* `Failure' if `off', `len' or `stride' designate an invalid subvector of `data' 6.2.1 Operations ---------------- - val create : ?init:float -> int -> vector - val of_array : float array -> vector - val to_array : vector -> float array - val length : vector -> int - val get : vector -> int -> float - val set : vector -> int -> float -> unit - val set_all : vector -> float -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : src:vector -> dst:vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit - val add : vector -> vector -> unit - val sub : vector -> vector -> unit - val mul : vector -> vector -> unit - val div : vector -> vector -> unit - val scale : vector -> float -> unit - val add_constant : vector -> float -> unit - val is_null : vector -> bool - val max : vector -> float - val min : vector -> float - val minmax : vector -> float * float - val max_index : vector -> int - val min_index : vector -> int - val minmax_index : vector -> int * int 6.2.2 No-copy operations ------------------------ - val subvector : ?stride:int -> vector -> off:int -> len:int -> vector - val view_array : ?stride:int -> ?off:int -> ?len:int -> float array -> vector  File: ocamlgsl.info, Node: Gsl_vector_complex, Next: Gsl_vector_complex_flat, Prev: Gsl_vector_flat, Up: Top 7 Module `Gsl_vector_complex' ***************************** 7.1 Description =============== Vector of complex numbers implemented with a `Bigarray' Subparts ======== * Menu: * Single: Gsl_vector_complex/Single. Module 7.2 Interface ============= - type complex_double_vector_bigarr = (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout) Bigarray.Array1.t - type vector = complex_double_vector_bigarr - val create : ?init:Gsl_complex.complex -> int -> vector - val of_array : Gsl_complex.complex array -> vector - val to_array : vector -> Gsl_complex.complex array - val of_complex_array : Gsl_complex.complex_array -> vector - val to_complex_array : vector -> Gsl_complex.complex_array - val length : vector -> int - val get : vector -> int -> Gsl_complex.complex - val set : vector -> int -> Gsl_complex.complex -> unit - val set_all : vector -> Gsl_complex.complex -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : src:vector -> dst:vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit - val subvector : vector -> off:int -> len:int -> vector - module Single *Note Module Single: Gsl_vector_complex/Single.  File: ocamlgsl.info, Node: Gsl_vector_complex/Single, Up: Gsl_vector_complex 7.3 Module `Gsl_vector_complex.Single' ====================================== 7.3.1 Interface --------------- - type complex_float_vector_bigarr = (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout) Bigarray.Array1.t - type vector = complex_float_vector_bigarr - val create : ?init:Gsl_complex.complex -> int -> vector - val of_array : Gsl_complex.complex array -> vector - val to_array : vector -> Gsl_complex.complex array - val of_complex_array : Gsl_complex.complex_array -> vector - val to_complex_array : vector -> Gsl_complex.complex_array - val length : vector -> int - val get : vector -> int -> Gsl_complex.complex - val set : vector -> int -> Gsl_complex.complex -> unit - val set_all : vector -> Gsl_complex.complex -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : src:vector -> dst:vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit - val subvector : vector -> off:int -> len:int -> vector  File: ocamlgsl.info, Node: Gsl_vector_complex_flat, Next: Gsl_matrix, Prev: Gsl_vector_complex, Up: Top 8 Module `Gsl_vector_complex_flat' ********************************** 8.1 Description =============== Vector of complex numbers implemented with a `float array' 8.2 Interface ============= - type complex_vector_flat = private { data : float array ; off : int ; len : int ; stride : int ; } - type vector = complex_vector_flat 8.2.1 Operations ---------------- - val create : ?init:Gsl_complex.complex -> int -> vector - val of_array : Gsl_complex.complex array -> vector - val to_array : vector -> Gsl_complex.complex array - val of_complex_array : Gsl_complex.complex_array -> vector - val to_complex_array : vector -> Gsl_complex.complex_array - val length : vector -> int - val get : vector -> int -> Gsl_complex.complex - val set : vector -> int -> Gsl_complex.complex -> unit - val set_all : vector -> Gsl_complex.complex -> unit - val set_zero : vector -> unit - val set_basis : vector -> int -> unit - val memcpy : vector -> vector -> unit - val copy : vector -> vector - val swap_element : vector -> int -> int -> unit - val reverse : vector -> unit 8.2.2 No-copy operations ------------------------ - val subvector : ?stride:int -> vector -> off:int -> len:int -> vector - val view_complex_array : ?stride:int -> ?off:int -> ?len:int -> Gsl_complex.complex_array -> vector - val real : vector -> Gsl_vector_flat.vector - val imag : vector -> Gsl_vector_flat.vector  File: ocamlgsl.info, Node: Gsl_matrix, Next: Gsl_matrix_flat, Prev: Gsl_vector_complex_flat, Up: Top 9 Module `Gsl_matrix' ********************* 9.1 Description =============== Matrices of floats implemented with `Bigarray' Subparts ======== * Menu: * Single: Gsl_matrix/Single. Module 9.2 Interface ============= - type double_mat_bigarr = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t - type matrix = double_mat_bigarr - val create : ?init:float -> int -> int -> matrix - val dims : matrix -> int * int - val of_array : float array -> int -> int -> matrix - val of_arrays : float array array -> matrix - val to_array : matrix -> float array - val to_arrays : matrix -> float array array - val get : matrix -> int -> int -> float - val set : matrix -> int -> int -> float -> unit - val set_all : matrix -> float -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val row : matrix -> int -> Gsl_vector.vector - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> float -> unit - val add_constant : matrix -> float -> unit - val add_diagonal : matrix -> float -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit - module Single *Note Module Single: Gsl_matrix/Single.  File: ocamlgsl.info, Node: Gsl_matrix/Single, Up: Gsl_matrix 9.3 Module `Gsl_matrix.Single' ============================== 9.3.1 Interface --------------- - type float_mat_bigarr = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array2.t - type matrix = float_mat_bigarr - val create : ?init:float -> int -> int -> matrix - val dims : matrix -> int * int - val of_array : float array -> int -> int -> matrix - val of_arrays : float array array -> matrix - val to_array : matrix -> float array - val to_arrays : matrix -> float array array - val get : matrix -> int -> int -> float - val set : matrix -> int -> int -> float -> unit - val set_all : matrix -> float -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val row : matrix -> int -> Gsl_vector.Single.vector - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> float -> unit - val add_constant : matrix -> float -> unit - val add_diagonal : matrix -> float -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit  File: ocamlgsl.info, Node: Gsl_matrix_flat, Next: Gsl_matrix_complex, Prev: Gsl_matrix, Up: Top 10 Module `Gsl_matrix_flat' *************************** 10.1 Description ================ Matrices of floats implemented with `float array' 10.2 Interface ============== - type double_mat_flat = private { data : float array ; off : int ; dim1 : int ; dim2 : int ; tda : int ; } - type matrix = double_mat_flat - val create : ?init:float -> int -> int -> matrix - val dims : matrix -> int * int - val of_array : float array -> int -> int -> matrix - val of_arrays : float array array -> matrix - val to_array : matrix -> float array - val to_arrays : matrix -> float array array - val to_array : matrix -> float array - val get : matrix -> int -> int -> float - val set : matrix -> int -> int -> float -> unit - val set_all : matrix -> float -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> float -> unit - val add_constant : matrix -> float -> unit - val add_diagonal : matrix -> float -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit - val submatrix : matrix -> k1:int -> k2:int -> n1:int -> n2:int -> matrix - val row : matrix -> int -> Gsl_vector_flat.vector - val column : matrix -> int -> Gsl_vector_flat.vector - val diagonal : matrix -> Gsl_vector_flat.vector - val subdiagonal : matrix -> int -> Gsl_vector_flat.vector - val superdiagonal : matrix -> int -> Gsl_vector_flat.vector - val view_array : float array -> ?off:int -> int -> ?tda:int -> int -> matrix - val view_vector : Gsl_vector_flat.vector -> ?off:int -> int -> ?tda:int -> int -> matrix  File: ocamlgsl.info, Node: Gsl_matrix_complex, Next: Gsl_matrix_complex_flat, Prev: Gsl_matrix_flat, Up: Top 11 Module `Gsl_matrix_complex' ****************************** 11.1 Description ================ Matrices of complex numbers implemented with `Bigarray' Subparts ======== * Menu: * Single: Gsl_matrix_complex/Single. Module 11.2 Interface ============== - type complex_mat_bigarr = (Complex.t, Bigarray.complex64_elt, Bigarray.c_layout) Bigarray.Array2.t - type matrix = complex_mat_bigarr - val create : ?init:Gsl_complex.complex -> int -> int -> matrix - val dims : matrix -> int * int - val of_array : Gsl_complex.complex array -> int -> int -> matrix - val of_arrays : Gsl_complex.complex array array -> matrix - val to_array : matrix -> Gsl_complex.complex array - val to_arrays : matrix -> Gsl_complex.complex array array - val of_complex_array : Gsl_complex.complex_array -> int -> int -> matrix - val to_complex_array : matrix -> Gsl_complex.complex_array - val get : matrix -> int -> int -> Gsl_complex.complex - val set : matrix -> int -> int -> Gsl_complex.complex -> unit - val set_all : matrix -> Gsl_complex.complex -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val row : matrix -> int -> Gsl_vector_complex.vector - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> Gsl_complex.complex -> unit - val add_constant : matrix -> Gsl_complex.complex -> unit - val add_diagonal : matrix -> Gsl_complex.complex -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit - module Single *Note Module Single: Gsl_matrix_complex/Single.  File: ocamlgsl.info, Node: Gsl_matrix_complex/Single, Up: Gsl_matrix_complex 11.3 Module `Gsl_matrix_complex.Single' ======================================= 11.3.1 Interface ---------------- - type complex_float_mat_bigarr = (Complex.t, Bigarray.complex32_elt, Bigarray.c_layout) Bigarray.Array2.t - type matrix = complex_float_mat_bigarr - val create : ?init:Gsl_complex.complex -> int -> int -> matrix - val dims : matrix -> int * int - val of_array : Gsl_complex.complex array -> int -> int -> matrix - val of_arrays : Gsl_complex.complex array array -> matrix - val to_array : matrix -> Gsl_complex.complex array - val to_arrays : matrix -> Gsl_complex.complex array array - val of_complex_array : Gsl_complex.complex_array -> int -> int -> matrix - val to_complex_array : matrix -> Gsl_complex.complex_array - val get : matrix -> int -> int -> Gsl_complex.complex - val set : matrix -> int -> int -> Gsl_complex.complex -> unit - val set_all : matrix -> Gsl_complex.complex -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val row : matrix -> int -> Gsl_vector_complex.Single.vector - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> Gsl_complex.complex -> unit - val add_constant : matrix -> Gsl_complex.complex -> unit - val add_diagonal : matrix -> Gsl_complex.complex -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit  File: ocamlgsl.info, Node: Gsl_matrix_complex_flat, Next: Gsl_vectmat, Prev: Gsl_matrix_complex, Up: Top 12 Module `Gsl_matrix_complex_flat' *********************************** 12.1 Description ================ Matrices of complex number simplemented with `float array' 12.2 Interface ============== - type complex_mat_flat = private { data : float array ; off : int ; dim1 : int ; dim2 : int ; tda : int ; } - type matrix = complex_mat_flat - val create : ?init:Gsl_complex.complex -> int -> int -> matrix - val dims : matrix -> int * int - val of_arrays : Gsl_complex.complex array array -> matrix - val of_array : Gsl_complex.complex array -> int -> int -> matrix - val to_arrays : matrix -> Gsl_complex.complex array array - val to_array : matrix -> Gsl_complex.complex array - val of_complex_array : float array -> int -> int -> matrix - val to_complex_array : matrix -> Gsl_complex.complex_array - val get : matrix -> int -> int -> Gsl_complex.complex - val set : matrix -> int -> int -> Gsl_complex.complex -> unit - val set_all : matrix -> Gsl_complex.complex -> unit - val set_zero : matrix -> unit - val set_id : matrix -> unit - val memcpy : src:matrix -> dst:matrix -> unit - val copy : matrix -> matrix - val add : matrix -> matrix -> unit - val sub : matrix -> matrix -> unit - val mul_elements : matrix -> matrix -> unit - val div_elements : matrix -> matrix -> unit - val scale : matrix -> float -> unit - val add_constant : matrix -> float -> unit - val add_diagonal : matrix -> Gsl_complex.complex -> unit - val is_null : matrix -> bool - val swap_rows : matrix -> int -> int -> unit - val swap_columns : matrix -> int -> int -> unit - val swap_rowcol : matrix -> int -> int -> unit - val transpose : matrix -> matrix -> unit - val transpose_in_place : matrix -> unit - val submatrix : matrix -> k1:int -> k2:int -> n1:int -> n2:int -> matrix - val row : matrix -> int -> Gsl_vector_complex_flat.vector - val column : matrix -> int -> Gsl_vector_complex_flat.vector - val diagonal : matrix -> Gsl_vector_complex_flat.vector - val subdiagonal : matrix -> int -> Gsl_vector_complex_flat.vector - val superdiagonal : matrix -> int -> Gsl_vector_complex_flat.vector - val view_complex_array : Gsl_complex.complex_array -> ?off:int -> int -> ?tda:int -> int -> matrix - val view_vector : Gsl_vector_complex_flat.vector -> ?off:int -> int -> ?tda:int -> int -> matrix  File: ocamlgsl.info, Node: Gsl_vectmat, Next: Gsl_blas, Prev: Gsl_matrix_complex_flat, Up: Top 13 Module `Gsl_vectmat' *********************** 13.1 Description ================ Generic variant types for vectors and matrices 13.2 Interface ============== 13.2.1 Real values ------------------ - type vec = [ `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] - val vec_convert : ?protect:bool -> [< `A of float array | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> [> vec ] - type mat = [ `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] - val mat_convert : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> [> mat ] - val mat_flat : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_matrix_flat.matrix 13.2.2 Complex values --------------------- - type cvec = [ `CV of Gsl_vector_complex.vector | `CVF of Gsl_vector_complex_flat.vector ] - type cmat = [ `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] - val cmat_convert : ?protect:bool -> [< `CA of Gsl_complex.complex_array * int * int | `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] -> [> cmat ] 13.2.3 Generic vector operations -------------------------------- - val length : [< `CV of Gsl_vector_complex.vector | `CVF of Gsl_vector_complex_flat.vector | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> int - val to_array : [< vec ] -> float array - val v_copy : [< vec ] -> [> vec ] - val subvector : [< vec ] -> off:int -> len:int -> [> vec ] - val v_memcpy : [< vec ] -> [< vec ] -> unit - val v_add : [< vec ] -> [< vec ] -> unit - val v_sub : [< vec ] -> [< vec ] -> unit - val v_mul : [< vec ] -> [< vec ] -> unit - val v_div : [< vec ] -> [< vec ] -> unit - val v_max : [< vec ] -> float - val v_min : [< vec ] -> float - val v_minmax : [< vec ] -> float * float - val v_max_index : [< vec ] -> int - val v_min_index : [< vec ] -> int - val v_minmax_index : [< vec ] -> int * int 13.2.4 Generic matrix operations -------------------------------- - val dims : [< `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> int * int - val tmp : [< mat ] -> [> `M of Gsl_matrix.matrix ] - val to_arrays : [< mat ] -> float array array - val m_copy : [< mat ] -> [> mat ] - val m_memcpy : [< mat ] -> [< mat ] -> unit - val m_add : [< mat ] -> [< mat ] -> unit - val m_sub : [< mat ] -> [< mat ] -> unit - val m_mul : [< mat ] -> [< mat ] -> unit - val m_div : [< mat ] -> [< mat ] -> unit - val m_add_diagonal : [< mat ] -> float -> unit - val swap_rows : [< mat ] -> int -> int -> unit - val swap_columns : [< mat ] -> int -> int -> unit - val swap_rowcol : [< mat ] -> int -> int -> unit - val transpose : [< mat ] -> [< mat ] -> unit - val transpose_in_place : [< mat ] -> unit 13.2.5 Other generic operations ------------------------------- - val is_null : [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> bool - val scale : [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> float -> unit - val add_constant : [< `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> float -> unit  File: ocamlgsl.info, Node: Gsl_blas, Next: Gsl_blas_flat, Prev: Gsl_vectmat, Up: Top 14 Module `Gsl_blas' ******************** 14.1 Description ================ BLAS support Subparts ======== * Menu: * Single: Gsl_blas/Single. Module * Complex: Gsl_blas/Complex. Module * Complex_Single: Gsl_blas/Complex_Single. Module 14.2 Interface ============== - type order = | RowMajor | ColMajor - type transpose = | NoTrans | Trans | ConjTrans - type uplo = | Upper | Lower - type diag = | NonUnit | Unit - type side = | Left | Right 14.2.1 LEVEL 1 -------------- - val dot : Gsl_vector.vector -> Gsl_vector.vector -> float - val nrm2 : Gsl_vector.vector -> float - val asum : Gsl_vector.vector -> float - val iamax : Gsl_vector.vector -> int - val swap : Gsl_vector.vector -> Gsl_vector.vector -> unit - val copy : Gsl_vector.vector -> Gsl_vector.vector -> unit - val axpy : float -> Gsl_vector.vector -> Gsl_vector.vector -> unit - val rot : Gsl_vector.vector -> Gsl_vector.vector -> float -> float -> unit - val scal : float -> Gsl_vector.vector -> unit 14.2.2 LEVEL 2 -------------- - val gemv : transpose -> alpha:float -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit - val trmv : uplo -> transpose -> diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit - val trsv : uplo -> transpose -> diag -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> unit - val symv : uplo -> alpha:float -> a:Gsl_matrix.matrix -> x:Gsl_vector.vector -> beta:float -> y:Gsl_vector.vector -> unit - val dger : alpha:float -> x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit - val syr : uplo -> alpha:float -> x:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit - val syr2 : uplo -> alpha:float -> x:Gsl_vector.vector -> y:Gsl_vector.vector -> a:Gsl_matrix.matrix -> unit 14.2.3 LEVEL 3 -------------- - val gemm : ta:transpose -> tb:transpose -> alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit - val symm : side -> uplo -> alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit - val trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit - val trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> unit - val syrk : uplo -> transpose -> alpha:float -> a:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit - val syr2k : uplo -> transpose -> alpha:float -> a:Gsl_matrix.matrix -> b:Gsl_matrix.matrix -> beta:float -> c:Gsl_matrix.matrix -> unit 14.2.4 Single precision ----------------------- - module Single *Note Module Single: Gsl_blas/Single. 14.2.5 Complex -------------- - module Complex *Note Module Complex: Gsl_blas/Complex. 14.2.6 Complex single precision ------------------------------- - module Complex_Single *Note Module Complex_Single: Gsl_blas/Complex_Single.  File: ocamlgsl.info, Node: Gsl_blas/Single, Next: Gsl_blas/Complex, Up: Gsl_blas 14.3 Module `Gsl_blas.Single' ============================= 14.3.1 Interface ---------------- 14.3.1.1 LEVEL 1 ................ - val sdsdot : alpha:float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float - val dsdot : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float - val dot : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float - val nrm2 : Gsl_vector.Single.vector -> float - val asum : Gsl_vector.Single.vector -> float - val iamax : Gsl_vector.Single.vector -> int - val swap : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit - val copy : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit - val axpy : float -> Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> unit - val rot : Gsl_vector.Single.vector -> Gsl_vector.Single.vector -> float -> float -> unit - val scal : float -> Gsl_vector.Single.vector -> unit 14.3.1.2 LEVEL 2 ................ - val gemv : Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> beta:float -> y:Gsl_vector.Single.vector -> unit - val trmv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit - val trsv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> unit - val symv : Gsl_blas.uplo -> alpha:float -> a:Gsl_matrix.Single.matrix -> x:Gsl_vector.Single.vector -> beta:float -> y:Gsl_vector.Single.vector -> unit - val dger : alpha:float -> x:Gsl_vector.Single.vector -> y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit - val syr : Gsl_blas.uplo -> alpha:float -> x:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit - val syr2 : Gsl_blas.uplo -> alpha:float -> x:Gsl_vector.Single.vector -> y:Gsl_vector.Single.vector -> a:Gsl_matrix.Single.matrix -> unit 14.3.1.3 LEVEL 3 ................ - val gemm : ta:Gsl_blas.transpose -> tb:Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> beta:float -> c:Gsl_matrix.Single.matrix -> unit - val symm : Gsl_blas.side -> Gsl_blas.uplo -> alpha:float -> a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> beta:float -> c:Gsl_matrix.Single.matrix -> unit - val syrk : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix.Single.matrix -> beta:float -> c:Gsl_matrix.Single.matrix -> unit - val syr2k : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> beta:float -> c:Gsl_matrix.Single.matrix -> unit - val trmm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:float -> a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit - val trsm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:float -> a:Gsl_matrix.Single.matrix -> b:Gsl_matrix.Single.matrix -> unit  File: ocamlgsl.info, Node: Gsl_blas/Complex, Next: Gsl_blas/Complex_Single, Prev: Gsl_blas/Single, Up: Gsl_blas 14.4 Module `Gsl_blas.Complex' ============================== 14.4.1 Interface ---------------- 14.4.1.1 LEVEL 1 ................ - val dotu : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> Gsl_complex.complex - val dotc : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> Gsl_complex.complex - val nrm2 : Gsl_vector_complex.vector -> float - val asum : Gsl_vector_complex.vector -> float - val iamax : Gsl_vector_complex.vector -> int - val swap : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit - val copy : Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit - val axpy : Gsl_complex.complex -> Gsl_vector_complex.vector -> Gsl_vector_complex.vector -> unit - val scal : Gsl_complex.complex -> Gsl_vector_complex.vector -> unit - val zdscal : float -> Gsl_vector_complex.vector -> unit 14.4.1.2 LEVEL 2 ................ - val gemv : Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit - val trmv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit - val trsv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> unit - val hemv : Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> x:Gsl_vector_complex.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex.vector -> unit - val geru : alpha:Gsl_complex.complex -> x:Gsl_vector_complex.vector -> y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit - val gerc : alpha:Gsl_complex.complex -> x:Gsl_vector_complex.vector -> y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit - val her : Gsl_blas.uplo -> alpha:float -> x:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit - val her2 : Gsl_blas.uplo -> alpha:Gsl_complex.complex -> x:Gsl_vector_complex.vector -> y:Gsl_vector_complex.vector -> a:Gsl_matrix_complex.matrix -> unit 14.4.1.3 LEVEL 3 ................ - val gemm : ta:Gsl_blas.transpose -> tb:Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit - val symm : Gsl_blas.side -> Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit - val syrk : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit - val syr2k : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit - val trmm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit - val trsm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> unit - val hemm : Gsl_blas.side -> Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.matrix -> unit - val herk : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix_complex.matrix -> beta:float -> c:Gsl_matrix_complex.matrix -> unit - val her2k : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.matrix -> b:Gsl_matrix_complex.matrix -> beta:float -> c:Gsl_matrix_complex.matrix -> unit  File: ocamlgsl.info, Node: Gsl_blas/Complex_Single, Prev: Gsl_blas/Complex, Up: Gsl_blas 14.5 Module `Gsl_blas.Complex_Single' ===================================== 14.5.1 Interface ---------------- 14.5.1.1 LEVEL 1 ................ - val dotu : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> Gsl_complex.complex - val dotc : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> Gsl_complex.complex - val nrm2 : Gsl_vector_complex.Single.vector -> float - val asum : Gsl_vector_complex.Single.vector -> float - val iamax : Gsl_vector_complex.Single.vector -> int - val swap : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit - val copy : Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit - val axpy : Gsl_complex.complex -> Gsl_vector_complex.Single.vector -> Gsl_vector_complex.Single.vector -> unit - val scal : Gsl_complex.complex -> Gsl_vector_complex.Single.vector -> unit - val csscal : float -> Gsl_vector_complex.Single.vector -> unit 14.5.1.2 LEVEL 2 ................ - val gemv : Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> x:Gsl_vector_complex.Single.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit - val trmv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix_complex.Single.matrix -> x:Gsl_vector_complex.Single.vector -> unit - val trsv : Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> a:Gsl_matrix_complex.Single.matrix -> x:Gsl_vector_complex.Single.vector -> unit - val hemv : Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> x:Gsl_vector_complex.Single.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex.Single.vector -> unit - val geru : alpha:Gsl_complex.complex -> x:Gsl_vector_complex.Single.vector -> y:Gsl_vector_complex.Single.vector -> a:Gsl_matrix_complex.Single.matrix -> unit - val gerc : alpha:Gsl_complex.complex -> x:Gsl_vector_complex.Single.vector -> y:Gsl_vector_complex.Single.vector -> a:Gsl_matrix_complex.Single.matrix -> unit - val her : Gsl_blas.uplo -> alpha:float -> x:Gsl_vector_complex.Single.vector -> a:Gsl_matrix_complex.Single.matrix -> unit - val her2 : Gsl_blas.uplo -> alpha:Gsl_complex.complex -> x:Gsl_vector_complex.Single.vector -> y:Gsl_vector_complex.Single.vector -> a:Gsl_matrix_complex.Single.matrix -> unit 14.5.1.3 LEVEL 3 ................ - val gemm : ta:Gsl_blas.transpose -> tb:Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit - val symm : Gsl_blas.side -> Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit - val syrk : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit - val syr2k : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit - val trmm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> unit - val trsm : Gsl_blas.side -> Gsl_blas.uplo -> Gsl_blas.transpose -> Gsl_blas.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> unit - val hemm : Gsl_blas.side -> Gsl_blas.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex.Single.matrix -> unit - val herk : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:float -> a:Gsl_matrix_complex.Single.matrix -> beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit - val her2k : Gsl_blas.uplo -> Gsl_blas.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex.Single.matrix -> b:Gsl_matrix_complex.Single.matrix -> beta:float -> c:Gsl_matrix_complex.Single.matrix -> unit  File: ocamlgsl.info, Node: Gsl_blas_flat, Next: Gsl_blas_gen, Prev: Gsl_blas, Up: Top 15 Module `Gsl_blas_flat' ************************* Subparts ======== * Menu: * Complex: Gsl_blas_flat/Complex. Module 15.1 Interface ============== - type order = Gsl_blas.order = | RowMajor | ColMajor - type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans - type uplo = Gsl_blas.uplo = | Upper | Lower - type diag = Gsl_blas.diag = | NonUnit | Unit - type side = Gsl_blas.side = | Left | Right - val dot : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> float - val nrm2 : Gsl_vector_flat.vector -> float - val asum : Gsl_vector_flat.vector -> float - val iamax : Gsl_vector_flat.vector -> int - val swap : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit - val copy : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit - val axpy : float -> Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> unit - val rot : Gsl_vector_flat.vector -> Gsl_vector_flat.vector -> float -> float -> unit - val scal : float -> Gsl_vector_flat.vector -> unit - val gemv : transpose -> alpha:float -> a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> beta:float -> y:Gsl_vector_flat.vector -> unit - val trmv : uplo -> transpose -> diag -> a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit - val trsv : uplo -> transpose -> diag -> a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> unit - val symv : uplo -> alpha:float -> a:Gsl_matrix_flat.matrix -> x:Gsl_vector_flat.vector -> beta:float -> y:Gsl_vector_flat.vector -> unit - val dger : alpha:float -> x:Gsl_vector_flat.vector -> y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit - val syr : uplo -> alpha:float -> x:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit - val syr2 : uplo -> alpha:float -> x:Gsl_vector_flat.vector -> y:Gsl_vector_flat.vector -> a:Gsl_matrix_flat.matrix -> unit - val gemm : ta:transpose -> tb:transpose -> alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit - val symm : side -> uplo -> alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit - val trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit - val trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> unit - val syrk : uplo -> transpose -> alpha:float -> a:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit - val syr2k : uplo -> transpose -> alpha:float -> a:Gsl_matrix_flat.matrix -> b:Gsl_matrix_flat.matrix -> beta:float -> c:Gsl_matrix_flat.matrix -> unit - module Complex *Note Module Complex: Gsl_blas_flat/Complex.  File: ocamlgsl.info, Node: Gsl_blas_flat/Complex, Up: Gsl_blas_flat 15.2 Module `Gsl_blas_flat.Complex' =================================== 15.2.1 Interface ---------------- - val dotu : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> Gsl_complex.complex - val dotc : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> Gsl_complex.complex - val nrm2 : Gsl_vector_complex_flat.vector -> float - val asum : Gsl_vector_complex_flat.vector -> float - val iamax : Gsl_vector_complex_flat.vector -> int - val swap : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit - val copy : Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit - val axpy : Gsl_complex.complex -> Gsl_vector_complex_flat.vector -> Gsl_vector_complex_flat.vector -> unit - val scal : Gsl_complex.complex -> Gsl_vector_complex_flat.vector -> unit - val zdscal : float -> Gsl_vector_complex_flat.vector -> unit - val gemv : Gsl_blas_flat.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit - val trmv : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> Gsl_blas_flat.diag -> a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> unit - val trsv : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> Gsl_blas_flat.diag -> a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> unit - val hemv : Gsl_blas_flat.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> x:Gsl_vector_complex_flat.vector -> beta:Gsl_complex.complex -> y:Gsl_vector_complex_flat.vector -> unit - val geru : alpha:Gsl_complex.complex -> x:Gsl_vector_complex_flat.vector -> y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit - val gerc : alpha:Gsl_complex.complex -> x:Gsl_vector_complex_flat.vector -> y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit - val her : Gsl_blas_flat.uplo -> alpha:float -> x:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit - val her2 : Gsl_blas_flat.uplo -> alpha:Gsl_complex.complex -> x:Gsl_vector_complex_flat.vector -> y:Gsl_vector_complex_flat.vector -> a:Gsl_matrix_complex_flat.matrix -> unit - val gemm : ta:Gsl_blas_flat.transpose -> tb:Gsl_blas_flat.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit - val symm : Gsl_blas_flat.side -> Gsl_blas_flat.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit - val syrk : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit - val syr2k : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit - val trmm : Gsl_blas_flat.side -> Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> Gsl_blas_flat.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> unit - val trsm : Gsl_blas_flat.side -> Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> Gsl_blas_flat.diag -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> unit - val hemm : Gsl_blas_flat.side -> Gsl_blas_flat.uplo -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> beta:Gsl_complex.complex -> c:Gsl_matrix_complex_flat.matrix -> unit - val herk : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> alpha:float -> a:Gsl_matrix_complex_flat.matrix -> beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit - val her2k : Gsl_blas_flat.uplo -> Gsl_blas_flat.transpose -> alpha:Gsl_complex.complex -> a:Gsl_matrix_complex_flat.matrix -> b:Gsl_matrix_complex_flat.matrix -> beta:float -> c:Gsl_matrix_complex_flat.matrix -> unit  File: ocamlgsl.info, Node: Gsl_blas_gen, Next: Gsl_fun, Prev: Gsl_blas_flat, Up: Top 16 Module `Gsl_blas_gen' ************************ Subparts ======== * Menu: * Complex: Gsl_blas_gen/Complex. Module 16.1 Interface ============== - type order = Gsl_blas.order = | RowMajor | ColMajor - type transpose = Gsl_blas.transpose = | NoTrans | Trans | ConjTrans - type uplo = Gsl_blas.uplo = | Upper | Lower - type diag = Gsl_blas.diag = | NonUnit | Unit - type side = Gsl_blas.side = | Left | Right - val dot : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float - val nrm2 : [< Gsl_vectmat.vec ] -> float - val asum : [< Gsl_vectmat.vec ] -> float - val iamax : [< Gsl_vectmat.vec ] -> int - val swap : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit - val copy : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit - val axpy : float -> [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> unit - val rot : [< Gsl_vectmat.vec ] -> [< Gsl_vectmat.vec ] -> float -> float -> unit - val scal : float -> [< Gsl_vectmat.vec ] -> unit - val gemv : transpose -> alpha:float -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit - val trmv : uplo -> transpose -> diag -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit - val trsv : uplo -> transpose -> diag -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> unit - val symv : uplo -> alpha:float -> a:[< Gsl_vectmat.mat ] -> x:[< Gsl_vectmat.vec ] -> beta:float -> y:[< Gsl_vectmat.vec ] -> unit - val dger : alpha:float -> x:[< Gsl_vectmat.vec ] -> y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit - val syr : uplo -> alpha:float -> x:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit - val syr2 : uplo -> alpha:float -> x:[< Gsl_vectmat.vec ] -> y:[< Gsl_vectmat.vec ] -> a:[< Gsl_vectmat.mat ] -> unit - val gemm : ta:transpose -> tb:transpose -> alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit - val symm : side -> uplo -> alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit - val trmm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit - val trsm : side -> uplo -> transpose -> diag -> alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> unit - val syrk : uplo -> transpose -> alpha:float -> a:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit - val syr2k : uplo -> transpose -> alpha:float -> a:[< Gsl_vectmat.mat ] -> b:[< Gsl_vectmat.mat ] -> beta:float -> c:[< Gsl_vectmat.mat ] -> unit - module Complex *Note Module Complex: Gsl_blas_gen/Complex.  File: ocamlgsl.info, Node: Gsl_blas_gen/Complex, Up: Gsl_blas_gen 16.2 Module `Gsl_blas_gen.Complex' ================================== 16.2.1 Interface ---------------- - val dotu : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex - val dotc : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> Gsl_complex.complex - val nrm2 : [< Gsl_vectmat.cvec ] -> float - val asum : [< Gsl_vectmat.cvec ] -> float - val iamax : [< Gsl_vectmat.cvec ] -> int - val swap : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit - val copy : [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit - val axpy : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> [< Gsl_vectmat.cvec ] -> unit - val scal : Gsl_complex.complex -> [< Gsl_vectmat.cvec ] -> unit - val zdscal : float -> [< Gsl_vectmat.cvec ] -> unit - val gemv : Gsl_blas_gen.transpose -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit - val trmv : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> Gsl_blas_gen.diag -> a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit - val trsv : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> Gsl_blas_gen.diag -> a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> unit - val hemv : Gsl_blas_gen.uplo -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> x:[< Gsl_vectmat.cvec ] -> beta:Gsl_complex.complex -> y:[< Gsl_vectmat.cvec ] -> unit - val geru : alpha:Gsl_complex.complex -> x:[< Gsl_vectmat.cvec ] -> y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit - val gerc : alpha:Gsl_complex.complex -> x:[< Gsl_vectmat.cvec ] -> y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit - val her : Gsl_blas_gen.uplo -> alpha:float -> x:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit - val her2 : Gsl_blas_gen.uplo -> alpha:Gsl_complex.complex -> x:[< Gsl_vectmat.cvec ] -> y:[< Gsl_vectmat.cvec ] -> a:[< Gsl_vectmat.cmat ] -> unit - val gemm : ta:Gsl_blas_gen.transpose -> tb:Gsl_blas_gen.transpose -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit - val symm : Gsl_blas_gen.side -> Gsl_blas_gen.uplo -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit - val syrk : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit - val syr2k : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit - val trmm : Gsl_blas_gen.side -> Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> Gsl_blas_gen.diag -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit - val trsm : Gsl_blas_gen.side -> Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> Gsl_blas_gen.diag -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> unit - val hemm : Gsl_blas_gen.side -> Gsl_blas_gen.uplo -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> beta:Gsl_complex.complex -> c:[< Gsl_vectmat.cmat ] -> unit - val herk : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> alpha:float -> a:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit - val her2k : Gsl_blas_gen.uplo -> Gsl_blas_gen.transpose -> alpha:Gsl_complex.complex -> a:[< Gsl_vectmat.cmat ] -> b:[< Gsl_vectmat.cmat ] -> beta:float -> c:[< Gsl_vectmat.cmat ] -> unit  File: ocamlgsl.info, Node: Gsl_fun, Next: Gsl_permut, Prev: Gsl_blas_gen, Up: Top 17 Module `Gsl_fun' ******************* 17.1 Description ================ Callbacks and types for error estimates 17.2 Interface ============== 17.2.1 Types for special functions ---------------------------------- These type are used by module *Note Module Gsl_sf: 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. - val smash : result_e10 -> result 17.2.2 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 - type multi_fun = x:Gsl_vector.vector -> f:Gsl_vector.vector -> unit - type multi_fun_fdf = { multi_f : x:Gsl_vector.vector -> f:Gsl_vector.vector -> unit ; multi_df : x:Gsl_vector.vector -> j:Gsl_matrix.matrix -> unit ; multi_fdf : x:Gsl_vector.vector -> f:Gsl_vector.vector -> j:Gsl_matrix.matrix -> unit ; } - type multim_fun = x:Gsl_vector.vector -> float - type multim_fun_fdf = { multim_f : x:Gsl_vector.vector -> float ; multim_df : x:Gsl_vector.vector -> g:Gsl_vector.vector -> unit ; multim_fdf : x:Gsl_vector.vector -> g:Gsl_vector.vector -> float ; }  File: ocamlgsl.info, Node: Gsl_permut, Next: Gsl_sort, Prev: Gsl_fun, Up: Top 18 Module `Gsl_permut' ********************** 18.1 Description ================ Permutations 18.2 Interface ============== - type permut = (int, Bigarray.int_elt, Bigarray.c_layout) Bigarray.Array1.t - val of_array : int array -> permut - val to_array : permut -> int array - val init : permut -> unit - val create : int -> permut - val make : int -> permut - val swap : permut -> int -> int -> unit - val size : permut -> int - val valid : permut -> bool - val reverse : permut -> unit - val inverse : permut -> permut - val next : permut -> unit - val prev : permut -> unit - val permute : permut -> 'a array -> unit - val permute_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit - val permute_inverse : permut -> 'a array -> unit - val permute_inverse_barr : permut -> ('a, 'b, 'c) Bigarray.Array1.t -> unit  File: ocamlgsl.info, Node: Gsl_sort, Next: Gsl_linalg, Prev: Gsl_permut, Up: Top 19 Module `Gsl_sort' ******************** 19.1 Description ================ Sorting 19.2 Interface ============== - val vector : Gsl_vector.vector -> unit - val vector_index : Gsl_vector.vector -> Gsl_permut.permut - val vector_smallest : int -> Gsl_vector.vector -> float array - val vector_largest : int -> Gsl_vector.vector -> float array - val vector_smallest_index : int -> Gsl_vector.vector -> Gsl_permut.permut - val vector_largest_index : int -> Gsl_vector.vector -> Gsl_permut.permut - val vector_flat : Gsl_vector_flat.vector -> unit - val vector_flat_index : Gsl_vector_flat.vector -> Gsl_permut.permut - val vector_flat_smallest : int -> Gsl_vector_flat.vector -> float array - val vector_flat_largest : int -> Gsl_vector_flat.vector -> float array - val vector_flat_smallest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut - val vector_flat_largest_index : int -> Gsl_vector_flat.vector -> Gsl_permut.permut  File: ocamlgsl.info, Node: Gsl_linalg, Next: Gsl_eigen, Prev: Gsl_sort, Up: Top 20 Module `Gsl_linalg' ********************** 20.1 Description ================ Simple linear algebra operations 20.2 Interface ============== 20.2.1 Simple matrix multiplication ----------------------------------- - val matmult : a:Gsl_vectmat.mat -> ?transpa:bool -> b:Gsl_vectmat.mat -> ?transpb:bool -> Gsl_vectmat.mat -> unit `matmult a ~transpa b ~transpb c' stores in matrix `c' the product of matrices `a' and `b'. `transpa' or `transpb' allow transposition of either matrix, so it can compute a.b or Trans(a).b or a.Trans(b) or Trans(a).Trans(b) . See also Gsl_blas.gemm. 20.2.2 LU decomposition ----------------------- 20.2.2.1 Low-level functions ............................ - val _LU_decomp : Gsl_vectmat.mat -> Gsl_permut.permut -> int - val _LU_solve : Gsl_vectmat.mat -> Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _LU_svx : Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.vec -> unit - val _LU_refine : a:Gsl_vectmat.mat -> lu:Gsl_vectmat.mat -> Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit - val _LU_invert : Gsl_vectmat.mat -> Gsl_permut.permut -> Gsl_vectmat.mat -> unit - val _LU_det : Gsl_vectmat.mat -> int -> float - val _LU_lndet : Gsl_vectmat.mat -> float - val _LU_sgndet : Gsl_vectmat.mat -> int -> int 20.2.2.2 Higher-level functions ............................... With these, the arguments are protected (copied) and necessary intermediate datastructures are allocated; - val decomp_LU : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vectmat.mat * Gsl_permut.permut * int - val solve_LU : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> [< `A of float array | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> float array - val det_LU : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> float - val invert_LU : ?protect:bool -> ?result:Gsl_vectmat.mat -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vectmat.mat 20.2.3 Complex LU decomposition ------------------------------- - val complex_LU_decomp : Gsl_vectmat.cmat -> Gsl_permut.permut -> int - val complex_LU_solve : Gsl_vectmat.cmat -> Gsl_permut.permut -> b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> unit - val complex_LU_svx : Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cvec -> unit - val complex_LU_refine : a:Gsl_vectmat.cmat -> lu:Gsl_vectmat.cmat -> Gsl_permut.permut -> b:Gsl_vectmat.cvec -> x:Gsl_vectmat.cvec -> res:Gsl_vectmat.cvec -> unit - val complex_LU_invert : Gsl_vectmat.cmat -> Gsl_permut.permut -> Gsl_vectmat.cmat -> unit - val complex_LU_det : Gsl_vectmat.cmat -> int -> Gsl_complex.complex - val complex_LU_lndet : Gsl_vectmat.cmat -> float - val complex_LU_sgndet : Gsl_vectmat.cmat -> int -> Gsl_complex.complex 20.2.4 QR decomposition ----------------------- - val _QR_decomp : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit - val _QR_solve : Gsl_vectmat.mat -> Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QR_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QR_lssolve : Gsl_vectmat.mat -> Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit - val _QR_QTvec : Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _QR_Qvec : Gsl_vectmat.mat -> Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _QR_Rsolve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QR_Rsvx : Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit - val _QR_unpack : Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> unit - val _QR_QRsolve : Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QR_update : Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> w:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _R_solve : r:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit 20.2.5 QR Decomposition with Column Pivoting -------------------------------------------- - val _QRPT_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int - val _QRPT_decomp2 : a:Gsl_vectmat.mat -> q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int - val _QRPT_solve : qr:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QRPT_svx : qr:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit - val _QRPT_QRsolve : q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QRPT_update : q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> p:Gsl_permut.permut -> u:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _QRPT_Rsolve : qr:Gsl_vectmat.mat -> p:Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _QRPT_Rsvx : qr:Gsl_vectmat.mat -> p:Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit 20.2.6 Singular Value Decomposition ----------------------------------- - val _SV_decomp : a:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit - val _SV_decomp_mod : a:Gsl_vectmat.mat -> x:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> work:Gsl_vectmat.vec -> unit - val _SV_decomp_jacobi : a:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> unit - val _SV_solve : u:Gsl_vectmat.mat -> v:Gsl_vectmat.mat -> s:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit 20.2.7 LQ decomposition ----------------------- - val _LQ_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit - val _LQ_solve_T : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _LQ_svx_T : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _LQ_lssolve_T : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> res:Gsl_vectmat.vec -> unit - val _LQ_Lsolve_T : lq:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _LQ_Lsvx_T : lq:Gsl_vectmat.mat -> x:Gsl_vectmat.vec -> unit - val _L_solve_T : l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _LQ_vecQ : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _LQ_vecQT : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> v:Gsl_vectmat.vec -> unit - val _LQ_unpack : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> unit - val _LQ_update : q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit - val _LQ_LQsolve : q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit 20.2.8 P^T L Q decomposition ---------------------------- - val _PTLQ_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int - val _PTLQ_decomp2 : a:Gsl_vectmat.mat -> q:Gsl_vectmat.mat -> r:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> Gsl_permut.permut -> norm:Gsl_vectmat.vec -> int - val _PTLQ_solve_T : qr:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _PTLQ_svx_T : lq:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit - val _PTLQ_LQsolve_T : q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _PTLQ_Lsolve_T : lq:Gsl_vectmat.mat -> Gsl_permut.permut -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _PTLQ_Lsvx_T : lq:Gsl_vectmat.mat -> Gsl_permut.permut -> x:Gsl_vectmat.vec -> unit - val _PTLQ_update : q:Gsl_vectmat.mat -> l:Gsl_vectmat.mat -> Gsl_permut.permut -> v:Gsl_vectmat.vec -> w:Gsl_vectmat.vec -> unit 20.2.9 Cholesky decomposition ----------------------------- - val cho_decomp : Gsl_vectmat.mat -> unit - val cho_solve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val cho_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit - val cho_decomp_unit : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit 20.2.10 Tridiagonal Decomposition of Real Symmetric Matrices ------------------------------------------------------------ - val symmtd_decomp : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> unit - val symmtd_unpack : a:Gsl_vectmat.mat -> tau:Gsl_vectmat.vec -> q:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit - val symmtd_unpack_T : a:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit 20.2.11 Tridiagonal Decomposition of Hermitian Matrices ------------------------------------------------------- - val hermtd_decomp : a:Gsl_vectmat.cmat -> tau:Gsl_vectmat.cvec -> unit - val hermtd_unpack : a:Gsl_vectmat.cmat -> tau:Gsl_vectmat.cvec -> q:Gsl_vectmat.cmat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit - val hermtd_unpack_T : a:Gsl_vectmat.cmat -> diag:Gsl_vectmat.vec -> subdiag:Gsl_vectmat.vec -> unit 20.2.12 Bidiagonalization ------------------------- - val bidiag_decomp : a:Gsl_vectmat.mat -> tau_u:Gsl_vectmat.vec -> tau_v:Gsl_vectmat.vec -> unit - val bidiag_unpack : a:Gsl_vectmat.mat -> tau_u:Gsl_vectmat.vec -> u:Gsl_vectmat.mat -> tau_v:Gsl_vectmat.vec -> v:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit - val bidiag_unpack2 : a:Gsl_vectmat.mat -> tau_u:Gsl_vectmat.vec -> tau_v:Gsl_vectmat.vec -> v:Gsl_vectmat.mat -> unit - val bidiag_unpack_B : a:Gsl_vectmat.mat -> diag:Gsl_vectmat.vec -> superdiag:Gsl_vectmat.vec -> unit 20.2.13 Householder solver -------------------------- - val _HH_solve : Gsl_vectmat.mat -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val _HH_svx : Gsl_vectmat.mat -> Gsl_vectmat.vec -> unit - val solve_HH : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> [< `A of float array | `V of Gsl_vector.vector | `VF of Gsl_vector_flat.vector ] -> float array 20.2.14 Tridiagonal Systems --------------------------- - val solve_symm_tridiag : diag:Gsl_vectmat.vec -> offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val solve_tridiag : diag:Gsl_vectmat.vec -> abovediag:Gsl_vectmat.vec -> belowdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val solve_symm_cyc_tridiag : diag:Gsl_vectmat.vec -> offdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit - val solve_cyc_tridiag : diag:Gsl_vectmat.vec -> abovediag:Gsl_vectmat.vec -> belowdiag:Gsl_vectmat.vec -> b:Gsl_vectmat.vec -> x:Gsl_vectmat.vec -> unit 20.2.15 Exponential ------------------- - val _exponential : Gsl_vectmat.mat -> Gsl_vectmat.mat -> Gsl_fun.mode -> unit - val exponential : ?mode:Gsl_fun.mode -> [< `A of float array * int * int | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> [ `M of Gsl_matrix.matrix ]  File: ocamlgsl.info, Node: Gsl_eigen, Next: Gsl_poly, Prev: Gsl_linalg, Up: Top 21 Module `Gsl_eigen' ********************* 21.1 Description ================ Eigensystems 21.2 Interface ============== 21.2.1 Real Symmetric Matrices ------------------------------ - type symm_ws - val make_symm_ws : int -> symm_ws - val _symm : Gsl_vectmat.mat -> Gsl_vectmat.vec -> symm_ws -> unit - val symm : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vector.vector - type symmv_ws - val make_symmv_ws : int -> symmv_ws - val _symmv : Gsl_vectmat.mat -> Gsl_vectmat.vec -> Gsl_vectmat.mat -> symmv_ws -> unit - val symmv : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vector.vector * Gsl_matrix.matrix - type sort = | VAL_ASC | VAL_DESC | ABS_ASC | ABS_DESC - val symmv_sort : Gsl_vector.vector * Gsl_matrix.matrix -> sort -> unit 21.2.2 Complex Hermitian Matrices --------------------------------- - type herm_ws - val make_herm_ws : int -> herm_ws - val _herm : Gsl_vectmat.cmat -> Gsl_vectmat.vec -> herm_ws -> unit - val herm : ?protect:bool -> [< `CA of Gsl_complex.complex_array * int * int | `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] -> Gsl_vector.vector - type hermv_ws - val make_hermv_ws : int -> hermv_ws - val _hermv : Gsl_vectmat.cmat -> Gsl_vectmat.vec -> Gsl_vectmat.cmat -> hermv_ws -> unit - val hermv : ?protect:bool -> [< `CA of Gsl_complex.complex_array * int * int | `CM of Gsl_matrix_complex.matrix | `CMF of Gsl_matrix_complex_flat.matrix ] -> Gsl_vector.vector * Gsl_matrix_complex.matrix - val hermv_sort : Gsl_vector.vector * Gsl_matrix_complex.matrix -> sort -> unit 21.2.3 Real Nonsymmetric Matrices --------------------------------- - type nonsymm_ws - val make_nonsymm_ws : int -> nonsymm_ws - val _nonsymm : Gsl_vectmat.mat -> Gsl_vectmat.cvec -> nonsymm_ws -> unit - val _nonsymm_Z : Gsl_vectmat.mat -> Gsl_vectmat.cvec -> Gsl_vectmat.mat -> nonsymm_ws -> unit - val nonsymm : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vector_complex.vector - type nonsymmv_ws - val make_nonsymmv_ws : int -> nonsymmv_ws - val _nonsymmv : Gsl_vectmat.mat -> Gsl_vectmat.cvec -> Gsl_vectmat.cmat -> nonsymmv_ws -> unit - val _nonsymmv_Z : Gsl_vectmat.mat -> Gsl_vectmat.cvec -> Gsl_vectmat.cmat -> Gsl_vectmat.mat -> nonsymmv_ws -> unit - val nonsymmv : ?protect:bool -> [< `A of float array * int * int | `AA of float array array | `M of Gsl_matrix.matrix | `MF of Gsl_matrix_flat.matrix ] -> Gsl_vector_complex.vector * Gsl_matrix_complex.matrix - val nonsymmv_sort : Gsl_vector_complex.vector * Gsl_matrix_complex.matrix -> sort -> unit  File: ocamlgsl.info, Node: Gsl_poly, Next: Gsl_interp, Prev: Gsl_eigen, Up: Top 22 Module `Gsl_poly' ******************** 22.1 Description ================ Polynomials 22.2 Interface ============== - type poly = float array 22.2.1 Polynomial Evaluation ---------------------------- - val eval : poly -> float -> float 22.2.2 Quadratic Equations -------------------------- - type quad_sol = | Quad_0 | Quad_2 of (float * float) - val solve_quadratic : a:float -> b:float -> c:float -> quad_sol - val complex_solve_quadratic : a:float -> b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex 22.2.3 Cubic Equations ---------------------- - type cubic_sol = | Cubic_0 | Cubic_1 of float | Cubic_3 of (float * float * float) - val solve_cubic : a:float -> b:float -> c:float -> cubic_sol - val complex_solve_cubic : a:float -> b:float -> c:float -> Gsl_complex.complex * Gsl_complex.complex * Gsl_complex.complex 22.2.4 General Polynomial Equations ----------------------------------- - val solve : poly -> Gsl_complex.complex_array  File: ocamlgsl.info, Node: Gsl_interp, Next: Gsl_rng, Prev: Gsl_poly, Up: Top 23 Module `Gsl_interp' ********************** 23.1 Description ================ Interpolation 23.2 Interface ============== - type t - type accel - type interp_type = | LINEAR | POLYNOMIAL | CSPLINE | CSPLINE_PERIODIC | AKIMA | 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 23.2.1 Higher level functions ----------------------------- - type interp = { interp : Gsl_interp.t ; accel : Gsl_interp.accel ; xa : float array ; ya : float array ; size : int ; i_type : Gsl_interp.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  File: ocamlgsl.info, Node: Gsl_rng, Next: Gsl_qrng, Prev: Gsl_interp, Up: Top 24 Module `Gsl_rng' ******************* 24.1 Description ================ Random Number Generation 24.2 Interface ============== - type rng_type = | BOROSH13 | COVEYOU | CMRG | FISHMAN18 | FISHMAN20 | FISHMAN2X | GFSR4 | KNUTHRAN | KNUTHRAN2 | KNUTHRAN2002 | LECUYER21 | MINSTD | MRG | MT19937 | MT19937_1999 | MT19937_1998 | R250 | RAN0 | RAN1 | RAN2 | RAN3 | RAND | RAND48 | RANDOM128_BSD | RANDOM128_GLIBC2 | RANDOM128_LIBC5 | RANDOM256_BSD | RANDOM256_GLIBC2 | RANDOM256_LIBC5 | RANDOM32_BSD | RANDOM32_GLIBC2 | RANDOM32_LIBC5 | RANDOM64_BSD | RANDOM64_GLIBC2 | RANDOM64_LIBC5 | RANDOM8_BSD | RANDOM8_GLIBC2 | RANDOM8_LIBC5 | RANDOM_BSD | RANDOM_GLIBC2 | RANDOM_LIBC5 | RANDU | RANF | RANLUX | RANLUX389 | RANLXD1 | RANLXD2 | RANLXS0 | RANLXS1 | RANLXS2 | RANMAR | SLATEC | TAUS | TAUS_2 | TAUS_113 | TRANSPUTER | TT800 | UNI | UNI32 | VAX | WATERMAN14 | ZUF - type t 24.2.1 Default values --------------------- - val default : unit -> rng_type - val default_seed : unit -> nativeint - val set_default : rng_type -> unit - val set_default_seed : nativeint -> unit - val env_setup : unit -> unit 24.2.2 Creating --------------- - val make : rng_type -> t - val set : t -> nativeint -> unit - val name : t -> string - val get_type : t -> rng_type warning : the nativeint used for seeds are in fact unsigned but ocaml treats them as signed. But you can still print them using %nu with printf functions. - val max : t -> nativeint - val min : t -> nativeint - val memcpy : t -> t -> unit - val clone : t -> t - val dump_state : t -> string * string - val set_state : t -> string * string -> unit 24.2.3 Sampling --------------- - val get : t -> nativeint - val uniform : t -> float - val uniform_pos : t -> float - val uniform_int : t -> int -> int These function fill the array with random numbers : - val uniform_arr : t -> float array -> unit - val uniform_pos_arr : t -> float array -> unit  File: ocamlgsl.info, Node: Gsl_qrng, Next: Gsl_randist, Prev: Gsl_rng, Up: Top 25 Module `Gsl_qrng' ******************** 25.1 Description ================ Quasi-Random Sequences 25.2 Interface ============== - type qrng_type = | NIEDERREITER_2 | SOBOL - type t - val make : qrng_type -> int -> t - val init : t -> unit - val get : t -> float array -> unit - val sample : t -> float array - val name : t -> string - val dimension : t -> int - val memcpy : src:t -> dst:t -> unit - val clone : t -> t  File: ocamlgsl.info, Node: Gsl_randist, Next: Gsl_integration, Prev: Gsl_qrng, Up: Top 26 Module `Gsl_randist' *********************** 26.1 Description ================ Random Number Distributions 26.2 Interface ============== - val gaussian : Gsl_rng.t -> sigma:float -> float - val gaussian_ratio_method : Gsl_rng.t -> sigma:float -> float - val gaussian_ziggurat : Gsl_rng.t -> sigma:float -> float - val gaussian_pdf : float -> sigma:float -> float - val ugaussian : Gsl_rng.t -> float - val ugaussian_ratio_method : Gsl_rng.t -> float - val ugaussian_pdf : float -> float - val gaussian_tail : Gsl_rng.t -> a:float -> sigma:float -> float - val gaussian_tail_pdf : float -> a:float -> sigma:float -> float - val ugaussian_tail : Gsl_rng.t -> a:float -> float - val ugaussian_tail_pdf : float -> a:float -> float - val bivariate_gaussian : Gsl_rng.t -> sigma_x:float -> sigma_y:float -> rho:float -> float * float - val bivariate_gaussian_pdf : x:float -> y:float -> sigma_x:float -> sigma_y:float -> rho:float -> float - val exponential : Gsl_rng.t -> mu:float -> float - val exponential_pdf : float -> mu:float -> float - val laplace : Gsl_rng.t -> a:float -> float - val laplace_pdf : float -> a:float -> float - val exppow : Gsl_rng.t -> a:float -> b:float -> float - val exppow_pdf : float -> a:float -> b:float -> float - val cauchy : Gsl_rng.t -> a:float -> float - val cauchy_pdf : float -> a:float -> float - val rayleigh : Gsl_rng.t -> sigma:float -> float - val rayleigh_pdf : float -> sigma:float -> float - val rayleigh_tail : Gsl_rng.t -> a:float -> sigma:float -> float - val rayleigh_tail_pdf : float -> a:float -> sigma:float -> float - val landau : Gsl_rng.t -> float - val landau_pdf : float -> float - val levy : Gsl_rng.t -> c:float -> alpha:float -> float - val levy_skew : Gsl_rng.t -> c:float -> alpha:float -> beta:float -> float - val gamma : Gsl_rng.t -> a:float -> b:float -> float - val gamma_int : Gsl_rng.t -> a:int -> float - val gamma_pdf : float -> a:float -> b:float -> float - val gamma_mt : Gsl_rng.t -> a:int -> b:float -> float - val gamma_knuth : Gsl_rng.t -> a:int -> b:float -> float - val flat : Gsl_rng.t -> a:float -> b:float -> float - val flat_pdf : float -> a:float -> b:float -> float - val lognormal : Gsl_rng.t -> zeta:float -> sigma:float -> float - val lognormal_pdf : float -> zeta:float -> sigma:float -> float - val chisq : Gsl_rng.t -> nu:float -> float - val chisq_pdf : float -> nu:float -> float - val dirichlet : Gsl_rng.t -> alpha:float array -> theta:float array -> unit - val dirichlet_pdf : alpha:float array -> theta:float array -> float - val dirichlet_lnpdf : alpha:float array -> theta:float array -> float - val fdist : Gsl_rng.t -> nu1:float -> nu2:float -> float - val fdist_pdf : float -> nu1:float -> nu2:float -> float - val tdist : Gsl_rng.t -> nu:float -> float - val tdist_pdf : float -> nu:float -> float - val beta : Gsl_rng.t -> a:float -> b:float -> float - val beta_pdf : float -> a:float -> b:float -> float - val logistic : Gsl_rng.t -> a:float -> float - val logistic_pdf : float -> a:float -> float - val pareto : Gsl_rng.t -> a:float -> b:float -> float - val pareto_pdf : float -> a:float -> b:float -> float - val dir_2d : Gsl_rng.t -> float * float - val dir_2d_trig_method : Gsl_rng.t -> float * float - val dir_3d : Gsl_rng.t -> float * float * float - val dir_nd : Gsl_rng.t -> float array -> unit - val weibull : Gsl_rng.t -> a:float -> b:float -> float - val weibull_pdf : float -> a:float -> b:float -> float - val gumbel1 : Gsl_rng.t -> a:float -> b:float -> float - val gumbel1_pdf : float -> a:float -> b:float -> float - val gumbel2 : Gsl_rng.t -> a:float -> b:float -> float - val gumbel2_pdf : float -> a:float -> b:float -> float - type discrete - val discrete_preproc : float array -> discrete - val discrete : Gsl_rng.t -> discrete -> int - val discrete_pdf : int -> discrete -> float - val poisson : Gsl_rng.t -> mu:float -> int - val poisson_pdf : int -> mu:float -> float - val bernoulli : Gsl_rng.t -> p:float -> int - val bernoulli_pdf : int -> p:float -> float - val binomial : Gsl_rng.t -> p:float -> n:int -> int - val binomial_knuth : Gsl_rng.t -> p:float -> n:int -> int - val binomial_tpe : Gsl_rng.t -> p:float -> n:int -> int - val binomial_pdf : int -> p:float -> n:int -> float - val multinomial : Gsl_rng.t -> n:int -> p:float array -> int array - val multinomial_pdf : p:float array -> n:int array -> float - val multinomial_lnpdf : p:float array -> n:int array -> float - val negative_binomial : Gsl_rng.t -> p:float -> n:int -> int - val negative_binomial_pdf : int -> p:float -> n:int -> float - val pascal : Gsl_rng.t -> p:float -> k:int -> int - val pascal_pdf : int -> p:float -> n:int -> float - val geometric : Gsl_rng.t -> p:float -> int - val geometric_pdf : int -> p:float -> float - val hypergeometric : Gsl_rng.t -> n1:int -> n2:int -> t:int -> int - val hypergeometric_pdf : int -> n1:int -> n2:int -> t:int -> float - val logarithmic : Gsl_rng.t -> p:float -> int - val logarithmic_pdf : int -> p:float -> float - val shuffle : Gsl_rng.t -> 'a array -> unit - val choose : Gsl_rng.t -> src:'a array -> dst:'a array -> unit - val sample : Gsl_rng.t -> src:'a array -> dst:'a array -> unit  File: ocamlgsl.info, Node: Gsl_integration, Next: Gsl_fit, Prev: Gsl_randist, Up: Top 27 Module `Gsl_integration' *************************** 27.1 Description ================ Numerical Integration 27.2 Interface ============== - val qng : Gsl_fun.gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> float * float * int - type workspace - val make_ws : int -> workspace - val size : workspace -> int - type key = | GAUSS15 | GAUSS21 | GAUSS31 | GAUSS41 | GAUSS51 | GAUSS61 - val qag : Gsl_fun.gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> key -> workspace -> Gsl_fun.result - val qags : Gsl_fun.gsl_fun -> a:float -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - val qagp : Gsl_fun.gsl_fun -> pts:float array -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - val qagi : Gsl_fun.gsl_fun -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - val qagiu : Gsl_fun.gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - val qagil : Gsl_fun.gsl_fun -> b:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - val qag_sing : Gsl_fun.gsl_fun -> a:float -> b:float -> ?pts:float array -> ?limit:int -> epsabs:float -> epsrel:float -> unit -> Gsl_fun.result - val qawc : Gsl_fun.gsl_fun -> a:float -> b:float -> c:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - type qaws_table - val alloc_qaws : alpha:float -> beta:float -> mu:int -> nu:int -> qaws_table - val set_qaws : qaws_table -> alpha:float -> beta:float -> mu:int -> nu:int -> unit - val free_qaws : qaws_table -> unit - val qaws : Gsl_fun.gsl_fun -> a:float -> b:float -> qaws_table -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> Gsl_fun.result - type qawo_table - type qawo_sine = | QAWO_COSINE | QAWO_SINE - val alloc_qawo : omega:float -> l:float -> qawo_sine -> n:int -> qawo_table - val set_qawo : qawo_table -> omega:float -> l:float -> qawo_sine -> unit - val free_qawo : qawo_table -> unit - val qawo : Gsl_fun.gsl_fun -> a:float -> epsabs:float -> epsrel:float -> ?limit:int -> workspace -> qawo_table -> Gsl_fun.result - val qawf : Gsl_fun.gsl_fun -> a:float -> epsabs:float -> ?limit:int -> workspace -> workspace -> qawo_table -> Gsl_fun.result  File: ocamlgsl.info, Node: Gsl_fit, Next: Gsl_multifit, Prev: Gsl_integration, Up: Top 28 Module `Gsl_fit' ******************* 28.1 Description ================ Least-Squares Fitting 28.2 Interface ============== - type linear_fit_coeffs = { c0 : float ; c1 : float ; cov00 : float ; cov01 : float ; cov11 : float ; sumsq : float ; } - val linear : ?weight:float array -> float array -> float array -> linear_fit_coeffs - val linear_est : float -> coeffs:linear_fit_coeffs -> Gsl_fun.result - type mul_fit_coeffs = { m_c1 : float ; m_cov11 : float ; m_sumsq : float ; } - val mul : ?weight:float array -> float array -> float array -> mul_fit_coeffs - val mul_est : float -> coeffs:mul_fit_coeffs -> Gsl_fun.result  File: ocamlgsl.info, Node: Gsl_multifit, Next: Gsl_multifit_nlin, Prev: Gsl_fit, Up: Top 29 Module `Gsl_multifit' ************************ 29.1 Description ================ Multi-parameter Least-Squares Fitting 29.2 Interface ============== - type ws - val make : n:int -> p:int -> ws - val _linear : ?weight:Gsl_vectmat.vec -> x:Gsl_vectmat.mat -> y:Gsl_vectmat.vec -> c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> ws -> float - val _linear_svd : ?weight:Gsl_vectmat.vec -> x:Gsl_vectmat.mat -> y:Gsl_vectmat.vec -> tol:float -> c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> ws -> int * float - val linear : ?weight:Gsl_vectmat.vec -> Gsl_vectmat.mat -> Gsl_vectmat.vec -> Gsl_vector.vector * Gsl_matrix.matrix * float - val linear_est : x:Gsl_vectmat.vec -> c:Gsl_vectmat.vec -> cov:Gsl_vectmat.mat -> Gsl_fun.result - val fit_poly : ?weight:float array -> x:float array -> y:float array -> int -> float array * float array array * float  File: ocamlgsl.info, Node: Gsl_multifit_nlin, Next: Gsl_root, Prev: Gsl_multifit, Up: Top 30 Module `Gsl_multifit_nlin' ***************************** 30.1 Description ================ Nonlinear Least-Squares Fitting 30.2 Interface ============== - type t - type kind = | LMSDER | LMDER - val make : kind -> n:int -> p:int -> Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> t - val name : t -> string - val iterate : t -> unit - val position : t -> Gsl_vector.vector -> unit - val get_state : t -> ?x:Gsl_vector.vector -> ?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit - val test_delta : t -> epsabs:float -> epsrel:float -> bool - val test_gradient : t -> epsabs:float -> Gsl_vector.vector -> bool - val covar : t -> epsrel:float -> Gsl_matrix.matrix -> unit  File: ocamlgsl.info, Node: Gsl_root, Next: Gsl_multiroot, Prev: Gsl_multifit_nlin, Up: Top 31 Module `Gsl_root' ******************** 31.1 Description ================ One dimensional Root-Finding Subparts ======== * Menu: * Bracket: Gsl_root/Bracket. Module * Polish: Gsl_root/Polish. Module 31.2 Interface ============== - module Bracket *Note Module Bracket: Gsl_root/Bracket. - module Polish *Note Module Polish: Gsl_root/Polish. - val test_interval : lo:float -> up:float -> epsabs:float -> epsrel:float -> bool - val test_delta : x1:float -> x0:float -> epsabs:float -> epsrel:float -> bool - val test_residual : f:float -> epsabs:float -> bool  File: ocamlgsl.info, Node: Gsl_root/Bracket, Next: Gsl_root/Polish, Up: Gsl_root 31.3 Module `Gsl_root.Bracket' ============================== 31.3.1 Interface ---------------- - type kind = | BISECTION | FALSEPOS | BRENT - type t - val make : kind -> Gsl_fun.gsl_fun -> float -> float -> t - val name : t -> string - val iterate : t -> unit - val root : t -> float - val interval : t -> float * float  File: ocamlgsl.info, Node: Gsl_root/Polish, Prev: Gsl_root/Bracket, Up: Gsl_root 31.4 Module `Gsl_root.Polish' ============================= 31.4.1 Interface ---------------- - type kind = | NEWTON | SECANT | STEFFENSON - type t - val make : kind -> Gsl_fun.gsl_fun_fdf -> float -> t - val name : t -> string - val iterate : t -> unit - val root : t -> float  File: ocamlgsl.info, Node: Gsl_multiroot, Next: Gsl_min, Prev: Gsl_root, Up: Top 32 Module `Gsl_multiroot' ************************* 32.1 Description ================ Multidimensional Root-Finding Subparts ======== * Menu: * NoDeriv: Gsl_multiroot/NoDeriv. Module * Deriv: Gsl_multiroot/Deriv. Module 32.2 Interface ============== - module NoDeriv *Note Module NoDeriv: Gsl_multiroot/NoDeriv. - module Deriv *Note Module Deriv: Gsl_multiroot/Deriv.  File: ocamlgsl.info, Node: Gsl_multiroot/NoDeriv, Next: Gsl_multiroot/Deriv, Up: Gsl_multiroot 32.3 Module `Gsl_multiroot.NoDeriv' =================================== 32.3.1 Interface ---------------- - type kind = | HYBRIDS | HYBRID | DNEWTON | BROYDEN - type t - val make : kind -> int -> Gsl_fun.multi_fun -> Gsl_vector.vector -> t - val name : t -> string - val iterate : t -> unit - val root : t -> Gsl_vector.vector -> unit - val get_state : t -> ?x:Gsl_vector.vector -> ?f:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> unit -> unit - val test_delta : t -> epsabs:float -> epsrel:float -> bool - val test_residual : t -> epsabs:float -> bool  File: ocamlgsl.info, Node: Gsl_multiroot/Deriv, Prev: Gsl_multiroot/NoDeriv, Up: Gsl_multiroot 32.4 Module `Gsl_multiroot.Deriv' ================================= 32.4.1 Interface ---------------- - type kind = | HYBRIDSJ | HYBRIDJ | NEWTON | GNEWTON - type t - val make : kind -> int -> Gsl_fun.multi_fun_fdf -> Gsl_vector.vector -> t - val name : t -> string - val iterate : t -> unit - val root : t -> Gsl_vector.vector -> unit - val get_state : t -> ?x:Gsl_vector.vector -> ?f:Gsl_vector.vector -> ?j:Gsl_matrix.matrix -> ?dx:Gsl_vector.vector -> unit -> unit - val test_delta : t -> epsabs:float -> epsrel:float -> bool - val test_residual : t -> epsabs:float -> bool  File: ocamlgsl.info, Node: Gsl_min, Next: Gsl_multimin, Prev: Gsl_multiroot, Up: Top 33 Module `Gsl_min' ******************* 33.1 Description ================ One dimensional Minimization 33.2 Interface ============== - type kind = | GOLDENSECTION | BRENT - type t - val make : kind -> Gsl_fun.gsl_fun -> min:float -> lo:float -> up:float -> t - val name : t -> string - val iterate : t -> unit - val minimum : t -> float - val interval : t -> float * float - val test_interval : x_lo:float -> x_up:float -> epsabs:float -> epsrel:float -> bool  File: ocamlgsl.info, Node: Gsl_multimin, Next: Gsl_diff, Prev: Gsl_min, Up: Top 34 Module `Gsl_multimin' ************************ 34.1 Description ================ Multidimensional Minimization Subparts ======== * Menu: * Deriv: Gsl_multimin/Deriv. Module * NoDeriv: Gsl_multimin/NoDeriv. Module 34.2 Interface ============== - module Deriv *Note Module Deriv: Gsl_multimin/Deriv. - module NoDeriv *Note Module NoDeriv: Gsl_multimin/NoDeriv.  File: ocamlgsl.info, Node: Gsl_multimin/Deriv, Next: Gsl_multimin/NoDeriv, Up: Gsl_multimin 34.3 Module `Gsl_multimin.Deriv' ================================ 34.3.1 Interface ---------------- - type kind = | CONJUGATE_FR | CONJUGATE_PR | VECTOR_BFGS | VECTOR_BFGS2 | STEEPEST_DESCENT - type t - val make : kind -> int -> Gsl_fun.multim_fun_fdf -> x:Gsl_vector.vector -> step:float -> tol:float -> t - val name : t -> string - val iterate : t -> unit - val restart : t -> unit - val minimum : ?x:Gsl_vector.vector -> ?dx:Gsl_vector.vector -> ?g:Gsl_vector.vector -> t -> float - val test_gradient : t -> float -> bool  File: ocamlgsl.info, Node: Gsl_multimin/NoDeriv, Prev: Gsl_multimin/Deriv, Up: Gsl_multimin 34.4 Module `Gsl_multimin.NoDeriv' ================================== 34.4.1 Interface ---------------- - type kind = | NM_SIMPLEX - type t - val make : kind -> int -> Gsl_fun.multim_fun -> x:Gsl_vector.vector -> step_size:Gsl_vector.vector -> t - val name : t -> string - val iterate : t -> unit - val minimum : ?x:Gsl_vector.vector -> t -> float - val size : t -> float - val test_size : t -> float -> bool  File: ocamlgsl.info, Node: Gsl_diff, Next: Gsl_cheb, Prev: Gsl_multimin, Up: Top 35 Module `Gsl_diff' ******************** 35.1 Description ================ Numerical Differentiation 35.2 Interface ============== - val central : Gsl_fun.gsl_fun -> float -> Gsl_fun.result - val forward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result - val backward : Gsl_fun.gsl_fun -> float -> Gsl_fun.result  File: ocamlgsl.info, Node: Gsl_cheb, Next: Gsl_sum, Prev: Gsl_diff, Up: Top 36 Module `Gsl_cheb' ******************** 36.1 Description ================ Chebyshev Approximations 36.2 Interface ============== - type t - val make : int -> t - val order : t -> int - val coefs : t -> float array - val init : t -> Gsl_fun.gsl_fun -> a:float -> b:float -> unit - val eval : t -> ?order:int -> float -> float - val eval_err : t -> ?order:int -> float -> Gsl_fun.result - val deriv : t -> t - val integ : t -> t  File: ocamlgsl.info, Node: Gsl_sum, Next: Gsl_fft, Prev: Gsl_cheb, Up: Top 37 Module `Gsl_sum' ******************* 37.1 Description ================ Series Acceleration Subparts ======== * Menu: * Trunc: Gsl_sum/Trunc. Module 37.2 Interface ============== - type ws - val make : int -> ws - val accel : float array -> ws -> Gsl_fun.result - type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } - val get_info : ws -> ws_info - module Trunc *Note Module Trunc: Gsl_sum/Trunc.  File: ocamlgsl.info, Node: Gsl_sum/Trunc, Up: Gsl_sum 37.3 Module `Gsl_sum.Trunc' =========================== 37.3.1 Interface ---------------- - type ws - val make : int -> ws - val accel : float array -> ws -> Gsl_fun.result - type ws_info = { size : int ; terms_used : int ; sum_plain : float ; } - val get_info : ws -> ws_info  File: ocamlgsl.info, Node: Gsl_fft, Next: Gsl_monte, Prev: Gsl_sum, Up: Top 38 Module `Gsl_fft' ******************* 38.1 Description ================ Fast Fourier Transforms Subparts ======== * Menu: * Real: Gsl_fft/Real. Module * Halfcomplex: Gsl_fft/Halfcomplex. Module * Complex: Gsl_fft/Complex. Module 38.2 Interface ============== - exception Wrong_layout - type layout = | Real | Halfcomplex | Halfcomplex_rad2 | Complex - type fft_array = { layout : Gsl_fft.layout ; data : float array ; } - module Real *Note Module Real: Gsl_fft/Real. - module Halfcomplex *Note Module Halfcomplex: Gsl_fft/Halfcomplex. - module Complex *Note Module Complex: Gsl_fft/Complex. - val unpack : fft_array -> Gsl_complex.complex_array - val hc_mult : fft_array -> fft_array -> unit - val hc_mult_rad2 : fft_array -> fft_array -> unit  File: ocamlgsl.info, Node: Gsl_fft/Real, Next: Gsl_fft/Halfcomplex, Up: Gsl_fft 38.3 Module `Gsl_fft.Real' ========================== 38.3.1 Interface ---------------- - type workspace - type wavetable - val make_workspace : int -> workspace - val make_wavetable : int -> wavetable - val transform : ?stride:int -> Gsl_fft.fft_array -> wavetable -> workspace -> unit - val transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit - val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array  File: ocamlgsl.info, Node: Gsl_fft/Halfcomplex, Next: Gsl_fft/Complex, Prev: Gsl_fft/Real, Up: Gsl_fft 38.4 Module `Gsl_fft.Halfcomplex' ================================= 38.4.1 Interface ---------------- - type wavetable - val make_wavetable : int -> wavetable - val transform : ?stride:int -> Gsl_fft.fft_array -> wavetable -> Gsl_fft.Real.workspace -> unit - val transform_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit - val backward : ?stride:int -> Gsl_fft.fft_array -> wavetable -> Gsl_fft.Real.workspace -> unit - val backward_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit - val inverse : ?stride:int -> Gsl_fft.fft_array -> wavetable -> Gsl_fft.Real.workspace -> unit - val inverse_rad2 : ?stride:int -> Gsl_fft.fft_array -> unit - val unpack : ?stride:int -> Gsl_fft.fft_array -> Gsl_fft.fft_array  File: ocamlgsl.info, Node: Gsl_fft/Complex, Prev: Gsl_fft/Halfcomplex, Up: Gsl_fft 38.5 Module `Gsl_fft.Complex' ============================= 38.5.1 Interface ---------------- - type workspace - type wavetable - type direction = | Forward | Backward - val make_workspace : int -> workspace - val make_wavetable : int -> wavetable - val forward : ?stride:int -> Gsl_complex.complex_array -> wavetable -> workspace -> unit - val forward_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit - val transform : ?stride:int -> Gsl_complex.complex_array -> wavetable -> workspace -> direction -> unit - val transform_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> direction -> unit - val backward : ?stride:int -> Gsl_complex.complex_array -> wavetable -> workspace -> unit - val backward_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit - val inverse : ?stride:int -> Gsl_complex.complex_array -> wavetable -> workspace -> unit - val inverse_rad2 : ?dif:bool -> ?stride:int -> Gsl_complex.complex_array -> unit  File: ocamlgsl.info, Node: Gsl_monte, Next: Gsl_siman, Prev: Gsl_fft, Up: Top 39 Module `Gsl_monte' ********************* 39.1 Description ================ Monte Carlo Integration 39.2 Interface ============== 39.2.1 High-level interface --------------------------- - type kind = | PLAIN | MISER | VEGAS - val integrate : kind -> Gsl_fun.monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> Gsl_fun.result 39.2.2 Low-level interface -------------------------- 39.2.2.1 PLAIN algorithm ........................ - type plain_state - val make_plain_state : int -> plain_state - val init_plain : plain_state -> unit - val integrate_plain : Gsl_fun.monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> plain_state -> Gsl_fun.result 39.2.2.2 MISER algorithm ........................ - type miser_state - type miser_params = { estimate_frac : float ; min_calls : int ; min_calls_per_bisection : int ; miser_alpha : float ; dither : float ; } - val make_miser_state : int -> miser_state - val init_miser : miser_state -> unit - val integrate_miser : Gsl_fun.monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> miser_state -> Gsl_fun.result - val get_miser_params : miser_state -> miser_params - val set_miser_params : miser_state -> miser_params -> unit 39.2.2.3 VEGAS algorithm ........................ - type vegas_state - type vegas_info = { result : float ; sigma : float ; chisq : float ; } - type vegas_mode = | STRATIFIED | IMPORTANCE_ONLY | IMPORTANCE - type vegas_params = { vegas_alpha : float ; (* 1.5 *) iterations : int ; (* 5 *) stage : int ; mode : Gsl_monte.vegas_mode ; verbose : int ; ostream : Pervasives.out_channel option ; } - val make_vegas_state : int -> vegas_state - val init_vegas : vegas_state -> unit - val integrate_vegas : Gsl_fun.monte_fun -> lo:float array -> up:float array -> int -> Gsl_rng.t -> vegas_state -> Gsl_fun.result - val get_vegas_info : vegas_state -> vegas_info - val get_vegas_params : vegas_state -> vegas_params - val set_vegas_params : vegas_state -> vegas_params -> unit  File: ocamlgsl.info, Node: Gsl_siman, Next: Gsl_odeiv, Prev: Gsl_monte, Up: Top 40 Module `Gsl_siman' ********************* 40.1 Description ================ Simulated Annealing 40.2 Interface ============== NB: This module is not interfaced to GSL, it is implemented in OCaml. It is quite simple in fact, so rather than using it you may want to copy the code and tweak the algorithm in your own program. - type params = { iters_fixed_T : int ; (* The number of iterations at each temperature *) step_size : float ; (* The maximum step size in the random walk *) k : float ; (* parameter of the Boltzmann distribution *) t_initial : float ; (* initial temperature *) mu_t : float ; (* cooling factor *) t_min : float ; (* minimum temperature *) } - val solve : Gsl_rng.t -> 'a -> energ_func:('a -> float) -> step_func:(Gsl_rng.t -> 'a -> float -> 'a) -> ?print_func:('a -> unit) -> params -> 'a  File: ocamlgsl.info, Node: Gsl_odeiv, Next: Gsl_histo, Prev: Gsl_siman, Up: Top 41 Module `Gsl_odeiv' ********************* 41.1 Description ================ Ordinary Differential Equations 41.2 Interface ============== - type system - val make_system : (float -> float array -> float array -> unit) -> ?jac:(float -> float array -> Gsl_matrix.matrix -> float array -> unit) -> int -> system - type step - type step_kind = | RK2 | RK4 | RKF45 | RKCK | RK8PD | RK2IMP | RK2SIMP | RK4IMP | BSIMP | GEAR1 | GEAR2 - val make_step : step_kind -> dim:int -> step - val step_reset : step -> unit - val step_name : step -> string - val step_order : step -> int - val step_apply : step -> t:float -> h:float -> y:float array -> yerr:float array -> ?dydt_in:float array -> ?dydt_out:float array -> system -> unit - type control - val make_control_standard_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> control - val make_control_y_new : eps_abs:float -> eps_rel:float -> control - val make_control_yp_new : eps_abs:float -> eps_rel:float -> control - val make_control_scaled_new : eps_abs:float -> eps_rel:float -> a_y:float -> a_dydt:float -> scale_abs:float array -> control - val control_name : control -> string - type hadjust = | HADJ_DEC | HADJ_NIL | HADJ_INC - val control_hadjust : control -> step -> y:float array -> yerr:float array -> dydt:float array -> h:float -> hadjust * float - type evolve - val make_evolve : int -> evolve - val evolve_reset : evolve -> unit - val evolve_apply : evolve -> control -> step -> system -> t:float -> t1:float -> h:float -> y:float array -> float * float  File: ocamlgsl.info, Node: Gsl_histo, Next: Gsl_stats, Prev: Gsl_odeiv, Up: Top 42 Module `Gsl_histo' ********************* 42.1 Description ================ Histograms 42.2 Interface ============== - type t = private { n : int ; (* number of histogram bins *) range : float array ; (* ranges of the bins ; n+1 elements *) bin : float array ; (* counts for each bin ; n elements *) } The histogram type - val check : t -> bool 42.2.1 Allocating histograms ---------------------------- - val make : int -> t - val copy : t -> t - val set_ranges : t -> float array -> unit - val set_ranges_uniform : t -> xmin:float -> xmax:float -> unit 42.2.2 Updating and accessing histogram elements ------------------------------------------------ - val accumulate : t -> ?w:float -> float -> unit - val get : t -> int -> float - val get_range : t -> int -> float * float - val h_max : t -> float - val h_min : t -> float - val bins : t -> int - val reset : t -> unit 42.2.3 Searching histogram ranges --------------------------------- - val find : t -> float -> int 42.2.4 Histograms statistics ---------------------------- - val max_val : t -> float - val max_bin : t -> int - val min_val : t -> float - val min_bin : t -> int - val mean : t -> float - val sigma : t -> float - val sum : t -> float 42.2.5 Histogram operations --------------------------- - val equal_bins_p : t -> t -> bool - val add : t -> t -> unit - val sub : t -> t -> unit - val mul : t -> t -> unit - val div : t -> t -> unit - val scale : t -> float -> unit - val shift : t -> float -> unit 42.2.6 Resampling ----------------- - type histo_pdf = private { pdf_n : int ; pdf_range : float array ; pdf_sum : float array ; } - val init : t -> histo_pdf - val sample : histo_pdf -> float -> float  File: ocamlgsl.info, Node: Gsl_stats, Next: Gsl_wavelet, Prev: Gsl_histo, Up: Top 43 Module `Gsl_stats' ********************* 43.1 Description ================ Statistics 43.2 Interface ============== - val mean : ?w:float array -> float array -> float - val variance : ?w:float array -> ?mean:float -> float array -> float - val sd : ?w:float array -> ?mean:float -> float array -> float - val variance_with_fixed_mean : ?w:float array -> mean:float -> float array -> float - val sd_with_fixed_mean : ?w:float array -> mean:float -> float array -> float - val absdev : ?w:float array -> ?mean:float -> float array -> float - val skew : ?w:float array -> float array -> float - val skew_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float - val kurtosis : ?w:float array -> float array -> float - val kurtosis_m_sd : ?w:float array -> mean:float -> sd:float -> float array -> float - val lag1_autocorrelation : mean:float -> float array -> float - val covariance : float array -> float array -> float - val covariance_m : mean1:float -> float array -> mean2:float -> float array -> float - val max : float array -> float - val min : float array -> float - val minmax : float array -> float * float - val max_index : float array -> int - val min_index : float array -> int - val minmax_index : float array -> int * int - val quantile_from_sorted_data : float array -> float -> float  File: ocamlgsl.info, Node: Gsl_wavelet, Next: Gsl_bspline, Prev: Gsl_stats, Up: Top 44 Module `Gsl_wavelet' *********************** 44.1 Description ================ Wavelet Transforms 44.2 Interface ============== - type t - type ws - type kind = | DAUBECHIES | DAUBECHIES_CENTERED | HAAR | HAAR_CENTERED | BSPLINE | BSPLINE_CENTERED - type direction = | FORWARD | BACKWARD - val make : kind -> int -> t - val name : t -> string - val workspace_make : int -> ws - val workspace_size : ws -> int 44.2.1 1D transforms -------------------- - val transform_array : t -> direction -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit - val transform_forward : t -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit - val transform_inverse : t -> ?ws:ws -> ?stride:int -> ?off:int -> ?len:int -> float array -> unit - val transform_vector_flat : t -> direction -> ?ws:ws -> Gsl_vector_flat.vector -> unit - val transform_vector : t -> direction -> ?ws:ws -> Gsl_vector.vector -> unit - val transform_gen : t -> direction -> ?ws:ws -> [< Gsl_vectmat.vec ] -> unit 44.2.2 2D transforms -------------------- - type ordering = | STANDARD | NON_STANDARD - val transform_matrix_flat : t -> ordering -> direction -> ?ws:ws -> Gsl_matrix_flat.matrix -> unit - val transform_matrix : t -> ordering -> direction -> ?ws:ws -> Gsl_matrix.matrix -> unit - val transform_matrix_gen : t -> ordering -> direction -> ?ws:ws -> [< Gsl_vectmat.mat ] -> unit  File: ocamlgsl.info, Node: Gsl_bspline, Next: Gsl_const, Prev: Gsl_wavelet, Up: Top 45 Module `Gsl_bspline' *********************** 45.1 Description ================ Basis Splines 45.2 Interface ============== - type ws - val make : k:int -> nbreak:int -> ws - val ncoeffs : ws -> int - val knots : [< Gsl_vectmat.vec ] -> ws -> unit - val knots_uniform : a:float -> b:float -> ws -> unit - val _eval : float -> [< Gsl_vectmat.vec ] -> ws -> unit - val eval : ws -> float -> [> Gsl_vectmat.vec ]  File: ocamlgsl.info, Node: Gsl_const, Next: Gsl_sf, Prev: Gsl_bspline, Up: Top 46 Module `Gsl_const' ********************* 46.1 Description ================ Values of physical constants 46.2 Interface ============== - val cgsm_speed_of_light : float - val cgsm_gravitational_constant : float - val cgsm_plancks_constant_h : float - val cgsm_plancks_constant_hbar : float - val cgsm_astronomical_unit : float - val cgsm_light_year : float - val cgsm_parsec : float - val cgsm_grav_accel : float - val cgsm_electron_volt : float - val cgsm_mass_electron : float - val cgsm_mass_muon : float - val cgsm_mass_proton : float - val cgsm_mass_neutron : float - val cgsm_rydberg : float - val cgsm_boltzmann : float - val cgsm_bohr_magneton : float - val cgsm_nuclear_magneton : float - val cgsm_electron_magnetic_moment : float - val cgsm_proton_magnetic_moment : float - val cgsm_molar_gas : float - val cgsm_standard_gas_volume : float - val cgsm_minute : float - val cgsm_hour : float - val cgsm_day : float - val cgsm_week : float - val cgsm_inch : float - val cgsm_foot : float - val cgsm_yard : float - val cgsm_mile : float - val cgsm_nautical_mile : float - val cgsm_fathom : float - val cgsm_mil : float - val cgsm_point : float - val cgsm_texpoint : float - val cgsm_micron : float - val cgsm_angstrom : float - val cgsm_hectare : float - val cgsm_acre : float - val cgsm_barn : float - val cgsm_liter : float - val cgsm_us_gallon : float - val cgsm_quart : float - val cgsm_pint : float - val cgsm_cup : float - val cgsm_fluid_ounce : float - val cgsm_tablespoon : float - val cgsm_teaspoon : float - val cgsm_canadian_gallon : float - val cgsm_uk_gallon : float - val cgsm_miles_per_hour : float - val cgsm_kilometers_per_hour : float - val cgsm_knot : float - val cgsm_pound_mass : float - val cgsm_ounce_mass : float - val cgsm_ton : float - val cgsm_metric_ton : float - val cgsm_uk_ton : float - val cgsm_troy_ounce : float - val cgsm_carat : float - val cgsm_unified_atomic_mass : float - val cgsm_gram_force : float - val cgsm_pound_force : float - val cgsm_kilopound_force : float - val cgsm_poundal : float - val cgsm_calorie : float - val cgsm_btu : float - val cgsm_therm : float - val cgsm_horsepower : float - val cgsm_bar : float - val cgsm_std_atmosphere : float - val cgsm_torr : float - val cgsm_meter_of_mercury : float - val cgsm_inch_of_mercury : float - val cgsm_inch_of_water : float - val cgsm_psi : float - val cgsm_poise : float - val cgsm_stokes : float - val cgsm_faraday : float - val cgsm_electron_charge : float - val cgsm_gauss : float - val cgsm_stilb : float - val cgsm_lumen : float - val cgsm_lux : float - val cgsm_phot : float - val cgsm_footcandle : float - val cgsm_lambert : float - val cgsm_footlambert : float - val cgsm_curie : float - val cgsm_roentgen : float - val cgsm_rad : float - val cgsm_solar_mass : float - val cgsm_bohr_radius : float - val cgsm_newton : float - val cgsm_dyne : float - val cgsm_joule : float - val cgsm_erg : float - val cgsm_stefan_boltzmann_constant : float - val cgsm_thomson_cross_section : float - val mksa_speed_of_light : float - val mksa_gravitational_constant : float - val mksa_plancks_constant_h : float - val mksa_plancks_constant_hbar : float - val mksa_astronomical_unit : float - val mksa_light_year : float - val mksa_parsec : float - val mksa_grav_accel : float - val mksa_electron_volt : float - val mksa_mass_electron : float - val mksa_mass_muon : float - val mksa_mass_proton : float - val mksa_mass_neutron : float - val mksa_rydberg : float - val mksa_boltzmann : float - val mksa_bohr_magneton : float - val mksa_nuclear_magneton : float - val mksa_electron_magnetic_moment : float - val mksa_proton_magnetic_moment : float - val mksa_molar_gas : float - val mksa_standard_gas_volume : float - val mksa_minute : float - val mksa_hour : float - val mksa_day : float - val mksa_week : float - val mksa_inch : float - val mksa_foot : float - val mksa_yard : float - val mksa_mile : float - val mksa_nautical_mile : float - val mksa_fathom : float - val mksa_mil : float - val mksa_point : float - val mksa_texpoint : float - val mksa_micron : float - val mksa_angstrom : float - val mksa_hectare : float - val mksa_acre : float - val mksa_barn : float - val mksa_liter : float - val mksa_us_gallon : float - val mksa_quart : float - val mksa_pint : float - val mksa_cup : float - val mksa_fluid_ounce : float - val mksa_tablespoon : float - val mksa_teaspoon : float - val mksa_canadian_gallon : float - val mksa_uk_gallon : float - val mksa_miles_per_hour : float - val mksa_kilometers_per_hour : float - val mksa_knot : float - val mksa_pound_mass : float - val mksa_ounce_mass : float - val mksa_ton : float - val mksa_metric_ton : float - val mksa_uk_ton : float - val mksa_troy_ounce : float - val mksa_carat : float - val mksa_unified_atomic_mass : float - val mksa_gram_force : float - val mksa_pound_force : float - val mksa_kilopound_force : float - val mksa_poundal : float - val mksa_calorie : float - val mksa_btu : float - val mksa_therm : float - val mksa_horsepower : float - val mksa_bar : float - val mksa_std_atmosphere : float - val mksa_torr : float - val mksa_meter_of_mercury : float - val mksa_inch_of_mercury : float - val mksa_inch_of_water : float - val mksa_psi : float - val mksa_poise : float - val mksa_stokes : float - val mksa_faraday : float - val mksa_electron_charge : float - val mksa_gauss : float - val mksa_stilb : float - val mksa_lumen : float - val mksa_lux : float - val mksa_phot : float - val mksa_footcandle : float - val mksa_lambert : float - val mksa_footlambert : float - val mksa_curie : float - val mksa_roentgen : float - val mksa_rad : float - val mksa_solar_mass : float - val mksa_bohr_radius : float - val mksa_newton : float - val mksa_dyne : float - val mksa_joule : float - val mksa_erg : float - val mksa_stefan_boltzmann_constant : float - val mksa_thomson_cross_section : float - val mksa_vacuum_permittivity : float - val mksa_vacuum_permeability : float - val mksa_debye : float - val num_fine_structure : float - val num_avogadro : float - val num_yotta : float - val num_zetta : float - val num_exa : float - val num_peta : float - val num_tera : float - val num_giga : float - val num_mega : float - val num_kilo : float - val num_milli : float - val num_micro : float - val num_nano : float - val num_pico : float - val num_femto : float - val num_atto : float - val num_zepto : float - val num_yocto : float  File: ocamlgsl.info, Node: Gsl_sf, Next: Gsl_cdf, Prev: Gsl_const, Up: Top 47 Module `Gsl_sf' ****************** 47.1 Description ================ Special functions 47.2 Interface ============== - val airy_Ai : float -> Gsl_fun.mode -> float - val airy_Ai_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Bi : float -> Gsl_fun.mode -> float - val airy_Bi_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Ai_scaled : float -> Gsl_fun.mode -> float - val airy_Ai_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Bi_scaled : float -> Gsl_fun.mode -> float - val airy_Bi_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Ai_deriv : float -> Gsl_fun.mode -> float - val airy_Ai_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Bi_deriv : float -> Gsl_fun.mode -> float - val airy_Bi_deriv_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Ai_deriv_scaled : float -> Gsl_fun.mode -> float - val airy_Ai_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_Bi_deriv_scaled : float -> Gsl_fun.mode -> float - val airy_Bi_deriv_scaled_e : float -> Gsl_fun.mode -> Gsl_fun.result - val airy_zero_Ai : int -> float - val airy_zero_Ai_e : int -> Gsl_fun.result - val airy_zero_Bi : int -> float - val airy_zero_Bi_e : int -> Gsl_fun.result - val bessel_J0 : float -> float - val bessel_J0_e : float -> Gsl_fun.result - val bessel_J1 : float -> float - val bessel_J1_e : float -> Gsl_fun.result - val bessel_Jn : int -> float -> float - val bessel_Jn_e : int -> float -> Gsl_fun.result - val bessel_Jn_array : int -> float -> float array -> unit - val bessel_Y0 : float -> float - val bessel_Y0_e : float -> Gsl_fun.result - val bessel_Y1 : float -> float - val bessel_Y1_e : float -> Gsl_fun.result - val bessel_Yn : int -> float -> float - val bessel_Yn_e : int -> float -> Gsl_fun.result - val bessel_Yn_array : int -> float -> float array -> unit - val bessel_I0 : float -> float - val bessel_I0_e : float -> Gsl_fun.result - val bessel_I1 : float -> float - val bessel_I1_e : float -> Gsl_fun.result - val bessel_In : int -> float -> float - val bessel_In_e : int -> float -> Gsl_fun.result - val bessel_In_array : int -> float -> float array -> unit - val bessel_K0 : float -> float - val bessel_K0_e : float -> Gsl_fun.result - val bessel_K1 : float -> float - val bessel_K1_e : float -> Gsl_fun.result - val bessel_Kn : int -> float -> float - val bessel_Kn_e : int -> float -> Gsl_fun.result - val bessel_Kn_array : int -> float -> float array -> unit - val bessel_I0_scaled : float -> float - val bessel_I0_scaled_e : float -> Gsl_fun.result - val bessel_I1_scaled : float -> float - val bessel_I1_scaled_e : float -> Gsl_fun.result - val bessel_In : int -> float -> float - val bessel_In_e : int -> float -> Gsl_fun.result - val bessel_In_scaled_array : int -> float -> float array -> unit - val bessel_K0_scaled : float -> float - val bessel_K0_scaled_e : float -> Gsl_fun.result - val bessel_K1_scaled : float -> float - val bessel_K1_scaled_e : float -> Gsl_fun.result - val bessel_Kn : int -> float -> float - val bessel_Kn_e : int -> float -> Gsl_fun.result - val bessel_Kn_scaled_array : int -> float -> float array -> unit - val bessel_j0 : float -> float - val bessel_j0_e : float -> Gsl_fun.result - val bessel_j1 : float -> float - val bessel_j1_e : float -> Gsl_fun.result - val bessel_j2 : float -> float - val bessel_j2_e : float -> Gsl_fun.result - val bessel_jl : int -> float -> float - val bessel_jl_e : int -> float -> Gsl_fun.result - val bessel_jl_array : int -> float -> float array -> unit - val bessel_jl_steed_array : float -> float array -> unit - val bessel_y0 : float -> float - val bessel_y0_e : float -> Gsl_fun.result - val bessel_y1 : float -> float - val bessel_y1_e : float -> Gsl_fun.result - val bessel_y2 : float -> float - val bessel_y2_e : float -> Gsl_fun.result - val bessel_yl : int -> float -> float - val bessel_yl_e : int -> float -> Gsl_fun.result - val bessel_yl_array : int -> float -> float array -> unit - val bessel_i0_scaled : float -> float - val bessel_i0_scaled_e : float -> Gsl_fun.result - val bessel_i1_scaled : float -> float - val bessel_i1_scaled_e : float -> Gsl_fun.result - val bessel_il_scaled : int -> float -> float - val bessel_il_scaled_e : int -> float -> Gsl_fun.result - val bessel_il_scaled_array : int -> float -> float array -> unit - val bessel_k0_scaled : float -> float - val bessel_k0_scaled_e : float -> Gsl_fun.result - val bessel_k1_scaled : float -> float - val bessel_k1_scaled_e : float -> Gsl_fun.result - val bessel_kl_scaled : int -> float -> float - val bessel_kl_scaled_e : int -> float -> Gsl_fun.result - val bessel_kl_scaled_array : int -> float -> float array -> unit - val bessel_Jnu : float -> float -> float - val bessel_Jnu_e : float -> float -> Gsl_fun.result - val bessel_sequence_Jnu_e : float -> Gsl_fun.mode -> float array -> unit - val bessel_Ynu : float -> float -> float - val bessel_Ynu_e : float -> float -> Gsl_fun.result - val bessel_Inu : float -> float -> float - val bessel_Inu_e : float -> float -> Gsl_fun.result - val bessel_Inu_scaled : float -> float -> float - val bessel_Inu_scaled_e : float -> float -> Gsl_fun.result - val bessel_Knu : float -> float -> float - val bessel_Knu_e : float -> float -> Gsl_fun.result - val bessel_lnKnu : float -> float -> float - val bessel_lnKnu_e : float -> float -> Gsl_fun.result - val bessel_Knu_scaled : float -> float -> float - val bessel_Knu_scaled_e : float -> float -> Gsl_fun.result - val bessel_zero_J0 : int -> float - val bessel_zero_J0_e : int -> Gsl_fun.result - val bessel_zero_J1 : int -> float - val bessel_zero_J1_e : int -> Gsl_fun.result - val bessel_zero_Jnu : float -> int -> float - val bessel_zero_Jnu_e : float -> int -> Gsl_fun.result - val clausen : float -> float - val clausen_e : float -> Gsl_fun.result - val hydrogenicR_1 : float -> float -> float - val hydrogenicR_1_e : float -> float -> Gsl_fun.result - val hydrogenicR : int -> int -> float -> float -> float - val hydrogenicR_e : int -> int -> float -> float -> Gsl_fun.result - val coulomb_CL_e : float -> float -> Gsl_fun.result - val coulomb_CL_array : float -> float -> float array -> unit - val dawson : float -> float - val dawson_e : float -> Gsl_fun.result - val debye_1 : float -> float - val debye_1_e : float -> Gsl_fun.result - val debye_2 : float -> float - val debye_2_e : float -> Gsl_fun.result - val debye_3 : float -> float - val debye_3_e : float -> Gsl_fun.result - val debye_4 : float -> float - val debye_4_e : float -> Gsl_fun.result - val debye_5 : float -> float - val debye_5_e : float -> Gsl_fun.result - val debye_6 : float -> float - val debye_6_e : float -> Gsl_fun.result - val dilog : float -> float - val dilog_e : float -> Gsl_fun.result - val complex_dilog_xy_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val complex_dilog_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val complex_spence_xy_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val multiply_e : float -> float -> Gsl_fun.result - val multiply_err_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result - val ellint_Kcomp : float -> Gsl_fun.mode -> float - val ellint_Kcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_Ecomp : float -> Gsl_fun.mode -> float - val ellint_Ecomp_e : float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_Pcomp : float -> float -> Gsl_fun.mode -> float - val ellint_Pcomp_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_Dcomp : float -> Gsl_fun.mode -> float - val ellint_Dcomp_e : float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_F : float -> float -> Gsl_fun.mode -> float - val ellint_F_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_E : float -> float -> Gsl_fun.mode -> float - val ellint_E_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_P : float -> float -> float -> Gsl_fun.mode -> float - val ellint_P_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_D : float -> float -> float -> Gsl_fun.mode -> float - val ellint_D_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_RC : float -> float -> Gsl_fun.mode -> float - val ellint_RC_e : float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_RD : float -> float -> float -> Gsl_fun.mode -> float - val ellint_RD_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_RF : float -> float -> float -> Gsl_fun.mode -> float - val ellint_RF_e : float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result - val ellint_RJ : float -> float -> float -> float -> Gsl_fun.mode -> float - val ellint_RJ_e : float -> float -> float -> float -> Gsl_fun.mode -> Gsl_fun.result - val erf : float -> float - val erf_e : float -> Gsl_fun.result - val erfc : float -> float - val erfc_e : float -> Gsl_fun.result - val log_erfc : float -> float - val log_erfc_e : float -> Gsl_fun.result - val erf_Z : float -> float - val erf_Z_e : float -> Gsl_fun.result - val erf_Q : float -> float - val erf_Q_e : float -> Gsl_fun.result - val exp : float -> float - val exp_e : float -> Gsl_fun.result - val exp_e10 : float -> Gsl_fun.result_e10 - val exp_mult : float -> float -> float - val exp_mult_e : float -> float -> Gsl_fun.result - val exp_mult_e10 : float -> float -> Gsl_fun.result_e10 - val expm1 : float -> float - val expm1_e : float -> Gsl_fun.result - val exprel : float -> float - val exprel_e : float -> Gsl_fun.result - val exprel_2 : float -> float - val exprel_2_e : float -> Gsl_fun.result - val exprel_n : int -> float -> float - val exprel_n_e : int -> float -> Gsl_fun.result - val exp_err_e : x:float -> dx:float -> Gsl_fun.result - val exp_err_e10 : x:float -> dx:float -> Gsl_fun.result_e10 - val exp_mult_err_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result - val exp_mult_err_e10_e : x:float -> dx:float -> y:float -> dy:float -> Gsl_fun.result_e10 - val expint_E1 : float -> float - val expint_E1_e : float -> Gsl_fun.result - val expint_E2 : float -> float - val expint_E2_e : float -> Gsl_fun.result - val expint_E1_scaled : float -> float - val expint_E1_scaled_e : float -> Gsl_fun.result - val expint_E2_scaled : float -> float - val expint_E2_scaled_e : float -> Gsl_fun.result - val expint_Ei : float -> float - val expint_Ei_e : float -> Gsl_fun.result - val expint_Ei_scaled : float -> float - val expint_Ei_scaled_e : float -> Gsl_fun.result - val shi : float -> float - val chi : float -> float - val expint_3 : float -> float - val expint_3_e : float -> Gsl_fun.result - val si : float -> float - val ci : float -> float - val atanint : float -> float - val atanint_e : float -> Gsl_fun.result - val fermi_dirac_m1 : float -> float - val fermi_dirac_m1_e : float -> Gsl_fun.result - val fermi_dirac_0 : float -> float - val fermi_dirac_0_e : float -> Gsl_fun.result - val fermi_dirac_1 : float -> float - val fermi_dirac_1_e : float -> Gsl_fun.result - val fermi_dirac_2 : float -> float - val fermi_dirac_2_e : float -> Gsl_fun.result - val fermi_dirac_int : int -> float -> float - val fermi_dirac_int_e : int -> float -> Gsl_fun.result - val fermi_dirac_mhalf : float -> float - val fermi_dirac_mhalf_e : float -> Gsl_fun.result - val fermi_dirac_half : float -> float - val fermi_dirac_half_e : float -> Gsl_fun.result - val fermi_dirac_3half : float -> float - val fermi_dirac_3half_e : float -> Gsl_fun.result - val fermi_dirac_inc_0 : float -> float -> float - val fermi_dirac_inc_0_e : float -> float -> Gsl_fun.result - val gamma : float -> float - val gamma_e : float -> Gsl_fun.result - val lngamma : float -> float - val lngamma_e : float -> Gsl_fun.result - val lngamma_sgn_e : float -> Gsl_fun.result * float - val gammastar : float -> float - val gammastar_e : float -> Gsl_fun.result - val gammainv : float -> float - val gammainv_e : float -> Gsl_fun.result - val lngamma_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val taylorcoeff : int -> float -> float - val taylorcoeff_e : int -> float -> Gsl_fun.result - val fact : int -> float - val fact_e : int -> Gsl_fun.result - val doublefact : int -> float - val doublefact_e : int -> Gsl_fun.result - val lnfact : int -> float - val lnfact_e : int -> Gsl_fun.result - val lndoublefact : int -> float - val lndoublefact_e : int -> Gsl_fun.result - val choose : int -> int -> float - val choose_e : int -> int -> Gsl_fun.result - val lnchoose : int -> int -> float - val lnchoose_e : int -> int -> Gsl_fun.result - val poch : float -> float -> float - val poch_e : float -> float -> Gsl_fun.result - val lnpoch : float -> float -> float - val lnpoch_e : float -> float -> Gsl_fun.result - val lnpoch_sgn_e : float -> float -> Gsl_fun.result * float - val pochrel : float -> float -> float - val pochrel_e : float -> float -> Gsl_fun.result - val gamma_inc_Q : float -> float -> float - val gamma_inc_Q_e : float -> float -> Gsl_fun.result - val gamma_inc_P : float -> float -> float - val gamma_inc_P_e : float -> float -> Gsl_fun.result - val gamma_inc : float -> float -> float - val gamma_inc_e : float -> float -> Gsl_fun.result - val beta : float -> float -> float - val beta_e : float -> float -> Gsl_fun.result - val lnbeta : float -> float -> float - val lnbeta_e : float -> float -> Gsl_fun.result - val lnbeta_sgn_e : float -> float -> Gsl_fun.result * float - val beta_inc : float -> float -> float -> float - val beta_inc_e : float -> float -> float -> Gsl_fun.result - val gegenpoly_1 : float -> float -> float - val gegenpoly_1_e : float -> float -> Gsl_fun.result - val gegenpoly_2 : float -> float -> float - val gegenpoly_2_e : float -> float -> Gsl_fun.result - val gegenpoly_3 : float -> float -> float - val gegenpoly_3_e : float -> float -> Gsl_fun.result - val gegenpoly_n : int -> float -> float -> float - val gegenpoly_n_e : int -> float -> float -> Gsl_fun.result - val gegenpoly_array : float -> float -> float array -> unit - val laguerre_1 : float -> float -> float - val laguerre_1_e : float -> float -> Gsl_fun.result - val laguerre_2 : float -> float -> float - val laguerre_2_e : float -> float -> Gsl_fun.result - val laguerre_3 : float -> float -> float - val laguerre_3_e : float -> float -> Gsl_fun.result - val laguerre_n : int -> float -> float -> float - val laguerre_n_e : int -> float -> float -> Gsl_fun.result - val lambert_W0 : float -> float - val lambert_W0_e : float -> Gsl_fun.result - val lambert_Wm1 : float -> float - val lambert_Wm1_e : float -> Gsl_fun.result - val legendre_P1 : float -> float - val legendre_P1_e : float -> Gsl_fun.result - val legendre_P2 : float -> float - val legendre_P2_e : float -> Gsl_fun.result - val legendre_P3 : float -> float - val legendre_P3_e : float -> Gsl_fun.result - val legendre_Pl : int -> float -> float - val legendre_Pl_e : int -> float -> Gsl_fun.result - val legendre_Pl_array : float -> float array -> unit - val legendre_Q0 : float -> float - val legendre_Q0_e : float -> Gsl_fun.result - val legendre_Q1 : float -> float - val legendre_Q1_e : float -> Gsl_fun.result - val legendre_Ql : int -> float -> float - val legendre_Ql_e : int -> float -> Gsl_fun.result - val legendre_Plm : int -> int -> float -> float - val legendre_Plm_e : int -> int -> float -> Gsl_fun.result - val legendre_Plm_array : int -> int -> float -> float array -> unit - val legendre_sphPlm : int -> int -> float -> float - val legendre_sphPlm_e : int -> int -> float -> Gsl_fun.result - val legendre_sphPlm_array : int -> int -> float -> float array -> unit - val legendre_array_size : int -> int -> int - val log : float -> float - val log_e : float -> Gsl_fun.result - val log_abs : float -> float - val log_abs_e : float -> Gsl_fun.result - val log_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val log_1plusx : float -> float - val log_1plusx_e : float -> Gsl_fun.result - val log_1plusx_mx : float -> float - val log_1plusx_mx_e : float -> Gsl_fun.result - val pow_int : float -> int -> float - val pow_int_e : float -> int -> Gsl_fun.result - val psi_int : int -> float - val psi_int_e : int -> Gsl_fun.result - val psi : float -> float - val psi_e : float -> Gsl_fun.result - val psi_1piy : float -> float - val psi_1piy_e : float -> Gsl_fun.result - val psi_complex_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val psi_1_int : int -> float - val psi_1_int_e : int -> Gsl_fun.result - val psi_1 : float -> float - val psi_1_e : float -> Gsl_fun.result - val psi_n : int -> float -> float - val psi_n_e : int -> float -> Gsl_fun.result - val synchrotron_1 : float -> float - val synchrotron_1_e : float -> Gsl_fun.result - val synchrotron_2 : float -> float - val synchrotron_2_e : float -> Gsl_fun.result - val transport_2 : float -> float - val transport_2_e : float -> Gsl_fun.result - val transport_3 : float -> float - val transport_3_e : float -> Gsl_fun.result - val transport_4 : float -> float - val transport_4_e : float -> Gsl_fun.result - val transport_5 : float -> float - val transport_5_e : float -> Gsl_fun.result - val sin : float -> float - val sin_e : float -> Gsl_fun.result - val cos : float -> float - val cos_e : float -> Gsl_fun.result - val hypot : float -> float - val hypot_e : float -> Gsl_fun.result - val sinc : float -> float - val sinc_e : float -> Gsl_fun.result - val complex_sin_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val complex_cos_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val complex_logsin_e : float -> float -> Gsl_fun.result * Gsl_fun.result - val lnsinh : float -> float - val lnsinh_e : float -> Gsl_fun.result - val lncosh : float -> float - val lncosh_e : float -> Gsl_fun.result - val rect_of_polar : r:float -> theta:float -> Gsl_fun.result * Gsl_fun.result - val polar_of_rect : x:float -> y:float -> Gsl_fun.result * Gsl_fun.result - val angle_restrict_symm : float -> float - val angle_restrict_pos : float -> float - val sin_err_e : float -> dx:float -> Gsl_fun.result - val cos_err_e : float -> dx:float -> Gsl_fun.result - val zeta_int : int -> float - val zeta_int_e : int -> Gsl_fun.result - val zeta : float -> float - val zeta_e : float -> Gsl_fun.result - val hzeta : float -> float -> float - val hzeta_e : float -> float -> Gsl_fun.result - val eta_int : int -> float - val eta_int_e : int -> Gsl_fun.result - val eta : float -> float - val eta_e : float -> Gsl_fun.result  File: ocamlgsl.info, Node: Gsl_cdf, Next: Types index, Prev: Gsl_sf, Up: Top 48 Module `Gsl_cdf' ******************* 48.1 Description ================ Cumulative distribution functions 48.2 Interface ============== - val ugaussian_P : x:float -> float - val ugaussian_Q : x:float -> float - val ugaussian_Pinv : p:float -> float - val ugaussian_Qinv : q:float -> float - val gaussian_P : x:float -> sigma:float -> float - val gaussian_Q : x:float -> sigma:float -> float - val gaussian_Pinv : p:float -> sigma:float -> float - val gaussian_Qinv : q:float -> sigma:float -> float - val gamma_P : x:float -> a:float -> b:float -> float - val gamma_Q : x:float -> a:float -> b:float -> float - val gamma_Pinv : p:float -> a:float -> b:float -> float - val gamma_Qinv : q:float -> a:float -> b:float -> float - val cauchy_P : x:float -> a:float -> float - val cauchy_Q : x:float -> a:float -> float - val cauchy_Pinv : p:float -> a:float -> float - val cauchy_Qinv : q:float -> a:float -> float - val laplace_P : x:float -> a:float -> float - val laplace_Q : x:float -> a:float -> float - val laplace_Pinv : p:float -> a:float -> float - val laplace_Qinv : q:float -> a:float -> float - val rayleigh_P : x:float -> sigma:float -> float - val rayleigh_Q : x:float -> sigma:float -> float - val rayleigh_Pinv : p:float -> sigma:float -> float - val rayleigh_Qinv : q:float -> sigma:float -> float - val chisq_P : x:float -> nu:float -> float - val chisq_Q : x:float -> nu:float -> float - val chisq_Pinv : p:float -> nu:float -> float - val chisq_Qinv : q:float -> nu:float -> float - val exponential_P : x:float -> mu:float -> float - val exponential_Q : x:float -> mu:float -> float - val exponential_Pinv : p:float -> mu:float -> float - val exponential_Qinv : q:float -> mu:float -> float - val exppow_P : x:float -> a:float -> b:float -> float - val exppow_Q : x:float -> a:float -> b:float -> float - val tdist_P : x:float -> nu:float -> float - val tdist_Q : x:float -> nu:float -> float - val tdist_Pinv : p:float -> nu:float -> float - val tdist_Qinv : q:float -> nu:float -> float - val fdist_P : x:float -> nu1:float -> nu2:float -> float - val fdist_Q : x:float -> nu1:float -> nu2:float -> float - val fdist_Pinv : p:float -> nu1:float -> nu2:float -> float - val fdist_Qinv : q:float -> nu1:float -> nu2:float -> float - val beta_P : x:float -> a:float -> b:float -> float - val beta_Q : x:float -> a:float -> b:float -> float - val beta_Pinv : p:float -> a:float -> b:float -> float - val beta_Qinv : q:float -> a:float -> b:float -> float - val flat_P : x:float -> a:float -> b:float -> float - val flat_Q : x:float -> a:float -> b:float -> float - val flat_Pinv : p:float -> a:float -> b:float -> float - val flat_Qinv : q:float -> a:float -> b:float -> float - val lognormal_P : x:float -> zeta:float -> sigma:float -> float - val lognormal_Q : x:float -> zeta:float -> sigma:float -> float - val lognormal_Pinv : p:float -> zeta:float -> sigma:float -> float - val lognormal_Qinv : q:float -> zeta:float -> sigma:float -> float - val gumbel1_P : x:float -> a:float -> b:float -> float - val gumbel1_Q : x:float -> a:float -> b:float -> float - val gumbel1_Pinv : p:float -> a:float -> b:float -> float - val gumbel1_Qinv : q:float -> a:float -> b:float -> float - val gumbel2_P : x:float -> a:float -> b:float -> float - val gumbel2_Q : x:float -> a:float -> b:float -> float - val gumbel2_Pinv : p:float -> a:float -> b:float -> float - val gumbel2_Qinv : q:float -> a:float -> b:float -> float - val weibull_P : x:float -> a:float -> b:float -> float - val weibull_Q : x:float -> a:float -> b:float -> float - val weibull_Pinv : p:float -> a:float -> b:float -> float - val weibull_Qinv : q:float -> a:float -> b:float -> float - val pareto_P : x:float -> a:float -> b:float -> float - val pareto_Q : x:float -> a:float -> b:float -> float - val pareto_Pinv : p:float -> a:float -> b:float -> float - val pareto_Qinv : q:float -> a:float -> b:float -> float - val logistic_P : x:float -> a:float -> float - val logistic_Q : x:float -> a:float -> float - val logistic_Pinv : p:float -> a:float -> float - val logistic_Qinv : q:float -> a:float -> float - val binomial_P : k:int -> p:float -> n:int -> float - val binomial_Q : k:int -> p:float -> n:int -> float - val poisson_P : k:int -> mu:float -> float - val poisson_Q : k:int -> mu:float -> float - val geometric_P : k:int -> p:float -> float - val geometric_Q : k:int -> p:float -> float - val negative_binomial_P : k:int -> p:float -> n:float -> float - val negative_binomial_Q : k:int -> p:float -> n:float -> float - val pascal_P : k:int -> p:float -> n:int -> float - val pascal_Q : k:int -> p:float -> n:int -> float  File: ocamlgsl.info, Node: Types index, Next: Exceptions index, Prev: Gsl_cdf, Up: Top Types index *********** [index] * Menu: * accel: Gsl_interp. (line 19) * cmat: Gsl_vectmat. (line 57) * complex: Gsl_complex. (line 19) * complex_array: Gsl_complex. (line 26) * complex_double_vector_bigarr: Gsl_vector_complex. (line 23) * complex_float_mat_bigarr: Gsl_matrix_complex/Single. (line 11) * complex_float_vector_bigarr: Gsl_vector_complex/Single. (line 11) * complex_mat_bigarr: Gsl_matrix_complex. (line 23) * complex_mat_flat: Gsl_matrix_complex_flat. (line 22) * complex_vector_flat: Gsl_vector_complex_flat. (line 21) * control: Gsl_odeiv. (line 67) * cubic_sol: Gsl_poly. (line 48) * cvec: Gsl_vectmat. (line 54) * diag <1>: Gsl_blas_gen. (line 36) * diag <2>: Gsl_blas_flat. (line 36) * diag: Gsl_blas. (line 43) * direction <1>: Gsl_wavelet. (line 33) * direction: Gsl_fft/Complex. (line 19) * discrete: Gsl_randist. (line 268) * double_mat_bigarr: Gsl_matrix. (line 23) * double_mat_flat: Gsl_matrix_flat. (line 22) * double_vector_bigarr: Gsl_vector. (line 26) * double_vector_flat: Gsl_vector_flat. (line 21) * errno: Gsl_error. (line 89) * evolve: Gsl_odeiv. (line 106) * exceptions: Gsl_ieee. (line 66) * excepts: Gsl_ieee. (line 87) * fft_array: Gsl_fft. (line 38) * float_mat_bigarr: Gsl_matrix/Single. (line 11) * float_rep: Gsl_ieee. (line 32) * float_vector_bigarr: Gsl_vector/Single. (line 11) * gsl_fun: Gsl_fun. (line 57) * gsl_fun_fdf: Gsl_fun. (line 64) * hadjust: Gsl_odeiv. (line 96) * herm_ws: Gsl_eigen. (line 74) * hermv_ws: Gsl_eigen. (line 93) * histo_pdf: Gsl_histo. (line 158) * ieee_type: Gsl_ieee. (line 24) * interp: Gsl_interp. (line 81) * interp_type: Gsl_interp. (line 28) * key: Gsl_integration. (line 38) * kind <1>: Gsl_wavelet. (line 28) * kind <2>: Gsl_monte. (line 22) * kind <3>: Gsl_multimin/NoDeriv. (line 12) * kind <4>: Gsl_multimin/Deriv. (line 16) * kind <5>: Gsl_min. (line 18) * kind <6>: Gsl_multiroot/Deriv. (line 15) * kind <7>: Gsl_multiroot/NoDeriv. (line 15) * kind <8>: Gsl_root/Polish. (line 14) * kind <9>: Gsl_root/Bracket. (line 14) * kind: Gsl_multifit_nlin. (line 21) * layout: Gsl_fft. (line 32) * linear_fit_coeffs: Gsl_fit. (line 23) * mat: Gsl_vectmat. (line 30) * matrix <1>: Gsl_matrix_complex_flat. (line 25) * matrix <2>: Gsl_matrix_complex/Single. (line 14) * matrix <3>: Gsl_matrix_complex. (line 26) * matrix <4>: Gsl_matrix_flat. (line 25) * matrix <5>: Gsl_matrix/Single. (line 14) * matrix: Gsl_matrix. (line 26) * miser_params: Gsl_monte. (line 66) * miser_state: Gsl_monte. (line 57) * mode: Gsl_fun. (line 45) * monte_fun: Gsl_fun. (line 67) * mul_fit_coeffs: Gsl_fit. (line 39) * multi_fun: Gsl_fun. (line 70) * multi_fun_fdf: Gsl_fun. (line 77) * multim_fun: Gsl_fun. (line 80) * multim_fun_fdf: Gsl_fun. (line 87) * nonsymm_ws: Gsl_eigen. (line 120) * nonsymmv_ws: Gsl_eigen. (line 145) * order <1>: Gsl_blas_gen. (line 20) * order <2>: Gsl_blas_flat. (line 20) * order: Gsl_blas. (line 27) * ordering: Gsl_wavelet. (line 94) * params: Gsl_siman. (line 32) * permut: Gsl_permut. (line 16) * plain_state: Gsl_monte. (line 37) * poly: Gsl_poly. (line 16) * precision: Gsl_ieee. (line 49) * qawo_sine: Gsl_integration. (line 133) * qawo_table: Gsl_integration. (line 128) * qaws_table: Gsl_integration. (line 103) * qrng_type: Gsl_qrng. (line 18) * quad_sol: Gsl_poly. (line 31) * result: Gsl_fun. (line 23) * result_e10: Gsl_fun. (line 33) * rng_type: Gsl_rng. (line 78) * rounding: Gsl_ieee. (line 56) * side <1>: Gsl_blas_gen. (line 41) * side <2>: Gsl_blas_flat. (line 41) * side: Gsl_blas. (line 48) * sort: Gsl_eigen. (line 64) * step: Gsl_odeiv. (line 25) * step_kind: Gsl_odeiv. (line 39) * symm_ws: Gsl_eigen. (line 19) * symmv_ws: Gsl_eigen. (line 39) * system: Gsl_odeiv. (line 16) * t <1>: Gsl_wavelet. (line 16) * t <2>: Gsl_histo. (line 23) * t <3>: Gsl_cheb. (line 16) * t <4>: Gsl_multimin/NoDeriv. (line 15) * t <5>: Gsl_multimin/Deriv. (line 19) * t <6>: Gsl_min. (line 21) * t <7>: Gsl_multiroot/Deriv. (line 18) * t <8>: Gsl_multiroot/NoDeriv. (line 18) * t <9>: Gsl_root/Polish. (line 17) * t <10>: Gsl_root/Bracket. (line 17) * t <11>: Gsl_multifit_nlin. (line 16) * t <12>: Gsl_qrng. (line 21) * t <13>: Gsl_rng. (line 81) * t: Gsl_interp. (line 16) * transpose <1>: Gsl_blas_gen. (line 26) * transpose <2>: Gsl_blas_flat. (line 26) * transpose: Gsl_blas. (line 33) * uplo <1>: Gsl_blas_gen. (line 31) * uplo <2>: Gsl_blas_flat. (line 31) * uplo: Gsl_blas. (line 38) * vec: Gsl_vectmat. (line 19) * vector <1>: Gsl_vector_complex_flat. (line 24) * vector <2>: Gsl_vector_complex/Single. (line 14) * vector <3>: Gsl_vector_complex. (line 26) * vector <4>: Gsl_vector_flat. (line 24) * vector <5>: Gsl_vector/Single. (line 14) * vector: Gsl_vector. (line 29) * vegas_info: Gsl_monte. (line 101) * vegas_mode: Gsl_monte. (line 107) * vegas_params: Gsl_monte. (line 119) * vegas_state: Gsl_monte. (line 94) * wavetable <1>: Gsl_fft/Complex. (line 14) * wavetable <2>: Gsl_fft/Halfcomplex. (line 11) * wavetable: Gsl_fft/Real. (line 14) * workspace <1>: Gsl_fft/Complex. (line 11) * workspace <2>: Gsl_fft/Real. (line 11) * workspace: Gsl_integration. (line 21) * ws <1>: Gsl_bspline. (line 16) * ws <2>: Gsl_wavelet. (line 19) * ws <3>: Gsl_sum/Trunc. (line 11) * ws <4>: Gsl_sum. (line 23) * ws: Gsl_multifit. (line 16) * ws_info <1>: Gsl_sum/Trunc. (line 26) * ws_info: Gsl_sum. (line 38)  File: ocamlgsl.info, Node: Exceptions index, Next: Values index, Prev: Types index, Up: Top Exceptions index **************** [index] * Menu: * Gsl_exn: Gsl_error. (line 92) * Wrong_layout: Gsl_fft. (line 25) ocamlgsl-0.6.0/ocamlgsl.info-20000664000076400007640000045464410607755612014703 0ustar olivolivThis is ocamlgsl.info, produced by makeinfo version 4.8 from ocamlgsl.texi. INFO-DIR-SECTION Objective Caml START-INFO-DIR-ENTRY * ocamlgsl 0.6.0: (ocamlgsl). END-INFO-DIR-ENTRY This file was generated by Ocamldoc using the Texinfo generator.  File: ocamlgsl.info, Node: Values index, Next: Modules index, Prev: Exceptions index, Up: Top Values index ************ [index] * Menu: * _eval: Gsl_bspline. (line 36) * _exponential: Gsl_linalg. (line 521) * _herm: Gsl_eigen. (line 82) * _hermv: Gsl_eigen. (line 102) * _HH_solve: Gsl_linalg. (line 473) * _HH_svx: Gsl_linalg. (line 477) * _L_solve_T: Gsl_linalg. (line 317) * _linear: Gsl_multifit. (line 27) * _linear_svd: Gsl_multifit. (line 35) * _LQ_decomp: Gsl_linalg. (line 290) * _LQ_LQsolve: Gsl_linalg. (line 340) * _LQ_Lsolve_T: Gsl_linalg. (line 309) * _LQ_lssolve_T: Gsl_linalg. (line 305) * _LQ_Lsvx_T: Gsl_linalg. (line 313) * _LQ_solve_T: Gsl_linalg. (line 295) * _LQ_svx_T: Gsl_linalg. (line 299) * _LQ_unpack: Gsl_linalg. (line 330) * _LQ_update: Gsl_linalg. (line 335) * _LQ_vecQ: Gsl_linalg. (line 321) * _LQ_vecQT: Gsl_linalg. (line 325) * _LU_decomp: Gsl_linalg. (line 39) * _LU_det: Gsl_linalg. (line 63) * _LU_invert: Gsl_linalg. (line 59) * _LU_lndet: Gsl_linalg. (line 67) * _LU_refine: Gsl_linalg. (line 55) * _LU_sgndet: Gsl_linalg. (line 71) * _LU_solve: Gsl_linalg. (line 44) * _LU_svx: Gsl_linalg. (line 48) * _nonsymm: Gsl_eigen. (line 128) * _nonsymm_Z: Gsl_eigen. (line 133) * _nonsymmv: Gsl_eigen. (line 154) * _nonsymmv_Z: Gsl_eigen. (line 160) * _PTLQ_decomp: Gsl_linalg. (line 348) * _PTLQ_decomp2: Gsl_linalg. (line 355) * _PTLQ_LQsolve_T: Gsl_linalg. (line 372) * _PTLQ_Lsolve_T: Gsl_linalg. (line 377) * _PTLQ_Lsvx_T: Gsl_linalg. (line 381) * _PTLQ_solve_T: Gsl_linalg. (line 361) * _PTLQ_svx_T: Gsl_linalg. (line 366) * _PTLQ_update: Gsl_linalg. (line 387) * _QR_decomp: Gsl_linalg. (line 162) * _QR_lssolve: Gsl_linalg. (line 177) * _QR_QRsolve: Gsl_linalg. (line 203) * _QR_QTvec: Gsl_linalg. (line 181) * _QR_Qvec: Gsl_linalg. (line 185) * _QR_Rsolve: Gsl_linalg. (line 189) * _QR_Rsvx: Gsl_linalg. (line 193) * _QR_solve: Gsl_linalg. (line 167) * _QR_svx: Gsl_linalg. (line 171) * _QR_unpack: Gsl_linalg. (line 198) * _QR_update: Gsl_linalg. (line 208) * _QRPT_decomp: Gsl_linalg. (line 220) * _QRPT_decomp2: Gsl_linalg. (line 227) * _QRPT_QRsolve: Gsl_linalg. (line 244) * _QRPT_Rsolve: Gsl_linalg. (line 255) * _QRPT_Rsvx: Gsl_linalg. (line 259) * _QRPT_solve: Gsl_linalg. (line 233) * _QRPT_svx: Gsl_linalg. (line 238) * _QRPT_update: Gsl_linalg. (line 250) * _R_solve: Gsl_linalg. (line 212) * _SV_decomp: Gsl_linalg. (line 267) * _SV_decomp_jacobi: Gsl_linalg. (line 277) * _SV_decomp_mod: Gsl_linalg. (line 273) * _SV_solve: Gsl_linalg. (line 283) * _symm: Gsl_eigen. (line 27) * _symmv: Gsl_eigen. (line 48) * abs: Gsl_complex. (line 65) * abs2: Gsl_complex. (line 69) * absdev: Gsl_stats. (line 37) * accel <1>: Gsl_sum/Trunc. (line 19) * accel: Gsl_sum. (line 31) * accumulate: Gsl_histo. (line 55) * acosh: Gsl_math. (line 141) * add <1>: Gsl_histo. (line 128) * add <2>: Gsl_matrix_complex_flat. (line 90) * add <3>: Gsl_matrix_complex/Single. (line 83) * add <4>: Gsl_matrix_complex. (line 94) * add <5>: Gsl_matrix_flat. (line 85) * add <6>: Gsl_matrix/Single. (line 74) * add <7>: Gsl_matrix. (line 86) * add <8>: Gsl_vector_flat. (line 90) * add <9>: Gsl_vector/Single. (line 70) * add <10>: Gsl_vector. (line 88) * add: Gsl_complex. (line 80) * add_constant <1>: Gsl_vectmat. (line 226) * add_constant <2>: Gsl_matrix_complex_flat. (line 110) * add_constant <3>: Gsl_matrix_complex/Single. (line 103) * add_constant <4>: Gsl_matrix_complex. (line 114) * add_constant <5>: Gsl_matrix_flat. (line 105) * add_constant <6>: Gsl_matrix/Single. (line 94) * add_constant <7>: Gsl_matrix. (line 106) * add_constant <8>: Gsl_vector_flat. (line 110) * add_constant <9>: Gsl_vector/Single. (line 90) * add_constant: Gsl_vector. (line 108) * add_diagonal <1>: Gsl_matrix_complex_flat. (line 114) * add_diagonal <2>: Gsl_matrix_complex/Single. (line 107) * add_diagonal <3>: Gsl_matrix_complex. (line 118) * add_diagonal <4>: Gsl_matrix_flat. (line 109) * add_diagonal <5>: Gsl_matrix/Single. (line 98) * add_diagonal: Gsl_matrix. (line 110) * add_imag: Gsl_complex. (line 112) * add_real: Gsl_complex. (line 96) * airy_Ai: Gsl_sf. (line 17) * airy_Ai_deriv: Gsl_sf. (line 49) * airy_Ai_deriv_e: Gsl_sf. (line 53) * airy_Ai_deriv_scaled: Gsl_sf. (line 65) * airy_Ai_deriv_scaled_e: Gsl_sf. (line 69) * airy_Ai_e: Gsl_sf. (line 21) * airy_Ai_scaled: Gsl_sf. (line 33) * airy_Ai_scaled_e: Gsl_sf. (line 37) * airy_Bi: Gsl_sf. (line 25) * airy_Bi_deriv: Gsl_sf. (line 57) * airy_Bi_deriv_e: Gsl_sf. (line 61) * airy_Bi_deriv_scaled: Gsl_sf. (line 73) * airy_Bi_deriv_scaled_e: Gsl_sf. (line 77) * airy_Bi_e: Gsl_sf. (line 29) * airy_Bi_scaled: Gsl_sf. (line 41) * airy_Bi_scaled_e: Gsl_sf. (line 45) * airy_zero_Ai: Gsl_sf. (line 81) * airy_zero_Ai_e: Gsl_sf. (line 85) * airy_zero_Bi: Gsl_sf. (line 89) * airy_zero_Bi_e: Gsl_sf. (line 93) * alloc_qawo: Gsl_integration. (line 138) * alloc_qaws: Gsl_integration. (line 107) * angle_restrict_pos: Gsl_sf. (line 1521) * angle_restrict_symm: Gsl_sf. (line 1517) * arccos: Gsl_complex. (line 213) * arccos_real: Gsl_complex. (line 217) * arccosh: Gsl_complex. (line 279) * arccosh_real: Gsl_complex. (line 283) * arccot: Gsl_complex. (line 241) * arccoth: Gsl_complex. (line 303) * arccsc: Gsl_complex. (line 233) * arccsc_real: Gsl_complex. (line 237) * arccsch: Gsl_complex. (line 299) * arcsec: Gsl_complex. (line 225) * arcsec_real: Gsl_complex. (line 229) * arcsech: Gsl_complex. (line 295) * arcsin: Gsl_complex. (line 205) * arcsin_real: Gsl_complex. (line 209) * arcsinh: Gsl_complex. (line 275) * arctan: Gsl_complex. (line 221) * arctanh: Gsl_complex. (line 287) * arctanh_real: Gsl_complex. (line 291) * arg: Gsl_complex. (line 61) * asinh: Gsl_math. (line 145) * asum <1>: Gsl_blas_gen/Complex. (line 24) * asum <2>: Gsl_blas_gen. (line 53) * asum <3>: Gsl_blas_flat/Complex. (line 26) * asum <4>: Gsl_blas_flat. (line 53) * asum <5>: Gsl_blas/Complex_Single. (line 29) * asum <6>: Gsl_blas/Complex. (line 27) * asum <7>: Gsl_blas/Single. (line 31) * asum: Gsl_blas. (line 63) * atanh: Gsl_math. (line 149) * atanint: Gsl_sf. (line 877) * atanint_e: Gsl_sf. (line 881) * axpy <1>: Gsl_blas_gen/Complex. (line 40) * axpy <2>: Gsl_blas_gen. (line 69) * axpy <3>: Gsl_blas_flat/Complex. (line 43) * axpy <4>: Gsl_blas_flat. (line 69) * axpy <5>: Gsl_blas/Complex_Single. (line 46) * axpy <6>: Gsl_blas/Complex. (line 44) * axpy <7>: Gsl_blas/Single. (line 47) * axpy: Gsl_blas. (line 79) * backward <1>: Gsl_fft/Complex. (line 55) * backward <2>: Gsl_fft/Halfcomplex. (line 31) * backward: Gsl_diff. (line 25) * backward_rad2 <1>: Gsl_fft/Complex. (line 59) * backward_rad2: Gsl_fft/Halfcomplex. (line 35) * bernoulli: Gsl_randist. (line 292) * bernoulli_pdf: Gsl_randist. (line 296) * bessel_I0: Gsl_sf. (line 153) * bessel_I0_e: Gsl_sf. (line 157) * bessel_i0_scaled: Gsl_sf. (line 341) * bessel_I0_scaled: Gsl_sf. (line 209) * bessel_i0_scaled_e: Gsl_sf. (line 345) * bessel_I0_scaled_e: Gsl_sf. (line 213) * bessel_I1: Gsl_sf. (line 161) * bessel_I1_e: Gsl_sf. (line 165) * bessel_i1_scaled: Gsl_sf. (line 349) * bessel_I1_scaled: Gsl_sf. (line 217) * bessel_i1_scaled_e: Gsl_sf. (line 353) * bessel_I1_scaled_e: Gsl_sf. (line 221) * bessel_il_scaled: Gsl_sf. (line 357) * bessel_il_scaled_array: Gsl_sf. (line 365) * bessel_il_scaled_e: Gsl_sf. (line 361) * bessel_In: Gsl_sf. (line 169) * bessel_In_array: Gsl_sf. (line 177) * bessel_In_e: Gsl_sf. (line 173) * bessel_In_scaled_array: Gsl_sf. (line 233) * bessel_Inu: Gsl_sf. (line 417) * bessel_Inu_e: Gsl_sf. (line 421) * bessel_Inu_scaled: Gsl_sf. (line 425) * bessel_Inu_scaled_e: Gsl_sf. (line 429) * bessel_j0: Gsl_sf. (line 265) * bessel_J0: Gsl_sf. (line 97) * bessel_j0_e: Gsl_sf. (line 269) * bessel_J0_e: Gsl_sf. (line 101) * bessel_j1: Gsl_sf. (line 273) * bessel_J1: Gsl_sf. (line 105) * bessel_j1_e: Gsl_sf. (line 277) * bessel_J1_e: Gsl_sf. (line 109) * bessel_j2: Gsl_sf. (line 281) * bessel_j2_e: Gsl_sf. (line 285) * bessel_jl: Gsl_sf. (line 289) * bessel_jl_array: Gsl_sf. (line 297) * bessel_jl_e: Gsl_sf. (line 293) * bessel_jl_steed_array: Gsl_sf. (line 301) * bessel_Jn: Gsl_sf. (line 113) * bessel_Jn_array: Gsl_sf. (line 121) * bessel_Jn_e: Gsl_sf. (line 117) * bessel_Jnu: Gsl_sf. (line 397) * bessel_Jnu_e: Gsl_sf. (line 401) * bessel_K0: Gsl_sf. (line 181) * bessel_K0_e: Gsl_sf. (line 185) * bessel_k0_scaled: Gsl_sf. (line 369) * bessel_K0_scaled: Gsl_sf. (line 237) * bessel_k0_scaled_e: Gsl_sf. (line 373) * bessel_K0_scaled_e: Gsl_sf. (line 241) * bessel_K1: Gsl_sf. (line 189) * bessel_K1_e: Gsl_sf. (line 193) * bessel_k1_scaled: Gsl_sf. (line 377) * bessel_K1_scaled: Gsl_sf. (line 245) * bessel_k1_scaled_e: Gsl_sf. (line 381) * bessel_K1_scaled_e: Gsl_sf. (line 249) * bessel_kl_scaled: Gsl_sf. (line 385) * bessel_kl_scaled_array: Gsl_sf. (line 393) * bessel_kl_scaled_e: Gsl_sf. (line 389) * bessel_Kn: Gsl_sf. (line 197) * bessel_Kn_array: Gsl_sf. (line 205) * bessel_Kn_e: Gsl_sf. (line 201) * bessel_Kn_scaled_array: Gsl_sf. (line 261) * bessel_Knu: Gsl_sf. (line 433) * bessel_Knu_e: Gsl_sf. (line 437) * bessel_Knu_scaled: Gsl_sf. (line 449) * bessel_Knu_scaled_e: Gsl_sf. (line 453) * bessel_lnKnu: Gsl_sf. (line 441) * bessel_lnKnu_e: Gsl_sf. (line 445) * bessel_sequence_Jnu_e: Gsl_sf. (line 405) * bessel_y0: Gsl_sf. (line 305) * bessel_Y0: Gsl_sf. (line 125) * bessel_y0_e: Gsl_sf. (line 309) * bessel_Y0_e: Gsl_sf. (line 129) * bessel_y1: Gsl_sf. (line 313) * bessel_Y1: Gsl_sf. (line 133) * bessel_y1_e: Gsl_sf. (line 317) * bessel_Y1_e: Gsl_sf. (line 137) * bessel_y2: Gsl_sf. (line 321) * bessel_y2_e: Gsl_sf. (line 325) * bessel_yl: Gsl_sf. (line 329) * bessel_yl_array: Gsl_sf. (line 337) * bessel_yl_e: Gsl_sf. (line 333) * bessel_Yn: Gsl_sf. (line 141) * bessel_Yn_array: Gsl_sf. (line 149) * bessel_Yn_e: Gsl_sf. (line 145) * bessel_Ynu: Gsl_sf. (line 409) * bessel_Ynu_e: Gsl_sf. (line 413) * bessel_zero_J0: Gsl_sf. (line 457) * bessel_zero_J0_e: Gsl_sf. (line 461) * bessel_zero_J1: Gsl_sf. (line 465) * bessel_zero_J1_e: Gsl_sf. (line 469) * bessel_zero_Jnu: Gsl_sf. (line 473) * bessel_zero_Jnu_e: Gsl_sf. (line 477) * beta <1>: Gsl_sf. (line 1105) * beta: Gsl_randist. (line 205) * beta_e: Gsl_sf. (line 1109) * beta_inc: Gsl_sf. (line 1125) * beta_inc_e: Gsl_sf. (line 1129) * beta_P: Gsl_cdf. (line 185) * beta_pdf: Gsl_randist. (line 209) * beta_Pinv: Gsl_cdf. (line 193) * beta_Q: Gsl_cdf. (line 189) * beta_Qinv: Gsl_cdf. (line 197) * bidiag_decomp: Gsl_linalg. (line 447) * bidiag_unpack: Gsl_linalg. (line 456) * bidiag_unpack2: Gsl_linalg. (line 461) * bidiag_unpack_B: Gsl_linalg. (line 466) * binomial: Gsl_randist. (line 300) * binomial_knuth: Gsl_randist. (line 304) * binomial_P: Gsl_cdf. (line 313) * binomial_pdf: Gsl_randist. (line 312) * binomial_Q: Gsl_cdf. (line 317) * binomial_tpe: Gsl_randist. (line 308) * bins: Gsl_histo. (line 75) * bivariate_gaussian: Gsl_randist. (line 61) * bivariate_gaussian_pdf: Gsl_randist. (line 65) * cauchy: Gsl_randist. (line 93) * cauchy_P: Gsl_cdf. (line 65) * cauchy_pdf: Gsl_randist. (line 97) * cauchy_Pinv: Gsl_cdf. (line 73) * cauchy_Q: Gsl_cdf. (line 69) * cauchy_Qinv: Gsl_cdf. (line 77) * central: Gsl_diff. (line 17) * cgsm_acre: Gsl_const. (line 165) * cgsm_angstrom: Gsl_const. (line 157) * cgsm_astronomical_unit: Gsl_const. (line 33) * cgsm_bar: Gsl_const. (line 289) * cgsm_barn: Gsl_const. (line 169) * cgsm_bohr_magneton: Gsl_const. (line 77) * cgsm_bohr_radius: Gsl_const. (line 381) * cgsm_boltzmann: Gsl_const. (line 73) * cgsm_btu: Gsl_const. (line 277) * cgsm_calorie: Gsl_const. (line 273) * cgsm_canadian_gallon: Gsl_const. (line 205) * cgsm_carat: Gsl_const. (line 249) * cgsm_cup: Gsl_const. (line 189) * cgsm_curie: Gsl_const. (line 365) * cgsm_day: Gsl_const. (line 109) * cgsm_dyne: Gsl_const. (line 389) * cgsm_electron_charge: Gsl_const. (line 329) * cgsm_electron_magnetic_moment: Gsl_const. (line 85) * cgsm_electron_volt: Gsl_const. (line 49) * cgsm_erg: Gsl_const. (line 397) * cgsm_faraday: Gsl_const. (line 325) * cgsm_fathom: Gsl_const. (line 137) * cgsm_fluid_ounce: Gsl_const. (line 193) * cgsm_foot: Gsl_const. (line 121) * cgsm_footcandle: Gsl_const. (line 353) * cgsm_footlambert: Gsl_const. (line 361) * cgsm_gauss: Gsl_const. (line 333) * cgsm_gram_force: Gsl_const. (line 257) * cgsm_grav_accel: Gsl_const. (line 45) * cgsm_gravitational_constant: Gsl_const. (line 21) * cgsm_hectare: Gsl_const. (line 161) * cgsm_horsepower: Gsl_const. (line 285) * cgsm_hour: Gsl_const. (line 105) * cgsm_inch: Gsl_const. (line 117) * cgsm_inch_of_mercury: Gsl_const. (line 305) * cgsm_inch_of_water: Gsl_const. (line 309) * cgsm_joule: Gsl_const. (line 393) * cgsm_kilometers_per_hour: Gsl_const. (line 217) * cgsm_kilopound_force: Gsl_const. (line 265) * cgsm_knot: Gsl_const. (line 221) * cgsm_lambert: Gsl_const. (line 357) * cgsm_light_year: Gsl_const. (line 37) * cgsm_liter: Gsl_const. (line 173) * cgsm_lumen: Gsl_const. (line 341) * cgsm_lux: Gsl_const. (line 345) * cgsm_mass_electron: Gsl_const. (line 53) * cgsm_mass_muon: Gsl_const. (line 57) * cgsm_mass_neutron: Gsl_const. (line 65) * cgsm_mass_proton: Gsl_const. (line 61) * cgsm_meter_of_mercury: Gsl_const. (line 301) * cgsm_metric_ton: Gsl_const. (line 237) * cgsm_micron: Gsl_const. (line 153) * cgsm_mil: Gsl_const. (line 141) * cgsm_mile: Gsl_const. (line 129) * cgsm_miles_per_hour: Gsl_const. (line 213) * cgsm_minute: Gsl_const. (line 101) * cgsm_molar_gas: Gsl_const. (line 93) * cgsm_nautical_mile: Gsl_const. (line 133) * cgsm_newton: Gsl_const. (line 385) * cgsm_nuclear_magneton: Gsl_const. (line 81) * cgsm_ounce_mass: Gsl_const. (line 229) * cgsm_parsec: Gsl_const. (line 41) * cgsm_phot: Gsl_const. (line 349) * cgsm_pint: Gsl_const. (line 185) * cgsm_plancks_constant_h: Gsl_const. (line 25) * cgsm_plancks_constant_hbar: Gsl_const. (line 29) * cgsm_point: Gsl_const. (line 145) * cgsm_poise: Gsl_const. (line 317) * cgsm_pound_force: Gsl_const. (line 261) * cgsm_pound_mass: Gsl_const. (line 225) * cgsm_poundal: Gsl_const. (line 269) * cgsm_proton_magnetic_moment: Gsl_const. (line 89) * cgsm_psi: Gsl_const. (line 313) * cgsm_quart: Gsl_const. (line 181) * cgsm_rad: Gsl_const. (line 373) * cgsm_roentgen: Gsl_const. (line 369) * cgsm_rydberg: Gsl_const. (line 69) * cgsm_solar_mass: Gsl_const. (line 377) * cgsm_speed_of_light: Gsl_const. (line 17) * cgsm_standard_gas_volume: Gsl_const. (line 97) * cgsm_std_atmosphere: Gsl_const. (line 293) * cgsm_stefan_boltzmann_constant: Gsl_const. (line 401) * cgsm_stilb: Gsl_const. (line 337) * cgsm_stokes: Gsl_const. (line 321) * cgsm_tablespoon: Gsl_const. (line 197) * cgsm_teaspoon: Gsl_const. (line 201) * cgsm_texpoint: Gsl_const. (line 149) * cgsm_therm: Gsl_const. (line 281) * cgsm_thomson_cross_section: Gsl_const. (line 405) * cgsm_ton: Gsl_const. (line 233) * cgsm_torr: Gsl_const. (line 297) * cgsm_troy_ounce: Gsl_const. (line 245) * cgsm_uk_gallon: Gsl_const. (line 209) * cgsm_uk_ton: Gsl_const. (line 241) * cgsm_unified_atomic_mass: Gsl_const. (line 253) * cgsm_us_gallon: Gsl_const. (line 177) * cgsm_week: Gsl_const. (line 113) * cgsm_yard: Gsl_const. (line 125) * check <1>: Gsl_histo. (line 29) * check: Gsl_vector_flat. (line 28) * chi: Gsl_sf. (line 857) * chisq: Gsl_randist. (line 169) * chisq_P: Gsl_cdf. (line 113) * chisq_pdf: Gsl_randist. (line 173) * chisq_Pinv: Gsl_cdf. (line 121) * chisq_Q: Gsl_cdf. (line 117) * chisq_Qinv: Gsl_cdf. (line 125) * cho_decomp: Gsl_linalg. (line 394) * cho_decomp_unit: Gsl_linalg. (line 406) * cho_solve: Gsl_linalg. (line 398) * cho_svx: Gsl_linalg. (line 402) * choose <1>: Gsl_sf. (line 1037) * choose: Gsl_randist. (line 372) * choose_e: Gsl_sf. (line 1041) * ci: Gsl_sf. (line 873) * clausen: Gsl_sf. (line 481) * clausen_e: Gsl_sf. (line 485) * clear_except: Gsl_ieee. (line 91) * clone <1>: Gsl_qrng. (line 53) * clone: Gsl_rng. (line 142) * cmat_convert: Gsl_vectmat. (line 65) * coefs: Gsl_cheb. (line 28) * column <1>: Gsl_matrix_complex_flat. (line 151) * column: Gsl_matrix_flat. (line 146) * complex: Gsl_complex. (line 23) * complex_cos_e: Gsl_sf. (line 1485) * complex_dilog_e: Gsl_sf. (line 581) * complex_dilog_xy_e: Gsl_sf. (line 577) * complex_logsin_e: Gsl_sf. (line 1489) * complex_LU_decomp: Gsl_linalg. (line 123) * complex_LU_det: Gsl_linalg. (line 147) * complex_LU_invert: Gsl_linalg. (line 143) * complex_LU_lndet: Gsl_linalg. (line 151) * complex_LU_refine: Gsl_linalg. (line 139) * complex_LU_sgndet: Gsl_linalg. (line 155) * complex_LU_solve: Gsl_linalg. (line 128) * complex_LU_svx: Gsl_linalg. (line 132) * complex_sin_e: Gsl_sf. (line 1481) * complex_solve_cubic: Gsl_poly. (line 58) * complex_solve_quadratic: Gsl_poly. (line 39) * complex_spence_xy_e: Gsl_sf. (line 585) * conjugate: Gsl_complex. (line 128) * control_hadjust: Gsl_odeiv. (line 103) * control_name: Gsl_odeiv. (line 90) * copy <1>: Gsl_histo. (line 40) * copy <2>: Gsl_blas_gen/Complex. (line 36) * copy <3>: Gsl_blas_gen. (line 65) * copy <4>: Gsl_blas_flat/Complex. (line 38) * copy <5>: Gsl_blas_flat. (line 65) * copy <6>: Gsl_blas/Complex_Single. (line 41) * copy <7>: Gsl_blas/Complex. (line 39) * copy <8>: Gsl_blas/Single. (line 43) * copy <9>: Gsl_blas. (line 75) * copy <10>: Gsl_matrix_complex_flat. (line 86) * copy <11>: Gsl_matrix_complex/Single. (line 75) * copy <12>: Gsl_matrix_complex. (line 86) * copy <13>: Gsl_matrix_flat. (line 81) * copy <14>: Gsl_matrix/Single. (line 66) * copy <15>: Gsl_matrix. (line 78) * copy <16>: Gsl_vector_complex_flat. (line 79) * copy <17>: Gsl_vector_complex/Single. (line 67) * copy <18>: Gsl_vector_complex. (line 78) * copy <19>: Gsl_vector_flat. (line 78) * copy <20>: Gsl_vector/Single. (line 58) * copy: Gsl_vector. (line 76) * cos <1>: Gsl_sf. (line 1457) * cos: Gsl_complex. (line 182) * cos_e: Gsl_sf. (line 1461) * cos_err_e: Gsl_sf. (line 1529) * cosh: Gsl_complex. (line 252) * cot: Gsl_complex. (line 198) * coth: Gsl_complex. (line 268) * coulomb_CL_array: Gsl_sf. (line 509) * coulomb_CL_e: Gsl_sf. (line 505) * covar: Gsl_multifit_nlin. (line 57) * covariance: Gsl_stats. (line 61) * covariance_m: Gsl_stats. (line 65) * create <1>: Gsl_permut. (line 32) * create <2>: Gsl_matrix_complex_flat. (line 29) * create <3>: Gsl_matrix_complex/Single. (line 18) * create <4>: Gsl_matrix_complex. (line 30) * create <5>: Gsl_matrix_flat. (line 29) * create <6>: Gsl_matrix/Single. (line 18) * create <7>: Gsl_matrix. (line 30) * create <8>: Gsl_vector_complex_flat. (line 31) * create <9>: Gsl_vector_complex/Single. (line 18) * create <10>: Gsl_vector_complex. (line 30) * create <11>: Gsl_vector_flat. (line 38) * create <12>: Gsl_vector/Single. (line 18) * create: Gsl_vector. (line 36) * csc: Gsl_complex. (line 194) * csch: Gsl_complex. (line 264) * csscal: Gsl_blas/Complex_Single. (line 54) * dawson: Gsl_sf. (line 513) * dawson_e: Gsl_sf. (line 517) * debye_1: Gsl_sf. (line 521) * debye_1_e: Gsl_sf. (line 525) * debye_2: Gsl_sf. (line 529) * debye_2_e: Gsl_sf. (line 533) * debye_3: Gsl_sf. (line 537) * debye_3_e: Gsl_sf. (line 541) * debye_4: Gsl_sf. (line 545) * debye_4_e: Gsl_sf. (line 549) * debye_5: Gsl_sf. (line 553) * debye_5_e: Gsl_sf. (line 557) * debye_6: Gsl_sf. (line 561) * debye_6_e: Gsl_sf. (line 565) * decomp_LU: Gsl_linalg. (line 85) * default: Gsl_rng. (line 88) * default_seed: Gsl_rng. (line 92) * deriv: Gsl_cheb. (line 44) * det_LU: Gsl_linalg. (line 106) * dger <1>: Gsl_blas_gen. (line 109) * dger <2>: Gsl_blas_flat. (line 111) * dger <3>: Gsl_blas/Single. (line 95) * dger: Gsl_blas. (line 121) * diagonal <1>: Gsl_matrix_complex_flat. (line 155) * diagonal: Gsl_matrix_flat. (line 150) * dilog: Gsl_sf. (line 569) * dilog_e: Gsl_sf. (line 573) * dimension: Gsl_qrng. (line 45) * dims <1>: Gsl_vectmat. (line 143) * dims <2>: Gsl_matrix_complex_flat. (line 33) * dims <3>: Gsl_matrix_complex/Single. (line 22) * dims <4>: Gsl_matrix_complex. (line 34) * dims <5>: Gsl_matrix_flat. (line 33) * dims <6>: Gsl_matrix/Single. (line 22) * dims: Gsl_matrix. (line 34) * dir_2d: Gsl_randist. (line 229) * dir_2d_trig_method: Gsl_randist. (line 233) * dir_3d: Gsl_randist. (line 237) * dir_nd: Gsl_randist. (line 241) * dirichlet: Gsl_randist. (line 177) * dirichlet_lnpdf: Gsl_randist. (line 185) * dirichlet_pdf: Gsl_randist. (line 181) * discrete: Gsl_randist. (line 276) * discrete_pdf: Gsl_randist. (line 280) * discrete_preproc: Gsl_randist. (line 272) * div <1>: Gsl_histo. (line 140) * div <2>: Gsl_vector_flat. (line 102) * div <3>: Gsl_vector/Single. (line 82) * div <4>: Gsl_vector. (line 100) * div: Gsl_complex. (line 92) * div_elements <1>: Gsl_matrix_complex_flat. (line 102) * div_elements <2>: Gsl_matrix_complex/Single. (line 95) * div_elements <3>: Gsl_matrix_complex. (line 106) * div_elements <4>: Gsl_matrix_flat. (line 97) * div_elements <5>: Gsl_matrix/Single. (line 86) * div_elements: Gsl_matrix. (line 98) * div_imag: Gsl_complex. (line 124) * div_real: Gsl_complex. (line 108) * dot <1>: Gsl_blas_gen. (line 45) * dot <2>: Gsl_blas_flat. (line 45) * dot <3>: Gsl_blas/Single. (line 23) * dot: Gsl_blas. (line 55) * dotc <1>: Gsl_blas_gen/Complex. (line 16) * dotc <2>: Gsl_blas_flat/Complex. (line 18) * dotc <3>: Gsl_blas/Complex_Single. (line 21) * dotc: Gsl_blas/Complex. (line 19) * dotu <1>: Gsl_blas_gen/Complex. (line 12) * dotu <2>: Gsl_blas_flat/Complex. (line 13) * dotu <3>: Gsl_blas/Complex_Single. (line 16) * dotu: Gsl_blas/Complex. (line 15) * doublefact: Gsl_sf. (line 1013) * doublefact_e: Gsl_sf. (line 1017) * dsdot: Gsl_blas/Single. (line 19) * dump_state: Gsl_rng. (line 146) * e: Gsl_math. (line 20) * ellint_D: Gsl_sf. (line 653) * ellint_D_e: Gsl_sf. (line 657) * ellint_Dcomp: Gsl_sf. (line 621) * ellint_Dcomp_e: Gsl_sf. (line 625) * ellint_E: Gsl_sf. (line 637) * ellint_E_e: Gsl_sf. (line 641) * ellint_Ecomp: Gsl_sf. (line 605) * ellint_Ecomp_e: Gsl_sf. (line 609) * ellint_F: Gsl_sf. (line 629) * ellint_F_e: Gsl_sf. (line 633) * ellint_Kcomp: Gsl_sf. (line 597) * ellint_Kcomp_e: Gsl_sf. (line 601) * ellint_P: Gsl_sf. (line 645) * ellint_P_e: Gsl_sf. (line 649) * ellint_Pcomp: Gsl_sf. (line 613) * ellint_Pcomp_e: Gsl_sf. (line 617) * ellint_RC: Gsl_sf. (line 661) * ellint_RC_e: Gsl_sf. (line 665) * ellint_RD: Gsl_sf. (line 669) * ellint_RD_e: Gsl_sf. (line 673) * ellint_RF: Gsl_sf. (line 677) * ellint_RF_e: Gsl_sf. (line 681) * ellint_RJ: Gsl_sf. (line 685) * ellint_RJ_e: Gsl_sf. (line 689) * env_setup <1>: Gsl_rng. (line 104) * env_setup: Gsl_ieee. (line 75) * equal_bins_p: Gsl_histo. (line 124) * erf: Gsl_sf. (line 693) * erf_e: Gsl_sf. (line 697) * erf_Q: Gsl_sf. (line 725) * erf_Q_e: Gsl_sf. (line 729) * erf_Z: Gsl_sf. (line 717) * erf_Z_e: Gsl_sf. (line 721) * erfc: Gsl_sf. (line 701) * erfc_e: Gsl_sf. (line 705) * eta: Gsl_sf. (line 1565) * eta_e: Gsl_sf. (line 1569) * eta_int: Gsl_sf. (line 1557) * eta_int_e: Gsl_sf. (line 1561) * euler: Gsl_math. (line 116) * eval <1>: Gsl_bspline. (line 40) * eval <2>: Gsl_cheb. (line 36) * eval <3>: Gsl_interp. (line 89) * eval: Gsl_poly. (line 23) * eval_array: Gsl_interp. (line 93) * eval_deriv: Gsl_interp. (line 101) * eval_deriv2: Gsl_interp. (line 105) * eval_err: Gsl_cheb. (line 40) * eval_integ: Gsl_interp. (line 109) * evolve_apply: Gsl_odeiv. (line 122) * evolve_reset: Gsl_odeiv. (line 114) * exp <1>: Gsl_sf. (line 733) * exp: Gsl_complex. (line 159) * exp_e: Gsl_sf. (line 737) * exp_e10: Gsl_sf. (line 741) * exp_err_e: Gsl_sf. (line 789) * exp_err_e10: Gsl_sf. (line 793) * exp_mult: Gsl_sf. (line 745) * exp_mult_e: Gsl_sf. (line 749) * exp_mult_e10: Gsl_sf. (line 753) * exp_mult_err_e: Gsl_sf. (line 797) * exp_mult_err_e10_e: Gsl_sf. (line 801) * expint_3: Gsl_sf. (line 861) * expint_3_e: Gsl_sf. (line 865) * expint_E1: Gsl_sf. (line 805) * expint_E1_e: Gsl_sf. (line 809) * expint_E1_scaled: Gsl_sf. (line 821) * expint_E1_scaled_e: Gsl_sf. (line 825) * expint_E2: Gsl_sf. (line 813) * expint_E2_e: Gsl_sf. (line 817) * expint_E2_scaled: Gsl_sf. (line 829) * expint_E2_scaled_e: Gsl_sf. (line 833) * expint_Ei: Gsl_sf. (line 837) * expint_Ei_e: Gsl_sf. (line 841) * expint_Ei_scaled: Gsl_sf. (line 845) * expint_Ei_scaled_e: Gsl_sf. (line 849) * expm1 <1>: Gsl_sf. (line 757) * expm1: Gsl_math. (line 133) * expm1_e: Gsl_sf. (line 761) * exponential <1>: Gsl_randist. (line 69) * exponential: Gsl_linalg. (line 529) * exponential_P: Gsl_cdf. (line 129) * exponential_pdf: Gsl_randist. (line 73) * exponential_Pinv: Gsl_cdf. (line 137) * exponential_Q: Gsl_cdf. (line 133) * exponential_Qinv: Gsl_cdf. (line 141) * exppow: Gsl_randist. (line 85) * exppow_P: Gsl_cdf. (line 145) * exppow_pdf: Gsl_randist. (line 89) * exppow_Q: Gsl_cdf. (line 149) * exprel: Gsl_sf. (line 765) * exprel_2: Gsl_sf. (line 773) * exprel_2_e: Gsl_sf. (line 777) * exprel_e: Gsl_sf. (line 769) * exprel_n: Gsl_sf. (line 781) * exprel_n_e: Gsl_sf. (line 785) * fact: Gsl_sf. (line 1005) * fact_e: Gsl_sf. (line 1009) * fcmp: Gsl_math. (line 153) * fdist: Gsl_randist. (line 189) * fdist_P: Gsl_cdf. (line 169) * fdist_pdf: Gsl_randist. (line 193) * fdist_Pinv: Gsl_cdf. (line 177) * fdist_Q: Gsl_cdf. (line 173) * fdist_Qinv: Gsl_cdf. (line 181) * fermi_dirac_0: Gsl_sf. (line 893) * fermi_dirac_0_e: Gsl_sf. (line 897) * fermi_dirac_1: Gsl_sf. (line 901) * fermi_dirac_1_e: Gsl_sf. (line 905) * fermi_dirac_2: Gsl_sf. (line 909) * fermi_dirac_2_e: Gsl_sf. (line 913) * fermi_dirac_3half: Gsl_sf. (line 941) * fermi_dirac_3half_e: Gsl_sf. (line 945) * fermi_dirac_half: Gsl_sf. (line 933) * fermi_dirac_half_e: Gsl_sf. (line 937) * fermi_dirac_inc_0: Gsl_sf. (line 949) * fermi_dirac_inc_0_e: Gsl_sf. (line 953) * fermi_dirac_int: Gsl_sf. (line 917) * fermi_dirac_int_e: Gsl_sf. (line 921) * fermi_dirac_m1: Gsl_sf. (line 885) * fermi_dirac_m1_e: Gsl_sf. (line 889) * fermi_dirac_mhalf: Gsl_sf. (line 925) * fermi_dirac_mhalf_e: Gsl_sf. (line 929) * find: Gsl_histo. (line 86) * fit_poly: Gsl_multifit. (line 52) * flat: Gsl_randist. (line 153) * flat_P: Gsl_cdf. (line 201) * flat_pdf: Gsl_randist. (line 157) * flat_Pinv: Gsl_cdf. (line 209) * flat_Q: Gsl_cdf. (line 205) * flat_Qinv: Gsl_cdf. (line 213) * forward <1>: Gsl_fft/Complex. (line 33) * forward: Gsl_diff. (line 21) * forward_rad2: Gsl_fft/Complex. (line 37) * free_qawo: Gsl_integration. (line 147) * free_qaws: Gsl_integration. (line 116) * gamma <1>: Gsl_sf. (line 957) * gamma: Gsl_randist. (line 133) * gamma_e: Gsl_sf. (line 961) * gamma_inc: Gsl_sf. (line 1097) * gamma_inc_e: Gsl_sf. (line 1101) * gamma_inc_P: Gsl_sf. (line 1089) * gamma_inc_P_e: Gsl_sf. (line 1093) * gamma_inc_Q: Gsl_sf. (line 1081) * gamma_inc_Q_e: Gsl_sf. (line 1085) * gamma_int: Gsl_randist. (line 137) * gamma_knuth: Gsl_randist. (line 149) * gamma_mt: Gsl_randist. (line 145) * gamma_P: Gsl_cdf. (line 49) * gamma_pdf: Gsl_randist. (line 141) * gamma_Pinv: Gsl_cdf. (line 57) * gamma_Q: Gsl_cdf. (line 53) * gamma_Qinv: Gsl_cdf. (line 61) * gammainv: Gsl_sf. (line 985) * gammainv_e: Gsl_sf. (line 989) * gammastar: Gsl_sf. (line 977) * gammastar_e: Gsl_sf. (line 981) * gaussian: Gsl_randist. (line 17) * gaussian_P: Gsl_cdf. (line 33) * gaussian_pdf: Gsl_randist. (line 29) * gaussian_Pinv: Gsl_cdf. (line 41) * gaussian_Q: Gsl_cdf. (line 37) * gaussian_Qinv: Gsl_cdf. (line 45) * gaussian_ratio_method: Gsl_randist. (line 21) * gaussian_tail: Gsl_randist. (line 45) * gaussian_tail_pdf: Gsl_randist. (line 49) * gaussian_ziggurat: Gsl_randist. (line 25) * gegenpoly_1: Gsl_sf. (line 1133) * gegenpoly_1_e: Gsl_sf. (line 1137) * gegenpoly_2: Gsl_sf. (line 1141) * gegenpoly_2_e: Gsl_sf. (line 1145) * gegenpoly_3: Gsl_sf. (line 1149) * gegenpoly_3_e: Gsl_sf. (line 1153) * gegenpoly_array: Gsl_sf. (line 1165) * gegenpoly_n: Gsl_sf. (line 1157) * gegenpoly_n_e: Gsl_sf. (line 1161) * gemm <1>: Gsl_blas_gen/Complex. (line 111) * gemm <2>: Gsl_blas_gen. (line 129) * gemm <3>: Gsl_blas_flat/Complex. (line 115) * gemm <4>: Gsl_blas_flat. (line 131) * gemm <5>: Gsl_blas/Complex_Single. (line 130) * gemm <6>: Gsl_blas/Complex. (line 122) * gemm <7>: Gsl_blas/Single. (line 120) * gemm: Gsl_blas. (line 143) * gemv <1>: Gsl_blas_gen/Complex. (line 56) * gemv <2>: Gsl_blas_gen. (line 84) * gemv <3>: Gsl_blas_flat/Complex. (line 59) * gemv <4>: Gsl_blas_flat. (line 84) * gemv <5>: Gsl_blas/Complex_Single. (line 65) * gemv <6>: Gsl_blas/Complex. (line 63) * gemv <7>: Gsl_blas/Single. (line 67) * gemv: Gsl_blas. (line 97) * geometric: Gsl_randist. (line 344) * geometric_P: Gsl_cdf. (line 329) * geometric_pdf: Gsl_randist. (line 348) * geometric_Q: Gsl_cdf. (line 333) * gerc <1>: Gsl_blas_gen/Complex. (line 90) * gerc <2>: Gsl_blas_flat/Complex. (line 93) * gerc <3>: Gsl_blas/Complex_Single. (line 103) * gerc: Gsl_blas/Complex. (line 97) * geru <1>: Gsl_blas_gen/Complex. (line 84) * geru <2>: Gsl_blas_flat/Complex. (line 87) * geru <3>: Gsl_blas/Complex_Single. (line 96) * geru: Gsl_blas/Complex. (line 91) * get <1>: Gsl_histo. (line 59) * get <2>: Gsl_qrng. (line 33) * get <3>: Gsl_rng. (line 157) * get <4>: Gsl_matrix_complex_flat. (line 61) * get <5>: Gsl_matrix_complex/Single. (line 50) * get <6>: Gsl_matrix_complex. (line 62) * get <7>: Gsl_matrix_flat. (line 57) * get <8>: Gsl_matrix/Single. (line 42) * get <9>: Gsl_matrix. (line 54) * get <10>: Gsl_vector_complex_flat. (line 55) * get <11>: Gsl_vector_complex/Single. (line 42) * get <12>: Gsl_vector_complex. (line 54) * get <13>: Gsl_vector_flat. (line 54) * get <14>: Gsl_vector/Single. (line 34) * get <15>: Gsl_vector. (line 52) * get: Gsl_complex. (line 34) * get_info <1>: Gsl_sum/Trunc. (line 30) * get_info: Gsl_sum. (line 42) * get_miser_params: Gsl_monte. (line 84) * get_range: Gsl_histo. (line 63) * get_state <1>: Gsl_multiroot/Deriv. (line 42) * get_state <2>: Gsl_multiroot/NoDeriv. (line 41) * get_state: Gsl_multifit_nlin. (line 45) * get_type: Gsl_rng. (line 123) * get_vegas_info: Gsl_monte. (line 137) * get_vegas_params: Gsl_monte. (line 141) * gumbel1: Gsl_randist. (line 253) * gumbel1_P: Gsl_cdf. (line 233) * gumbel1_pdf: Gsl_randist. (line 257) * gumbel1_Pinv: Gsl_cdf. (line 241) * gumbel1_Q: Gsl_cdf. (line 237) * gumbel1_Qinv: Gsl_cdf. (line 245) * gumbel2: Gsl_randist. (line 261) * gumbel2_P: Gsl_cdf. (line 249) * gumbel2_pdf: Gsl_randist. (line 265) * gumbel2_Pinv: Gsl_cdf. (line 257) * gumbel2_Q: Gsl_cdf. (line 253) * gumbel2_Qinv: Gsl_cdf. (line 261) * h_max: Gsl_histo. (line 67) * h_min: Gsl_histo. (line 71) * handle_exn: Gsl_error. (line 116) * hc_mult: Gsl_fft. (line 58) * hc_mult_rad2: Gsl_fft. (line 62) * hemm <1>: Gsl_blas_gen/Complex. (line 164) * hemm <2>: Gsl_blas_flat/Complex. (line 168) * hemm <3>: Gsl_blas/Complex_Single. (line 185) * hemm: Gsl_blas/Complex. (line 175) * hemv <1>: Gsl_blas_gen/Complex. (line 78) * hemv <2>: Gsl_blas_flat/Complex. (line 81) * hemv <3>: Gsl_blas/Complex_Single. (line 89) * hemv: Gsl_blas/Complex. (line 85) * her <1>: Gsl_blas_gen/Complex. (line 95) * her <2>: Gsl_blas_flat/Complex. (line 99) * her <3>: Gsl_blas/Complex_Single. (line 110) * her: Gsl_blas/Complex. (line 103) * her2 <1>: Gsl_blas_gen/Complex. (line 102) * her2 <2>: Gsl_blas_flat/Complex. (line 106) * her2 <3>: Gsl_blas/Complex_Single. (line 118) * her2: Gsl_blas/Complex. (line 110) * her2k <1>: Gsl_blas_gen/Complex. (line 179) * her2k <2>: Gsl_blas_flat/Complex. (line 185) * her2k <3>: Gsl_blas/Complex_Single. (line 202) * her2k: Gsl_blas/Complex. (line 192) * herk <1>: Gsl_blas_gen/Complex. (line 171) * herk <2>: Gsl_blas_flat/Complex. (line 176) * herk <3>: Gsl_blas/Complex_Single. (line 193) * herk: Gsl_blas/Complex. (line 183) * herm: Gsl_eigen. (line 90) * hermtd_decomp: Gsl_linalg. (line 430) * hermtd_unpack: Gsl_linalg. (line 436) * hermtd_unpack_T: Gsl_linalg. (line 440) * hermv: Gsl_eigen. (line 110) * hermv_sort: Gsl_eigen. (line 114) * hydrogenicR: Gsl_sf. (line 497) * hydrogenicR_1: Gsl_sf. (line 489) * hydrogenicR_1_e: Gsl_sf. (line 493) * hydrogenicR_e: Gsl_sf. (line 501) * hypergeometric: Gsl_randist. (line 352) * hypergeometric_pdf: Gsl_randist. (line 356) * hypot <1>: Gsl_sf. (line 1465) * hypot: Gsl_math. (line 137) * hypot_e: Gsl_sf. (line 1469) * hzeta: Gsl_sf. (line 1549) * hzeta_e: Gsl_sf. (line 1553) * i_1_pi: Gsl_math. (line 86) * i_2_pi: Gsl_math. (line 92) * i_2_sqrtpi: Gsl_math. (line 80) * i_eval: Gsl_interp. (line 53) * i_eval_deriv: Gsl_interp. (line 58) * i_eval_deriv2: Gsl_interp. (line 63) * i_eval_integ: Gsl_interp. (line 68) * iamax <1>: Gsl_blas_gen/Complex. (line 28) * iamax <2>: Gsl_blas_gen. (line 57) * iamax <3>: Gsl_blas_flat/Complex. (line 30) * iamax <4>: Gsl_blas_flat. (line 57) * iamax <5>: Gsl_blas/Complex_Single. (line 33) * iamax <6>: Gsl_blas/Complex. (line 31) * iamax <7>: Gsl_blas/Single. (line 35) * iamax: Gsl_blas. (line 67) * imag: Gsl_vector_complex_flat. (line 110) * init <1>: Gsl_histo. (line 162) * init <2>: Gsl_cheb. (line 32) * init <3>: Gsl_qrng. (line 29) * init <4>: Gsl_interp. (line 36) * init <5>: Gsl_permut. (line 28) * init: Gsl_error. (line 96) * init_miser: Gsl_monte. (line 74) * init_plain: Gsl_monte. (line 45) * init_vegas: Gsl_monte. (line 127) * integ: Gsl_cheb. (line 48) * integrate: Gsl_monte. (line 28) * integrate_miser: Gsl_monte. (line 80) * integrate_plain: Gsl_monte. (line 51) * integrate_vegas: Gsl_monte. (line 133) * interval <1>: Gsl_min. (line 42) * interval: Gsl_root/Bracket. (line 38) * inverse <1>: Gsl_fft/Complex. (line 65) * inverse <2>: Gsl_fft/Halfcomplex. (line 41) * inverse <3>: Gsl_permut. (line 56) * inverse: Gsl_complex. (line 132) * inverse_rad2 <1>: Gsl_fft/Complex. (line 69) * inverse_rad2: Gsl_fft/Halfcomplex. (line 45) * invert_LU: Gsl_linalg. (line 116) * is_null <1>: Gsl_vectmat. (line 210) * is_null <2>: Gsl_matrix_complex_flat. (line 118) * is_null <3>: Gsl_matrix_complex/Single. (line 111) * is_null <4>: Gsl_matrix_complex. (line 122) * is_null <5>: Gsl_matrix_flat. (line 113) * is_null <6>: Gsl_matrix/Single. (line 102) * is_null <7>: Gsl_matrix. (line 114) * is_null <8>: Gsl_vector_flat. (line 114) * is_null <9>: Gsl_vector/Single. (line 94) * is_null: Gsl_vector. (line 112) * iterate <1>: Gsl_multimin/NoDeriv. (line 30) * iterate <2>: Gsl_multimin/Deriv. (line 34) * iterate <3>: Gsl_min. (line 34) * iterate <4>: Gsl_multiroot/Deriv. (line 31) * iterate <5>: Gsl_multiroot/NoDeriv. (line 31) * iterate <6>: Gsl_root/Polish. (line 29) * iterate <7>: Gsl_root/Bracket. (line 30) * iterate: Gsl_multifit_nlin. (line 35) * knots: Gsl_bspline. (line 28) * knots_uniform: Gsl_bspline. (line 32) * kurtosis: Gsl_stats. (line 49) * kurtosis_m_sd: Gsl_stats. (line 53) * lag1_autocorrelation: Gsl_stats. (line 57) * laguerre_1: Gsl_sf. (line 1169) * laguerre_1_e: Gsl_sf. (line 1173) * laguerre_2: Gsl_sf. (line 1177) * laguerre_2_e: Gsl_sf. (line 1181) * laguerre_3: Gsl_sf. (line 1185) * laguerre_3_e: Gsl_sf. (line 1189) * laguerre_n: Gsl_sf. (line 1193) * laguerre_n_e: Gsl_sf. (line 1197) * lambert_W0: Gsl_sf. (line 1201) * lambert_W0_e: Gsl_sf. (line 1205) * lambert_Wm1: Gsl_sf. (line 1209) * lambert_Wm1_e: Gsl_sf. (line 1213) * landau: Gsl_randist. (line 117) * landau_pdf: Gsl_randist. (line 121) * laplace: Gsl_randist. (line 77) * laplace_P: Gsl_cdf. (line 81) * laplace_pdf: Gsl_randist. (line 81) * laplace_Pinv: Gsl_cdf. (line 89) * laplace_Q: Gsl_cdf. (line 85) * laplace_Qinv: Gsl_cdf. (line 93) * legendre_array_size: Gsl_sf. (line 1301) * legendre_P1: Gsl_sf. (line 1217) * legendre_P1_e: Gsl_sf. (line 1221) * legendre_P2: Gsl_sf. (line 1225) * legendre_P2_e: Gsl_sf. (line 1229) * legendre_P3: Gsl_sf. (line 1233) * legendre_P3_e: Gsl_sf. (line 1237) * legendre_Pl: Gsl_sf. (line 1241) * legendre_Pl_array: Gsl_sf. (line 1249) * legendre_Pl_e: Gsl_sf. (line 1245) * legendre_Plm: Gsl_sf. (line 1277) * legendre_Plm_array: Gsl_sf. (line 1285) * legendre_Plm_e: Gsl_sf. (line 1281) * legendre_Q0: Gsl_sf. (line 1253) * legendre_Q0_e: Gsl_sf. (line 1257) * legendre_Q1: Gsl_sf. (line 1261) * legendre_Q1_e: Gsl_sf. (line 1265) * legendre_Ql: Gsl_sf. (line 1269) * legendre_Ql_e: Gsl_sf. (line 1273) * legendre_sphPlm: Gsl_sf. (line 1289) * legendre_sphPlm_array: Gsl_sf. (line 1297) * legendre_sphPlm_e: Gsl_sf. (line 1293) * length <1>: Gsl_vectmat. (line 76) * length <2>: Gsl_vector_complex_flat. (line 51) * length <3>: Gsl_vector_complex/Single. (line 38) * length <4>: Gsl_vector_complex. (line 50) * length <5>: Gsl_vector_flat. (line 50) * length <6>: Gsl_vector/Single. (line 30) * length: Gsl_vector. (line 48) * levy: Gsl_randist. (line 125) * levy_skew: Gsl_randist. (line 129) * linear <1>: Gsl_multifit. (line 41) * linear: Gsl_fit. (line 28) * linear_est <1>: Gsl_multifit. (line 46) * linear_est: Gsl_fit. (line 32) * ln10: Gsl_math. (line 98) * ln2: Gsl_math. (line 104) * lnbeta: Gsl_sf. (line 1113) * lnbeta_e: Gsl_sf. (line 1117) * lnbeta_sgn_e: Gsl_sf. (line 1121) * lnchoose: Gsl_sf. (line 1045) * lnchoose_e: Gsl_sf. (line 1049) * lncosh: Gsl_sf. (line 1501) * lncosh_e: Gsl_sf. (line 1505) * lndoublefact: Gsl_sf. (line 1029) * lndoublefact_e: Gsl_sf. (line 1033) * lnfact: Gsl_sf. (line 1021) * lnfact_e: Gsl_sf. (line 1025) * lngamma: Gsl_sf. (line 965) * lngamma_complex_e: Gsl_sf. (line 993) * lngamma_e: Gsl_sf. (line 969) * lngamma_sgn_e: Gsl_sf. (line 973) * lnpi: Gsl_math. (line 110) * lnpoch: Gsl_sf. (line 1061) * lnpoch_e: Gsl_sf. (line 1065) * lnpoch_sgn_e: Gsl_sf. (line 1069) * lnsinh: Gsl_sf. (line 1493) * lnsinh_e: Gsl_sf. (line 1497) * log <1>: Gsl_sf. (line 1305) * log: Gsl_complex. (line 163) * log10: Gsl_complex. (line 167) * log10e: Gsl_math. (line 32) * log1p: Gsl_math. (line 129) * log2e: Gsl_math. (line 26) * log_1plusx: Gsl_sf. (line 1325) * log_1plusx_e: Gsl_sf. (line 1329) * log_1plusx_mx: Gsl_sf. (line 1333) * log_1plusx_mx_e: Gsl_sf. (line 1337) * log_abs: Gsl_sf. (line 1313) * log_abs_e: Gsl_sf. (line 1317) * log_b: Gsl_complex. (line 171) * log_complex_e: Gsl_sf. (line 1321) * log_e: Gsl_sf. (line 1309) * log_erfc: Gsl_sf. (line 709) * log_erfc_e: Gsl_sf. (line 713) * logabs: Gsl_complex. (line 73) * logarithmic: Gsl_randist. (line 360) * logarithmic_pdf: Gsl_randist. (line 364) * logistic: Gsl_randist. (line 213) * logistic_P: Gsl_cdf. (line 297) * logistic_pdf: Gsl_randist. (line 217) * logistic_Pinv: Gsl_cdf. (line 305) * logistic_Q: Gsl_cdf. (line 301) * logistic_Qinv: Gsl_cdf. (line 309) * lognormal: Gsl_randist. (line 161) * lognormal_P: Gsl_cdf. (line 217) * lognormal_pdf: Gsl_randist. (line 165) * lognormal_Pinv: Gsl_cdf. (line 225) * lognormal_Q: Gsl_cdf. (line 221) * lognormal_Qinv: Gsl_cdf. (line 229) * m_add: Gsl_vectmat. (line 163) * m_add_diagonal: Gsl_vectmat. (line 179) * m_copy: Gsl_vectmat. (line 155) * m_div: Gsl_vectmat. (line 175) * m_memcpy: Gsl_vectmat. (line 159) * m_mul: Gsl_vectmat. (line 171) * m_sub: Gsl_vectmat. (line 167) * make <1>: Gsl_bspline. (line 20) * make <2>: Gsl_wavelet. (line 37) * make <3>: Gsl_histo. (line 36) * make <4>: Gsl_sum/Trunc. (line 15) * make <5>: Gsl_sum. (line 27) * make <6>: Gsl_cheb. (line 20) * make <7>: Gsl_multimin/NoDeriv. (line 22) * make <8>: Gsl_multimin/Deriv. (line 26) * make <9>: Gsl_min. (line 26) * make <10>: Gsl_multiroot/Deriv. (line 23) * make <11>: Gsl_multiroot/NoDeriv. (line 23) * make <12>: Gsl_root/Polish. (line 21) * make <13>: Gsl_root/Bracket. (line 22) * make <14>: Gsl_multifit_nlin. (line 27) * make <15>: Gsl_multifit. (line 20) * make <16>: Gsl_qrng. (line 25) * make <17>: Gsl_rng. (line 111) * make <18>: Gsl_interp. (line 32) * make: Gsl_permut. (line 36) * make_accel: Gsl_interp. (line 48) * make_control_scaled_new: Gsl_odeiv. (line 86) * make_control_standard_new: Gsl_odeiv. (line 72) * make_control_y_new: Gsl_odeiv. (line 76) * make_control_yp_new: Gsl_odeiv. (line 80) * make_evolve: Gsl_odeiv. (line 110) * make_herm_ws: Gsl_eigen. (line 78) * make_hermv_ws: Gsl_eigen. (line 97) * make_interp: Gsl_interp. (line 85) * make_miser_state: Gsl_monte. (line 70) * make_nonsymm_ws: Gsl_eigen. (line 124) * make_nonsymmv_ws: Gsl_eigen. (line 149) * make_plain_state: Gsl_monte. (line 41) * make_step: Gsl_odeiv. (line 43) * make_symm_ws: Gsl_eigen. (line 23) * make_symmv_ws: Gsl_eigen. (line 43) * make_system: Gsl_odeiv. (line 22) * make_vegas_state: Gsl_monte. (line 123) * make_wavetable <1>: Gsl_fft/Complex. (line 27) * make_wavetable <2>: Gsl_fft/Halfcomplex. (line 15) * make_wavetable: Gsl_fft/Real. (line 22) * make_workspace <1>: Gsl_fft/Complex. (line 23) * make_workspace: Gsl_fft/Real. (line 18) * make_ws: Gsl_integration. (line 25) * mat_convert: Gsl_vectmat. (line 39) * mat_flat: Gsl_vectmat. (line 48) * matmult: Gsl_linalg. (line 22) * max <1>: Gsl_stats. (line 69) * max <2>: Gsl_rng. (line 130) * max <3>: Gsl_vector_flat. (line 118) * max <4>: Gsl_vector/Single. (line 98) * max: Gsl_vector. (line 116) * max_bin: Gsl_histo. (line 97) * max_index <1>: Gsl_stats. (line 81) * max_index <2>: Gsl_vector_flat. (line 130) * max_index <3>: Gsl_vector/Single. (line 110) * max_index: Gsl_vector. (line 128) * max_val: Gsl_histo. (line 93) * mean <1>: Gsl_stats. (line 17) * mean: Gsl_histo. (line 109) * memcpy <1>: Gsl_qrng. (line 49) * memcpy <2>: Gsl_rng. (line 138) * memcpy <3>: Gsl_matrix_complex_flat. (line 82) * memcpy <4>: Gsl_matrix_complex/Single. (line 71) * memcpy <5>: Gsl_matrix_complex. (line 82) * memcpy <6>: Gsl_matrix_flat. (line 77) * memcpy <7>: Gsl_matrix/Single. (line 62) * memcpy <8>: Gsl_matrix. (line 74) * memcpy <9>: Gsl_vector_complex_flat. (line 75) * memcpy <10>: Gsl_vector_complex/Single. (line 63) * memcpy <11>: Gsl_vector_complex. (line 74) * memcpy <12>: Gsl_vector_flat. (line 74) * memcpy <13>: Gsl_vector/Single. (line 54) * memcpy: Gsl_vector. (line 72) * min <1>: Gsl_stats. (line 73) * min <2>: Gsl_rng. (line 134) * min <3>: Gsl_vector_flat. (line 122) * min <4>: Gsl_vector/Single. (line 102) * min: Gsl_vector. (line 120) * min_bin: Gsl_histo. (line 105) * min_index <1>: Gsl_stats. (line 85) * min_index <2>: Gsl_vector_flat. (line 134) * min_index <3>: Gsl_vector/Single. (line 114) * min_index: Gsl_vector. (line 132) * min_size: Gsl_interp. (line 44) * min_val: Gsl_histo. (line 101) * minimum <1>: Gsl_multimin/NoDeriv. (line 34) * minimum <2>: Gsl_multimin/Deriv. (line 44) * minimum: Gsl_min. (line 38) * minmax <1>: Gsl_stats. (line 77) * minmax <2>: Gsl_vector_flat. (line 126) * minmax <3>: Gsl_vector/Single. (line 106) * minmax: Gsl_vector. (line 124) * minmax_index <1>: Gsl_stats. (line 89) * minmax_index <2>: Gsl_vector_flat. (line 138) * minmax_index <3>: Gsl_vector/Single. (line 118) * minmax_index: Gsl_vector. (line 136) * mksa_acre: Gsl_const. (line 557) * mksa_angstrom: Gsl_const. (line 549) * mksa_astronomical_unit: Gsl_const. (line 425) * mksa_bar: Gsl_const. (line 681) * mksa_barn: Gsl_const. (line 561) * mksa_bohr_magneton: Gsl_const. (line 469) * mksa_bohr_radius: Gsl_const. (line 773) * mksa_boltzmann: Gsl_const. (line 465) * mksa_btu: Gsl_const. (line 669) * mksa_calorie: Gsl_const. (line 665) * mksa_canadian_gallon: Gsl_const. (line 597) * mksa_carat: Gsl_const. (line 641) * mksa_cup: Gsl_const. (line 581) * mksa_curie: Gsl_const. (line 757) * mksa_day: Gsl_const. (line 501) * mksa_debye: Gsl_const. (line 809) * mksa_dyne: Gsl_const. (line 781) * mksa_electron_charge: Gsl_const. (line 721) * mksa_electron_magnetic_moment: Gsl_const. (line 477) * mksa_electron_volt: Gsl_const. (line 441) * mksa_erg: Gsl_const. (line 789) * mksa_faraday: Gsl_const. (line 717) * mksa_fathom: Gsl_const. (line 529) * mksa_fluid_ounce: Gsl_const. (line 585) * mksa_foot: Gsl_const. (line 513) * mksa_footcandle: Gsl_const. (line 745) * mksa_footlambert: Gsl_const. (line 753) * mksa_gauss: Gsl_const. (line 725) * mksa_gram_force: Gsl_const. (line 649) * mksa_grav_accel: Gsl_const. (line 437) * mksa_gravitational_constant: Gsl_const. (line 413) * mksa_hectare: Gsl_const. (line 553) * mksa_horsepower: Gsl_const. (line 677) * mksa_hour: Gsl_const. (line 497) * mksa_inch: Gsl_const. (line 509) * mksa_inch_of_mercury: Gsl_const. (line 697) * mksa_inch_of_water: Gsl_const. (line 701) * mksa_joule: Gsl_const. (line 785) * mksa_kilometers_per_hour: Gsl_const. (line 609) * mksa_kilopound_force: Gsl_const. (line 657) * mksa_knot: Gsl_const. (line 613) * mksa_lambert: Gsl_const. (line 749) * mksa_light_year: Gsl_const. (line 429) * mksa_liter: Gsl_const. (line 565) * mksa_lumen: Gsl_const. (line 733) * mksa_lux: Gsl_const. (line 737) * mksa_mass_electron: Gsl_const. (line 445) * mksa_mass_muon: Gsl_const. (line 449) * mksa_mass_neutron: Gsl_const. (line 457) * mksa_mass_proton: Gsl_const. (line 453) * mksa_meter_of_mercury: Gsl_const. (line 693) * mksa_metric_ton: Gsl_const. (line 629) * mksa_micron: Gsl_const. (line 545) * mksa_mil: Gsl_const. (line 533) * mksa_mile: Gsl_const. (line 521) * mksa_miles_per_hour: Gsl_const. (line 605) * mksa_minute: Gsl_const. (line 493) * mksa_molar_gas: Gsl_const. (line 485) * mksa_nautical_mile: Gsl_const. (line 525) * mksa_newton: Gsl_const. (line 777) * mksa_nuclear_magneton: Gsl_const. (line 473) * mksa_ounce_mass: Gsl_const. (line 621) * mksa_parsec: Gsl_const. (line 433) * mksa_phot: Gsl_const. (line 741) * mksa_pint: Gsl_const. (line 577) * mksa_plancks_constant_h: Gsl_const. (line 417) * mksa_plancks_constant_hbar: Gsl_const. (line 421) * mksa_point: Gsl_const. (line 537) * mksa_poise: Gsl_const. (line 709) * mksa_pound_force: Gsl_const. (line 653) * mksa_pound_mass: Gsl_const. (line 617) * mksa_poundal: Gsl_const. (line 661) * mksa_proton_magnetic_moment: Gsl_const. (line 481) * mksa_psi: Gsl_const. (line 705) * mksa_quart: Gsl_const. (line 573) * mksa_rad: Gsl_const. (line 765) * mksa_roentgen: Gsl_const. (line 761) * mksa_rydberg: Gsl_const. (line 461) * mksa_solar_mass: Gsl_const. (line 769) * mksa_speed_of_light: Gsl_const. (line 409) * mksa_standard_gas_volume: Gsl_const. (line 489) * mksa_std_atmosphere: Gsl_const. (line 685) * mksa_stefan_boltzmann_constant: Gsl_const. (line 793) * mksa_stilb: Gsl_const. (line 729) * mksa_stokes: Gsl_const. (line 713) * mksa_tablespoon: Gsl_const. (line 589) * mksa_teaspoon: Gsl_const. (line 593) * mksa_texpoint: Gsl_const. (line 541) * mksa_therm: Gsl_const. (line 673) * mksa_thomson_cross_section: Gsl_const. (line 797) * mksa_ton: Gsl_const. (line 625) * mksa_torr: Gsl_const. (line 689) * mksa_troy_ounce: Gsl_const. (line 637) * mksa_uk_gallon: Gsl_const. (line 601) * mksa_uk_ton: Gsl_const. (line 633) * mksa_unified_atomic_mass: Gsl_const. (line 645) * mksa_us_gallon: Gsl_const. (line 569) * mksa_vacuum_permeability: Gsl_const. (line 805) * mksa_vacuum_permittivity: Gsl_const. (line 801) * mksa_week: Gsl_const. (line 505) * mksa_yard: Gsl_const. (line 517) * mul <1>: Gsl_histo. (line 136) * mul <2>: Gsl_fit. (line 43) * mul <3>: Gsl_vector_flat. (line 98) * mul <4>: Gsl_vector/Single. (line 78) * mul <5>: Gsl_vector. (line 96) * mul: Gsl_complex. (line 88) * mul_elements <1>: Gsl_matrix_complex_flat. (line 98) * mul_elements <2>: Gsl_matrix_complex/Single. (line 91) * mul_elements <3>: Gsl_matrix_complex. (line 102) * mul_elements <4>: Gsl_matrix_flat. (line 93) * mul_elements <5>: Gsl_matrix/Single. (line 82) * mul_elements: Gsl_matrix. (line 94) * mul_est: Gsl_fit. (line 47) * mul_imag: Gsl_complex. (line 120) * mul_real: Gsl_complex. (line 104) * mult: Gsl_complex. (line 46) * multinomial: Gsl_randist. (line 316) * multinomial_lnpdf: Gsl_randist. (line 324) * multinomial_pdf: Gsl_randist. (line 320) * multiply_e: Gsl_sf. (line 589) * multiply_err_e: Gsl_sf. (line 593) * name <1>: Gsl_wavelet. (line 41) * name <2>: Gsl_multimin/NoDeriv. (line 26) * name <3>: Gsl_multimin/Deriv. (line 30) * name <4>: Gsl_min. (line 30) * name <5>: Gsl_multiroot/Deriv. (line 27) * name <6>: Gsl_multiroot/NoDeriv. (line 27) * name <7>: Gsl_root/Polish. (line 25) * name <8>: Gsl_root/Bracket. (line 26) * name <9>: Gsl_multifit_nlin. (line 31) * name <10>: Gsl_qrng. (line 41) * name <11>: Gsl_rng. (line 119) * name: Gsl_interp. (line 40) * ncoeffs: Gsl_bspline. (line 24) * negative: Gsl_complex. (line 136) * negative_binomial: Gsl_randist. (line 328) * negative_binomial_P: Gsl_cdf. (line 337) * negative_binomial_pdf: Gsl_randist. (line 332) * negative_binomial_Q: Gsl_cdf. (line 341) * next: Gsl_permut. (line 60) * nonsymm: Gsl_eigen. (line 142) * nonsymmv: Gsl_eigen. (line 169) * nonsymmv_sort: Gsl_eigen. (line 174) * nrm2 <1>: Gsl_blas_gen/Complex. (line 20) * nrm2 <2>: Gsl_blas_gen. (line 49) * nrm2 <3>: Gsl_blas_flat/Complex. (line 22) * nrm2 <4>: Gsl_blas_flat. (line 49) * nrm2 <5>: Gsl_blas/Complex_Single. (line 25) * nrm2 <6>: Gsl_blas/Complex. (line 23) * nrm2 <7>: Gsl_blas/Single. (line 27) * nrm2: Gsl_blas. (line 59) * num_atto: Gsl_const. (line 873) * num_avogadro: Gsl_const. (line 817) * num_exa: Gsl_const. (line 829) * num_femto: Gsl_const. (line 869) * num_fine_structure: Gsl_const. (line 813) * num_giga: Gsl_const. (line 841) * num_kilo: Gsl_const. (line 849) * num_mega: Gsl_const. (line 845) * num_micro: Gsl_const. (line 857) * num_milli: Gsl_const. (line 853) * num_nano: Gsl_const. (line 861) * num_peta: Gsl_const. (line 833) * num_pico: Gsl_const. (line 865) * num_tera: Gsl_const. (line 837) * num_yocto: Gsl_const. (line 881) * num_yotta: Gsl_const. (line 821) * num_zepto: Gsl_const. (line 877) * num_zetta: Gsl_const. (line 825) * of_array <1>: Gsl_permut. (line 20) * of_array <2>: Gsl_matrix_complex_flat. (line 41) * of_array <3>: Gsl_matrix_complex/Single. (line 26) * of_array <4>: Gsl_matrix_complex. (line 38) * of_array <5>: Gsl_matrix_flat. (line 37) * of_array <6>: Gsl_matrix/Single. (line 26) * of_array <7>: Gsl_matrix. (line 38) * of_array <8>: Gsl_vector_complex_flat. (line 35) * of_array <9>: Gsl_vector_complex/Single. (line 22) * of_array <10>: Gsl_vector_complex. (line 34) * of_array <11>: Gsl_vector_flat. (line 42) * of_array <12>: Gsl_vector/Single. (line 22) * of_array: Gsl_vector. (line 40) * of_arrays <1>: Gsl_matrix_complex_flat. (line 37) * of_arrays <2>: Gsl_matrix_complex/Single. (line 30) * of_arrays <3>: Gsl_matrix_complex. (line 42) * of_arrays <4>: Gsl_matrix_flat. (line 41) * of_arrays <5>: Gsl_matrix/Single. (line 30) * of_arrays: Gsl_matrix. (line 42) * of_complex_array <1>: Gsl_matrix_complex_flat. (line 53) * of_complex_array <2>: Gsl_matrix_complex/Single. (line 42) * of_complex_array <3>: Gsl_matrix_complex. (line 54) * of_complex_array <4>: Gsl_vector_complex_flat. (line 43) * of_complex_array <5>: Gsl_vector_complex/Single. (line 30) * of_complex_array: Gsl_vector_complex. (line 42) * order: Gsl_cheb. (line 24) * pack: Gsl_complex. (line 42) * pareto: Gsl_randist. (line 221) * pareto_P: Gsl_cdf. (line 281) * pareto_pdf: Gsl_randist. (line 225) * pareto_Pinv: Gsl_cdf. (line 289) * pareto_Q: Gsl_cdf. (line 285) * pareto_Qinv: Gsl_cdf. (line 293) * pascal: Gsl_randist. (line 336) * pascal_P: Gsl_cdf. (line 345) * pascal_pdf: Gsl_randist. (line 340) * pascal_Q: Gsl_cdf. (line 349) * permute: Gsl_permut. (line 68) * permute_barr: Gsl_permut. (line 72) * permute_inverse: Gsl_permut. (line 76) * permute_inverse_barr: Gsl_permut. (line 80) * pi: Gsl_math. (line 56) * pi_2: Gsl_math. (line 62) * pi_4: Gsl_math. (line 68) * poch: Gsl_sf. (line 1053) * poch_e: Gsl_sf. (line 1057) * pochrel: Gsl_sf. (line 1073) * pochrel_e: Gsl_sf. (line 1077) * poisson: Gsl_randist. (line 284) * poisson_P: Gsl_cdf. (line 321) * poisson_pdf: Gsl_randist. (line 288) * poisson_Q: Gsl_cdf. (line 325) * polar: Gsl_complex. (line 54) * polar_of_rect: Gsl_sf. (line 1513) * position: Gsl_multifit_nlin. (line 39) * pow: Gsl_complex. (line 151) * pow_int <1>: Gsl_sf. (line 1341) * pow_int: Gsl_math. (line 125) * pow_int_e: Gsl_sf. (line 1345) * pow_real: Gsl_complex. (line 155) * pprint_exn: Gsl_error. (line 112) * prev: Gsl_permut. (line 64) * print: Gsl_ieee. (line 40) * psi: Gsl_sf. (line 1357) * psi_1: Gsl_sf. (line 1385) * psi_1_e: Gsl_sf. (line 1389) * psi_1_int: Gsl_sf. (line 1377) * psi_1_int_e: Gsl_sf. (line 1381) * psi_1piy: Gsl_sf. (line 1365) * psi_1piy_e: Gsl_sf. (line 1369) * psi_complex_e: Gsl_sf. (line 1373) * psi_e: Gsl_sf. (line 1361) * psi_int: Gsl_sf. (line 1349) * psi_int_e: Gsl_sf. (line 1353) * psi_n: Gsl_sf. (line 1393) * psi_n_e: Gsl_sf. (line 1397) * qag: Gsl_integration. (line 48) * qag_sing: Gsl_integration. (line 91) * qagi: Gsl_integration. (line 69) * qagil: Gsl_integration. (line 83) * qagiu: Gsl_integration. (line 76) * qagp: Gsl_integration. (line 63) * qags: Gsl_integration. (line 56) * qawc: Gsl_integration. (line 100) * qawf: Gsl_integration. (line 165) * qawo: Gsl_integration. (line 156) * qaws: Gsl_integration. (line 125) * qng: Gsl_integration. (line 18) * quantile_from_sorted_data: Gsl_stats. (line 93) * rayleigh: Gsl_randist. (line 101) * rayleigh_P: Gsl_cdf. (line 97) * rayleigh_pdf: Gsl_randist. (line 105) * rayleigh_Pinv: Gsl_cdf. (line 105) * rayleigh_Q: Gsl_cdf. (line 101) * rayleigh_Qinv: Gsl_cdf. (line 109) * rayleigh_tail: Gsl_randist. (line 109) * rayleigh_tail_pdf: Gsl_randist. (line 113) * real: Gsl_vector_complex_flat. (line 106) * rect: Gsl_complex. (line 50) * rect_of_polar: Gsl_sf. (line 1509) * rep_of_float: Gsl_ieee. (line 36) * reset: Gsl_histo. (line 79) * restart: Gsl_multimin/Deriv. (line 38) * reverse <1>: Gsl_permut. (line 52) * reverse <2>: Gsl_vector_complex_flat. (line 87) * reverse <3>: Gsl_vector_complex/Single. (line 75) * reverse <4>: Gsl_vector_complex. (line 86) * reverse <5>: Gsl_vector_flat. (line 86) * reverse <6>: Gsl_vector/Single. (line 66) * reverse: Gsl_vector. (line 84) * root <1>: Gsl_multiroot/Deriv. (line 35) * root <2>: Gsl_multiroot/NoDeriv. (line 35) * root <3>: Gsl_root/Polish. (line 33) * root: Gsl_root/Bracket. (line 34) * rot <1>: Gsl_blas_gen. (line 73) * rot <2>: Gsl_blas_flat. (line 73) * rot <3>: Gsl_blas/Single. (line 52) * rot: Gsl_blas. (line 83) * row <1>: Gsl_matrix_complex_flat. (line 147) * row <2>: Gsl_matrix_complex/Single. (line 79) * row <3>: Gsl_matrix_complex. (line 90) * row <4>: Gsl_matrix_flat. (line 142) * row <5>: Gsl_matrix/Single. (line 70) * row: Gsl_matrix. (line 82) * sample <1>: Gsl_histo. (line 166) * sample <2>: Gsl_randist. (line 376) * sample: Gsl_qrng. (line 37) * scal <1>: Gsl_blas_gen/Complex. (line 44) * scal <2>: Gsl_blas_gen. (line 77) * scal <3>: Gsl_blas_flat/Complex. (line 47) * scal <4>: Gsl_blas_flat. (line 77) * scal <5>: Gsl_blas/Complex_Single. (line 50) * scal <6>: Gsl_blas/Complex. (line 48) * scal <7>: Gsl_blas/Single. (line 56) * scal: Gsl_blas. (line 87) * scale <1>: Gsl_histo. (line 144) * scale <2>: Gsl_vectmat. (line 218) * scale <3>: Gsl_matrix_complex_flat. (line 106) * scale <4>: Gsl_matrix_complex/Single. (line 99) * scale <5>: Gsl_matrix_complex. (line 110) * scale <6>: Gsl_matrix_flat. (line 101) * scale <7>: Gsl_matrix/Single. (line 90) * scale <8>: Gsl_matrix. (line 102) * scale <9>: Gsl_vector_flat. (line 106) * scale <10>: Gsl_vector/Single. (line 86) * scale: Gsl_vector. (line 104) * sd: Gsl_stats. (line 25) * sd_with_fixed_mean: Gsl_stats. (line 33) * sdsdot: Gsl_blas/Single. (line 15) * sec: Gsl_complex. (line 190) * sech: Gsl_complex. (line 260) * set <1>: Gsl_rng. (line 115) * set <2>: Gsl_matrix_complex_flat. (line 65) * set <3>: Gsl_matrix_complex/Single. (line 54) * set <4>: Gsl_matrix_complex. (line 66) * set <5>: Gsl_matrix_flat. (line 61) * set <6>: Gsl_matrix/Single. (line 46) * set <7>: Gsl_matrix. (line 58) * set <8>: Gsl_vector_complex_flat. (line 59) * set <9>: Gsl_vector_complex/Single. (line 46) * set <10>: Gsl_vector_complex. (line 58) * set <11>: Gsl_vector_flat. (line 58) * set <12>: Gsl_vector/Single. (line 38) * set <13>: Gsl_vector. (line 56) * set: Gsl_complex. (line 30) * set_all <1>: Gsl_matrix_complex_flat. (line 69) * set_all <2>: Gsl_matrix_complex/Single. (line 58) * set_all <3>: Gsl_matrix_complex. (line 70) * set_all <4>: Gsl_matrix_flat. (line 65) * set_all <5>: Gsl_matrix/Single. (line 50) * set_all <6>: Gsl_matrix. (line 62) * set_all <7>: Gsl_vector_complex_flat. (line 63) * set_all <8>: Gsl_vector_complex/Single. (line 50) * set_all <9>: Gsl_vector_complex. (line 62) * set_all <10>: Gsl_vector_flat. (line 62) * set_all <11>: Gsl_vector/Single. (line 42) * set_all: Gsl_vector. (line 60) * set_basis <1>: Gsl_vector_complex_flat. (line 71) * set_basis <2>: Gsl_vector_complex/Single. (line 58) * set_basis <3>: Gsl_vector_complex. (line 70) * set_basis <4>: Gsl_vector_flat. (line 70) * set_basis <5>: Gsl_vector/Single. (line 50) * set_basis: Gsl_vector. (line 68) * set_default: Gsl_rng. (line 96) * set_default_seed: Gsl_rng. (line 100) * set_id <1>: Gsl_matrix_complex_flat. (line 77) * set_id <2>: Gsl_matrix_complex/Single. (line 66) * set_id <3>: Gsl_matrix_complex. (line 78) * set_id <4>: Gsl_matrix_flat. (line 73) * set_id <5>: Gsl_matrix/Single. (line 58) * set_id: Gsl_matrix. (line 70) * set_miser_params: Gsl_monte. (line 88) * set_mode: Gsl_ieee. (line 71) * set_qawo: Gsl_integration. (line 143) * set_qaws: Gsl_integration. (line 112) * set_ranges: Gsl_histo. (line 44) * set_ranges_uniform: Gsl_histo. (line 48) * set_state: Gsl_rng. (line 150) * set_vegas_params: Gsl_monte. (line 145) * set_zero <1>: Gsl_matrix_complex_flat. (line 73) * set_zero <2>: Gsl_matrix_complex/Single. (line 62) * set_zero <3>: Gsl_matrix_complex. (line 74) * set_zero <4>: Gsl_matrix_flat. (line 69) * set_zero <5>: Gsl_matrix/Single. (line 54) * set_zero <6>: Gsl_matrix. (line 66) * set_zero <7>: Gsl_vector_complex_flat. (line 67) * set_zero <8>: Gsl_vector_complex/Single. (line 54) * set_zero <9>: Gsl_vector_complex. (line 66) * set_zero <10>: Gsl_vector_flat. (line 66) * set_zero <11>: Gsl_vector/Single. (line 46) * set_zero: Gsl_vector. (line 64) * shi: Gsl_sf. (line 853) * shift: Gsl_histo. (line 148) * shuffle: Gsl_randist. (line 368) * si: Gsl_sf. (line 869) * sigma: Gsl_histo. (line 113) * sin <1>: Gsl_sf. (line 1449) * sin: Gsl_complex. (line 178) * sin_e: Gsl_sf. (line 1453) * sin_err_e: Gsl_sf. (line 1525) * sinc: Gsl_sf. (line 1473) * sinc_e: Gsl_sf. (line 1477) * sinh: Gsl_complex. (line 248) * size <1>: Gsl_multimin/NoDeriv. (line 38) * size <2>: Gsl_integration. (line 29) * size: Gsl_permut. (line 44) * skew: Gsl_stats. (line 41) * skew_m_sd: Gsl_stats. (line 45) * smash: Gsl_fun. (line 51) * solve <1>: Gsl_siman. (line 40) * solve: Gsl_poly. (line 65) * solve_cubic: Gsl_poly. (line 52) * solve_cyc_tridiag: Gsl_linalg. (line 514) * solve_HH: Gsl_linalg. (line 489) * solve_LU: Gsl_linalg. (line 97) * solve_quadratic: Gsl_poly. (line 35) * solve_symm_cyc_tridiag: Gsl_linalg. (line 508) * solve_symm_tridiag: Gsl_linalg. (line 497) * solve_tridiag: Gsl_linalg. (line 503) * sqrt: Gsl_complex. (line 143) * sqrt1_2: Gsl_math. (line 44) * sqrt2: Gsl_math. (line 38) * sqrt3: Gsl_math. (line 50) * sqrt_real: Gsl_complex. (line 147) * sqrtpi: Gsl_math. (line 74) * step_apply: Gsl_odeiv. (line 64) * step_name: Gsl_odeiv. (line 51) * step_order: Gsl_odeiv. (line 55) * step_reset: Gsl_odeiv. (line 47) * strerror: Gsl_error. (line 104) * string_of_errno: Gsl_error. (line 108) * sub <1>: Gsl_histo. (line 132) * sub <2>: Gsl_matrix_complex_flat. (line 94) * sub <3>: Gsl_matrix_complex/Single. (line 87) * sub <4>: Gsl_matrix_complex. (line 98) * sub <5>: Gsl_matrix_flat. (line 89) * sub <6>: Gsl_matrix/Single. (line 78) * sub <7>: Gsl_matrix. (line 90) * sub <8>: Gsl_vector_flat. (line 94) * sub <9>: Gsl_vector/Single. (line 74) * sub <10>: Gsl_vector. (line 92) * sub: Gsl_complex. (line 84) * sub_imag: Gsl_complex. (line 116) * sub_real: Gsl_complex. (line 100) * subdiagonal <1>: Gsl_matrix_complex_flat. (line 159) * subdiagonal: Gsl_matrix_flat. (line 154) * submatrix <1>: Gsl_matrix_complex_flat. (line 143) * submatrix: Gsl_matrix_flat. (line 138) * subvector <1>: Gsl_vectmat. (line 88) * subvector <2>: Gsl_vector_complex_flat. (line 96) * subvector <3>: Gsl_vector_complex/Single. (line 80) * subvector <4>: Gsl_vector_complex. (line 90) * subvector <5>: Gsl_vector_flat. (line 146) * subvector <6>: Gsl_vector/Single. (line 125) * subvector: Gsl_vector. (line 143) * sum: Gsl_histo. (line 117) * superdiagonal <1>: Gsl_matrix_complex_flat. (line 163) * superdiagonal: Gsl_matrix_flat. (line 158) * swap <1>: Gsl_permut. (line 40) * swap <2>: Gsl_blas_gen/Complex. (line 32) * swap <3>: Gsl_blas_gen. (line 61) * swap <4>: Gsl_blas_flat/Complex. (line 34) * swap <5>: Gsl_blas_flat. (line 61) * swap <6>: Gsl_blas/Complex_Single. (line 37) * swap <7>: Gsl_blas/Complex. (line 35) * swap <8>: Gsl_blas/Single. (line 39) * swap: Gsl_blas. (line 71) * swap_columns <1>: Gsl_vectmat. (line 187) * swap_columns <2>: Gsl_matrix_complex_flat. (line 126) * swap_columns <3>: Gsl_matrix_complex/Single. (line 119) * swap_columns <4>: Gsl_matrix_complex. (line 130) * swap_columns <5>: Gsl_matrix_flat. (line 121) * swap_columns <6>: Gsl_matrix/Single. (line 110) * swap_columns: Gsl_matrix. (line 122) * swap_element <1>: Gsl_vector_complex_flat. (line 83) * swap_element <2>: Gsl_vector_complex/Single. (line 71) * swap_element <3>: Gsl_vector_complex. (line 82) * swap_element <4>: Gsl_vector_flat. (line 82) * swap_element <5>: Gsl_vector/Single. (line 62) * swap_element: Gsl_vector. (line 80) * swap_rowcol <1>: Gsl_vectmat. (line 191) * swap_rowcol <2>: Gsl_matrix_complex_flat. (line 130) * swap_rowcol <3>: Gsl_matrix_complex/Single. (line 123) * swap_rowcol <4>: Gsl_matrix_complex. (line 134) * swap_rowcol <5>: Gsl_matrix_flat. (line 125) * swap_rowcol <6>: Gsl_matrix/Single. (line 114) * swap_rowcol: Gsl_matrix. (line 126) * swap_rows <1>: Gsl_vectmat. (line 183) * swap_rows <2>: Gsl_matrix_complex_flat. (line 122) * swap_rows <3>: Gsl_matrix_complex/Single. (line 115) * swap_rows <4>: Gsl_matrix_complex. (line 126) * swap_rows <5>: Gsl_matrix_flat. (line 117) * swap_rows <6>: Gsl_matrix/Single. (line 106) * swap_rows: Gsl_matrix. (line 118) * symm <1>: Gsl_eigen. (line 36) * symm <2>: Gsl_blas_gen/Complex. (line 120) * symm <3>: Gsl_blas_gen. (line 137) * symm <4>: Gsl_blas_flat/Complex. (line 124) * symm <5>: Gsl_blas_flat. (line 139) * symm <6>: Gsl_blas/Complex_Single. (line 139) * symm <7>: Gsl_blas/Complex. (line 131) * symm <8>: Gsl_blas/Single. (line 129) * symm: Gsl_blas. (line 151) * symmtd_decomp: Gsl_linalg. (line 413) * symmtd_unpack: Gsl_linalg. (line 419) * symmtd_unpack_T: Gsl_linalg. (line 423) * symmv: Gsl_eigen. (line 57) * symmv_sort: Gsl_eigen. (line 68) * symv <1>: Gsl_blas_gen. (line 103) * symv <2>: Gsl_blas_flat. (line 105) * symv <3>: Gsl_blas/Single. (line 89) * symv: Gsl_blas. (line 116) * synchrotron_1: Gsl_sf. (line 1401) * synchrotron_1_e: Gsl_sf. (line 1405) * synchrotron_2: Gsl_sf. (line 1409) * synchrotron_2_e: Gsl_sf. (line 1413) * syr <1>: Gsl_blas_gen. (line 114) * syr <2>: Gsl_blas_flat. (line 116) * syr <3>: Gsl_blas/Single. (line 101) * syr: Gsl_blas. (line 126) * syr2 <1>: Gsl_blas_gen. (line 121) * syr2 <2>: Gsl_blas_flat. (line 123) * syr2 <3>: Gsl_blas/Single. (line 108) * syr2: Gsl_blas. (line 132) * syr2k <1>: Gsl_blas_gen/Complex. (line 137) * syr2k <2>: Gsl_blas_gen. (line 168) * syr2k <3>: Gsl_blas_flat/Complex. (line 141) * syr2k <4>: Gsl_blas_flat. (line 170) * syr2k <5>: Gsl_blas/Complex_Single. (line 156) * syr2k <6>: Gsl_blas/Complex. (line 148) * syr2k <7>: Gsl_blas/Single. (line 146) * syr2k: Gsl_blas. (line 182) * syrk <1>: Gsl_blas_gen/Complex. (line 128) * syrk <2>: Gsl_blas_gen. (line 160) * syrk <3>: Gsl_blas_flat/Complex. (line 132) * syrk <4>: Gsl_blas_flat. (line 162) * syrk <5>: Gsl_blas/Complex_Single. (line 147) * syrk <6>: Gsl_blas/Complex. (line 139) * syrk <7>: Gsl_blas/Single. (line 137) * syrk: Gsl_blas. (line 174) * tan: Gsl_complex. (line 186) * tanh: Gsl_complex. (line 256) * taylorcoeff: Gsl_sf. (line 997) * taylorcoeff_e: Gsl_sf. (line 1001) * tdist: Gsl_randist. (line 197) * tdist_P: Gsl_cdf. (line 153) * tdist_pdf: Gsl_randist. (line 201) * tdist_Pinv: Gsl_cdf. (line 161) * tdist_Q: Gsl_cdf. (line 157) * tdist_Qinv: Gsl_cdf. (line 165) * test_delta <1>: Gsl_multiroot/Deriv. (line 46) * test_delta <2>: Gsl_multiroot/NoDeriv. (line 45) * test_delta <3>: Gsl_root. (line 37) * test_delta: Gsl_multifit_nlin. (line 49) * test_except: Gsl_ieee. (line 95) * test_gradient <1>: Gsl_multimin/Deriv. (line 48) * test_gradient: Gsl_multifit_nlin. (line 53) * test_interval <1>: Gsl_min. (line 46) * test_interval: Gsl_root. (line 33) * test_residual <1>: Gsl_multiroot/Deriv. (line 50) * test_residual <2>: Gsl_multiroot/NoDeriv. (line 49) * test_residual: Gsl_root. (line 41) * test_size: Gsl_multimin/NoDeriv. (line 42) * tmp: Gsl_vectmat. (line 147) * to_array <1>: Gsl_permut. (line 24) * to_array <2>: Gsl_vectmat. (line 80) * to_array <3>: Gsl_matrix_complex_flat. (line 49) * to_array <4>: Gsl_matrix_complex/Single. (line 34) * to_array <5>: Gsl_matrix_complex. (line 46) * to_array <6>: Gsl_matrix_flat. (line 45) * to_array <7>: Gsl_matrix/Single. (line 34) * to_array <8>: Gsl_matrix. (line 46) * to_array <9>: Gsl_vector_complex_flat. (line 39) * to_array <10>: Gsl_vector_complex/Single. (line 26) * to_array <11>: Gsl_vector_complex. (line 38) * to_array <12>: Gsl_vector_flat. (line 46) * to_array <13>: Gsl_vector/Single. (line 26) * to_array: Gsl_vector. (line 44) * to_arrays <1>: Gsl_vectmat. (line 151) * to_arrays <2>: Gsl_matrix_complex_flat. (line 45) * to_arrays <3>: Gsl_matrix_complex/Single. (line 38) * to_arrays <4>: Gsl_matrix_complex. (line 50) * to_arrays <5>: Gsl_matrix_flat. (line 49) * to_arrays <6>: Gsl_matrix/Single. (line 38) * to_arrays: Gsl_matrix. (line 50) * to_complex_array <1>: Gsl_matrix_complex_flat. (line 57) * to_complex_array <2>: Gsl_matrix_complex/Single. (line 46) * to_complex_array <3>: Gsl_matrix_complex. (line 58) * to_complex_array <4>: Gsl_vector_complex_flat. (line 47) * to_complex_array <5>: Gsl_vector_complex/Single. (line 34) * to_complex_array: Gsl_vector_complex. (line 46) * transform <1>: Gsl_fft/Complex. (line 44) * transform <2>: Gsl_fft/Halfcomplex. (line 21) * transform: Gsl_fft/Real. (line 27) * transform_array: Gsl_wavelet. (line 59) * transform_forward: Gsl_wavelet. (line 65) * transform_gen: Gsl_wavelet. (line 86) * transform_inverse: Gsl_wavelet. (line 71) * transform_matrix: Gsl_wavelet. (line 106) * transform_matrix_flat: Gsl_wavelet. (line 100) * transform_matrix_gen: Gsl_wavelet. (line 112) * transform_rad2 <1>: Gsl_fft/Complex. (line 49) * transform_rad2 <2>: Gsl_fft/Halfcomplex. (line 25) * transform_rad2: Gsl_fft/Real. (line 31) * transform_vector: Gsl_wavelet. (line 81) * transform_vector_flat: Gsl_wavelet. (line 76) * transport_2: Gsl_sf. (line 1417) * transport_2_e: Gsl_sf. (line 1421) * transport_3: Gsl_sf. (line 1425) * transport_3_e: Gsl_sf. (line 1429) * transport_4: Gsl_sf. (line 1433) * transport_4_e: Gsl_sf. (line 1437) * transport_5: Gsl_sf. (line 1441) * transport_5_e: Gsl_sf. (line 1445) * transpose <1>: Gsl_vectmat. (line 195) * transpose <2>: Gsl_matrix_complex_flat. (line 134) * transpose <3>: Gsl_matrix_complex/Single. (line 127) * transpose <4>: Gsl_matrix_complex. (line 138) * transpose <5>: Gsl_matrix_flat. (line 129) * transpose <6>: Gsl_matrix/Single. (line 118) * transpose: Gsl_matrix. (line 130) * transpose_in_place <1>: Gsl_vectmat. (line 199) * transpose_in_place <2>: Gsl_matrix_complex_flat. (line 138) * transpose_in_place <3>: Gsl_matrix_complex/Single. (line 131) * transpose_in_place <4>: Gsl_matrix_complex. (line 142) * transpose_in_place <5>: Gsl_matrix_flat. (line 133) * transpose_in_place <6>: Gsl_matrix/Single. (line 122) * transpose_in_place: Gsl_matrix. (line 134) * trmm <1>: Gsl_blas_gen/Complex. (line 146) * trmm <2>: Gsl_blas_gen. (line 145) * trmm <3>: Gsl_blas_flat/Complex. (line 150) * trmm <4>: Gsl_blas_flat. (line 147) * trmm <5>: Gsl_blas/Complex_Single. (line 166) * trmm <6>: Gsl_blas/Complex. (line 157) * trmm <7>: Gsl_blas/Single. (line 155) * trmm: Gsl_blas. (line 159) * trmv <1>: Gsl_blas_gen/Complex. (line 63) * trmv <2>: Gsl_blas_gen. (line 90) * trmv <3>: Gsl_blas_flat/Complex. (line 66) * trmv <4>: Gsl_blas_flat. (line 91) * trmv <5>: Gsl_blas/Complex_Single. (line 73) * trmv <6>: Gsl_blas/Complex. (line 70) * trmv <7>: Gsl_blas/Single. (line 74) * trmv: Gsl_blas. (line 103) * trsm <1>: Gsl_blas_gen/Complex. (line 155) * trsm <2>: Gsl_blas_gen. (line 153) * trsm <3>: Gsl_blas_flat/Complex. (line 159) * trsm <4>: Gsl_blas_flat. (line 155) * trsm <5>: Gsl_blas/Complex_Single. (line 176) * trsm <6>: Gsl_blas/Complex. (line 166) * trsm <7>: Gsl_blas/Single. (line 164) * trsm: Gsl_blas. (line 167) * trsv <1>: Gsl_blas_gen/Complex. (line 70) * trsv <2>: Gsl_blas_gen. (line 96) * trsv <3>: Gsl_blas_flat/Complex. (line 73) * trsv <4>: Gsl_blas_flat. (line 98) * trsv <5>: Gsl_blas/Complex_Single. (line 81) * trsv <6>: Gsl_blas/Complex. (line 77) * trsv <7>: Gsl_blas/Single. (line 81) * trsv: Gsl_blas. (line 109) * ugaussian: Gsl_randist. (line 33) * ugaussian_P: Gsl_cdf. (line 17) * ugaussian_pdf: Gsl_randist. (line 41) * ugaussian_Pinv: Gsl_cdf. (line 25) * ugaussian_Q: Gsl_cdf. (line 21) * ugaussian_Qinv: Gsl_cdf. (line 29) * ugaussian_ratio_method: Gsl_randist. (line 37) * ugaussian_tail: Gsl_randist. (line 53) * ugaussian_tail_pdf: Gsl_randist. (line 57) * uniform: Gsl_rng. (line 161) * uniform_arr: Gsl_rng. (line 174) * uniform_int: Gsl_rng. (line 169) * uniform_pos: Gsl_rng. (line 165) * uniform_pos_arr: Gsl_rng. (line 178) * uninit: Gsl_error. (line 100) * unpack <1>: Gsl_fft/Halfcomplex. (line 49) * unpack <2>: Gsl_fft/Real. (line 35) * unpack <3>: Gsl_fft. (line 54) * unpack: Gsl_complex. (line 38) * v_add: Gsl_vectmat. (line 96) * v_copy: Gsl_vectmat. (line 84) * v_div: Gsl_vectmat. (line 108) * v_max: Gsl_vectmat. (line 112) * v_max_index: Gsl_vectmat. (line 124) * v_memcpy: Gsl_vectmat. (line 92) * v_min: Gsl_vectmat. (line 116) * v_min_index: Gsl_vectmat. (line 128) * v_minmax: Gsl_vectmat. (line 120) * v_minmax_index: Gsl_vectmat. (line 132) * v_mul: Gsl_vectmat. (line 104) * v_sub: Gsl_vectmat. (line 100) * valid: Gsl_permut. (line 48) * variance: Gsl_stats. (line 21) * variance_with_fixed_mean: Gsl_stats. (line 29) * vec_convert: Gsl_vectmat. (line 27) * vector: Gsl_sort. (line 17) * vector_flat: Gsl_sort. (line 41) * vector_flat_index: Gsl_sort. (line 45) * vector_flat_largest: Gsl_sort. (line 53) * vector_flat_largest_index: Gsl_sort. (line 61) * vector_flat_smallest: Gsl_sort. (line 49) * vector_flat_smallest_index: Gsl_sort. (line 57) * vector_index: Gsl_sort. (line 21) * vector_largest: Gsl_sort. (line 29) * vector_largest_index: Gsl_sort. (line 37) * vector_smallest: Gsl_sort. (line 25) * vector_smallest_index: Gsl_sort. (line 33) * version: Gsl_error. (line 17) * view_array <1>: Gsl_matrix_flat. (line 162) * view_array: Gsl_vector_flat. (line 150) * view_complex_array <1>: Gsl_matrix_complex_flat. (line 168) * view_complex_array: Gsl_vector_complex_flat. (line 102) * view_vector <1>: Gsl_matrix_complex_flat. (line 173) * view_vector: Gsl_matrix_flat. (line 167) * weibull: Gsl_randist. (line 245) * weibull_P: Gsl_cdf. (line 265) * weibull_pdf: Gsl_randist. (line 249) * weibull_Pinv: Gsl_cdf. (line 273) * weibull_Q: Gsl_cdf. (line 269) * weibull_Qinv: Gsl_cdf. (line 277) * workspace_make: Gsl_wavelet. (line 45) * workspace_size: Gsl_wavelet. (line 49) * zdscal <1>: Gsl_blas_gen/Complex. (line 48) * zdscal <2>: Gsl_blas_flat/Complex. (line 51) * zdscal: Gsl_blas/Complex. (line 52) * zeta: Gsl_sf. (line 1541) * zeta_e: Gsl_sf. (line 1545) * zeta_int: Gsl_sf. (line 1533) * zeta_int_e: Gsl_sf. (line 1537)  File: ocamlgsl.info, Node: Modules index, Prev: Values index, Up: Top Modules index ************* [index] * Menu: * Bracket: Gsl_root/Bracket. (line 6) * Complex <1>: Gsl_fft/Complex. (line 6) * Complex <2>: Gsl_blas_gen/Complex. (line 6) * Complex <3>: Gsl_blas_flat/Complex. (line 6) * Complex: Gsl_blas/Complex. (line 6) * Complex_Single: Gsl_blas/Complex_Single. (line 6) * Deriv <1>: Gsl_multimin/Deriv. (line 6) * Deriv: Gsl_multiroot/Deriv. (line 6) * Gsl_blas: Gsl_blas. (line 6) * Gsl_blas_flat: Gsl_blas_flat. (line 6) * Gsl_blas_gen: Gsl_blas_gen. (line 6) * Gsl_bspline: Gsl_bspline. (line 6) * Gsl_cdf: Gsl_cdf. (line 6) * Gsl_cheb: Gsl_cheb. (line 6) * Gsl_complex: Gsl_complex. (line 6) * Gsl_const: Gsl_const. (line 6) * Gsl_diff: Gsl_diff. (line 6) * Gsl_eigen: Gsl_eigen. (line 6) * Gsl_error: Gsl_error. (line 6) * Gsl_fft: Gsl_fft. (line 6) * Gsl_fit: Gsl_fit. (line 6) * Gsl_fun: Gsl_fun. (line 6) * Gsl_histo: Gsl_histo. (line 6) * Gsl_ieee: Gsl_ieee. (line 6) * Gsl_integration: Gsl_integration. (line 6) * Gsl_interp: Gsl_interp. (line 6) * Gsl_linalg: Gsl_linalg. (line 6) * Gsl_math: Gsl_math. (line 6) * Gsl_matrix: Gsl_matrix. (line 6) * Gsl_matrix_complex: Gsl_matrix_complex. (line 6) * Gsl_matrix_complex_flat: Gsl_matrix_complex_flat. (line 6) * Gsl_matrix_flat: Gsl_matrix_flat. (line 6) * Gsl_min: Gsl_min. (line 6) * Gsl_monte: Gsl_monte. (line 6) * Gsl_multifit: Gsl_multifit. (line 6) * Gsl_multifit_nlin: Gsl_multifit_nlin. (line 6) * Gsl_multimin: Gsl_multimin. (line 6) * Gsl_multiroot: Gsl_multiroot. (line 6) * Gsl_odeiv: Gsl_odeiv. (line 6) * Gsl_permut: Gsl_permut. (line 6) * Gsl_poly: Gsl_poly. (line 6) * Gsl_qrng: Gsl_qrng. (line 6) * Gsl_randist: Gsl_randist. (line 6) * Gsl_rng: Gsl_rng. (line 6) * Gsl_root: Gsl_root. (line 6) * Gsl_sf: Gsl_sf. (line 6) * Gsl_siman: Gsl_siman. (line 6) * Gsl_sort: Gsl_sort. (line 6) * Gsl_stats: Gsl_stats. (line 6) * Gsl_sum: Gsl_sum. (line 6) * Gsl_vectmat: Gsl_vectmat. (line 6) * Gsl_vector: Gsl_vector. (line 6) * Gsl_vector_complex: Gsl_vector_complex. (line 6) * Gsl_vector_complex_flat: Gsl_vector_complex_flat. (line 6) * Gsl_vector_flat: Gsl_vector_flat. (line 6) * Gsl_wavelet: Gsl_wavelet. (line 6) * Halfcomplex: Gsl_fft/Halfcomplex. (line 6) * NoDeriv <1>: Gsl_multimin/NoDeriv. (line 6) * NoDeriv: Gsl_multiroot/NoDeriv. (line 6) * Polish: Gsl_root/Polish. (line 6) * Real: Gsl_fft/Real. (line 6) * Single <1>: Gsl_blas/Single. (line 6) * Single <2>: Gsl_matrix_complex/Single. (line 6) * Single <3>: Gsl_matrix/Single. (line 6) * Single <4>: Gsl_vector_complex/Single. (line 6) * Single: Gsl_vector/Single. (line 6) * Trunc: Gsl_sum/Trunc. (line 6)