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