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