Module Lacaml.Utils

Utility functions

val empty_int32_vec : Common.int32_vec
val get_norm_char : [< `F | `I | `M | `O ] -> char
val get_uplo_char : bool -> char
val get_trans_char : [< `C | `N | `T ] -> char
val get_side_char : [< `L | `R ] -> char
val get_diag_char : [< `N | `U ] -> char
val get_s_d_job_char : [< `A | `N | `O | `S ] -> char
val get_job_char : bool -> char
val job_char_true : char
val job_char_false : char
val a_str : string
val ab_str : string
val alphas_str : string
val ap_str : string
val b_str : string
val br_str : string
val bc_str : string
val c_str : string
val cr_str : string
val cc_str : string
val d_str : string
val dl_str : string
val du_str : string
val e_str : string
val ipiv_str : string
val iseed_str : string
val k_str : string
val ka_str : string
val kb_str : string
val work_str : string
val lwork_str : string
val liwork_str : string
val k1_str : string
val k2_str : string
val kd_str : string
val kl_str : string
val ku_str : string
val m_str : string
val n_str : string
val nrhs_str : string
val ofs_str : string
val r_str : string
val s_str : string
val tau_str : string
val u_str : string
val um_str : string
val un_str : string
val vm_str : string
val vn_str : string
val vs_str : string
val vsr_str : string
val vsc_str : string
val vt_str : string
val w_str : string
val wi_str : string
val wr_str : string
val x_str : string
val y_str : string
val z_str : string
val raise_var_lt0 : loc:string -> name:string -> int -> 'a
val check_var_lt0 : loc:string -> name:string -> int -> unit
val check_var_within : string -> string -> 'a -> 'a -> 'a -> ('a -> string) -> unit
val calc_vec_min_dim : n:int -> ofs:int -> inc:int -> int
val raise_vec_min_dim : loc:string -> vec_name:string -> dim:int -> min_dim:int -> 'a
val check_vec_min_dim : loc:string -> vec_name:string -> dim:int -> min_dim:int -> unit
val raise_vec_bad_ofs : loc:string -> vec_name:string -> ofs:int -> max_ofs:int -> 'a
val bad_n : n:int -> max_n:int -> bool
val bad_ofs : ofs:int -> max_ofs:int -> bool
val bad_inc : int -> bool
val check_vec_ofs : loc:string -> vec_name:string -> ofs:int -> max_ofs:int -> unit
val check_vec_inc : loc:string -> vec_name:string -> int -> unit
val calc_vec_max_n : dim:int -> ofs:int -> inc:int -> int
val calc_vec_opt_max_n : ?⁠ofs:int -> ?⁠inc:int -> int -> int
val raise_max_len : loc:string -> len_name:string -> len:int -> max_len:int -> 'a
val check_vec_dim : loc:string -> vec_name:string -> dim:int -> ofs:int -> inc:int -> n_name:string -> n:int -> unit
val get_vec_n : loc:string -> vec_name:string -> dim:int -> ofs:int -> inc:int -> n_name:string -> int option -> int
val get_vec_min_dim : loc:string -> vec_name:string -> ofs:int -> inc:int -> n:int -> int
val get_vec_start_stop : ofsx:int -> incx:int -> n:int -> int * int
val raise_bad_mat_ofs : loc:string -> name:string -> ofs_name:string -> ofs:int -> max_ofs:int -> 'a
val raise_mat_bad_r : loc:string -> mat_name:string -> r:int -> max_r:int -> 'a
val raise_mat_bad_c : loc:string -> mat_name:string -> c:int -> max_c:int -> 'a
val check_mat_r : loc:string -> mat_name:string -> r:int -> max_r:int -> unit
val check_mat_c : loc:string -> mat_name:string -> c:int -> max_c:int -> unit
val calc_mat_max_rows : dim1:int -> r:int -> int
val calc_mat_opt_max_rows : ?⁠r:int -> int -> int
val calc_mat_max_cols : dim2:int -> c:int -> int
val calc_mat_opt_max_cols : ?⁠c:int -> int -> int
val check_mat_rows : loc:string -> mat_name:string -> dim1:int -> r:int -> p:int -> param_name:string -> unit
val check_mat_m : loc:string -> mat_name:string -> dim1:int -> r:int -> m:int -> unit
val check_mat_cols : loc:string -> mat_name:string -> dim2:int -> c:int -> p:int -> param_name:string -> unit
val check_mat_n : loc:string -> mat_name:string -> dim2:int -> c:int -> n:int -> unit

check_mat_n ~loc ~mat_name ~dim2 ~c ~n checks the matrix column operation length in parameter n at location loc for matrix with name mat_name and dimension dim2 given the operation column c.

raises Invalid_argument

if any arguments are invalid.

val check_mat_mn : loc:string -> mat_name:string -> dim1:int -> dim2:int -> r:int -> c:int -> m:int -> n:int -> unit
val get_mat_rows : loc:string -> mat_name:string -> dim1:int -> r:int -> p:int option -> param_name:string -> int
val get_mat_dim1 : loc:string -> mat_name:string -> dim1:int -> r:int -> m:int option -> m_name:string -> int
val get_mat_m : loc:string -> mat_name:string -> dim1:int -> r:int -> m:int option -> int
val get_mat_cols : loc:string -> mat_name:string -> dim2:int -> c:int -> p:int option -> param_name:string -> int
val get_mat_dim2 : loc:string -> mat_name:string -> dim2:int -> c:int -> n:int option -> n_name:string -> int
val get_mat_n : loc:string -> mat_name:string -> dim2:int -> c:int -> n:int option -> int
val get_mat_min_dim1 : loc:string -> mat_name:string -> r:int -> m:int -> int
val get_mat_min_dim2 : loc:string -> mat_name:string -> c:int -> n:int -> int
val check_mat_min_dim1 : loc:string -> mat_name:string -> dim1:int -> min_dim1:int -> unit
val check_mat_min_dim2 : loc:string -> mat_name:string -> dim2:int -> min_dim2:int -> unit
val check_mat_min_dims : loc:string -> mat_name:string -> dim1:int -> dim2:int -> min_dim1:int -> min_dim2:int -> unit
val check_vec : string -> string -> ('a'b'c) Bigarray.Array1.t -> int -> unit
val check_vec_is_perm : string -> string -> (int32, 'a'b) Bigarray.Array1.t -> int -> unit

check_vec_is_perm loc vec_name vec n checks whether vec is a valid permutation vector.

val get_vec : string -> string -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> int -> (int -> ('a'b'c) Bigarray.Array1.t) -> ('a'b'c) Bigarray.Array1.t
val get_dim_vec : string -> string -> int -> int -> ('a'b'c) Bigarray.Array1.t -> string -> int option -> int

get_dim_vec loc vec_name ofs inc vec n_name n if the dimension n is given, check that the vector vec is big enough, otherwise return the maximal n for the given vector vec.

val check_vec_empty : loc:string -> vec_name:string -> dim:int -> unit
val get_mat : string -> string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> int -> int -> ('a'b'c) Bigarray.Array2.t
val check_dim1_mat : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> string -> int -> unit
val check_dim2_mat : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> string -> int -> unit
val check_dim_mat : string -> string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int -> int -> unit
val get_dim1_mat : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> string -> int option -> int
val get_dim2_mat : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> string -> int option -> int
val check_mat_empty : loc:string -> mat_name:string -> dim1:int -> dim2:int -> unit
val get_vec_inc : string -> string -> int option -> int
val get_vec_ofs : string -> string -> int option -> int
module Mat_patt : sig ... end
external ilaenv : int -> string -> string -> int -> int -> int -> int -> int = "lacaml_ilaenv_stub_bc" "lacaml_ilaenv_stub"
val get_work : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> string -> ('a'b'c) Bigarray.Array1.t * int
val calc_unpacked_dim : string -> int -> int
val get_unpacked_dim : string -> ?⁠n:int -> int -> int
val get_vec_geom : string -> string -> int option -> int option -> int * int
val get_k_mat_sb : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> string -> int option -> int
val get_dim_mat_packed : string -> string -> int -> ('a'b'c) Bigarray.Array1.t -> string -> int option -> int
val get_n_of_square : string -> string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int
val get_n_of_a : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int
val get_nrhs_of_b : string -> int -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int
val orgqr_err : loc:string -> m:int -> n:int -> k:int -> work:('a'b'c) Bigarray.Array1.t -> a:('d'e'f) Bigarray.Array2.t -> err:int -> 'g
val orgqr_get_params : string -> ?⁠m:int -> ?⁠n:int -> ?⁠k:int -> tau:('a'b'c) Bigarray.Array1.t -> ar:int -> ac:int -> ('d'e'f) Bigarray.Array2.t -> int * int * int
val ormqr_err : loc:string -> side:[< `L | `R ] -> m:int -> n:int -> k:int -> lwork:int -> a:('a'b'c) Bigarray.Array2.t -> c:('d'e'f) Bigarray.Array2.t -> err:int -> 'g
val ormqr_get_params : string -> side:[< `L | `R ] -> ?⁠m:int -> ?⁠n:int -> ?⁠k:int -> tau:('a'b'c) Bigarray.Array1.t -> ar:int -> ac:int -> ('d'e'f) Bigarray.Array2.t -> cr:int -> cc:int -> ('g'h'i) Bigarray.Array2.t -> int * int * int
val gelsX_err : string -> (m:int -> n:int -> nrhs:int -> int) -> int -> ('a'b'c) Bigarray.Array2.t -> int -> int -> int -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int -> 'g
val gelsX_get_s : (int -> ('a'b'c) Bigarray.Array1.t) -> string -> int -> int -> ('a'b'c) Bigarray.Array1.t option -> ('a'b'c) Bigarray.Array1.t
val gelsX_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int option -> int option -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int * int * int
val xxev_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> bool -> bool -> int * char * char
val xxev_get_wx : (int -> ('a'b'c) Bigarray.Array1.t) -> string -> string -> int -> ('a'b'c) Bigarray.Array1.t option -> int -> ('a'b'c) Bigarray.Array1.t
val geev_get_job_side : string -> ('a'b'c) Bigarray.Array2.t -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> string -> int -> int -> int -> ('a'b'c) Bigarray.Array2.t option option -> int * int * ('a'b'c) Bigarray.Array2.t * char * bool
val geev_gen_get_params : string -> ('a'b'c) Bigarray.Array2.t -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int option -> int -> int -> ('a'b'c) Bigarray.Array2.t option option -> int -> int -> ('a'b'c) Bigarray.Array2.t option option -> int * int * int * ('a'b'c) Bigarray.Array2.t * char * int * int * ('a'b'c) Bigarray.Array2.t * char * bool
val gXmv_get_params : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> int -> int -> int option -> int option -> ('d'e'f) Bigarray.Array1.t -> int option -> int option -> ('a'b'c) Bigarray.Array1.t option -> [< `C | `N | `T N ] -> int * int * int * int * ('a'b'c) Bigarray.Array1.t * char
val symv_get_params : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int option -> int option -> int option -> ('g'h'i) Bigarray.Array1.t -> int option -> int option -> ('a'b'c) Bigarray.Array1.t option -> bool -> int * int * int * int * int * ('a'b'c) Bigarray.Array1.t * char
val trXv_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int option -> int option -> ('d'e'f) Bigarray.Array1.t -> bool -> [< `C | `N | `T ] -> [< `N | `U ] -> int * int * int * char * char * char
val tpXv_get_params : string -> int option -> ('a'b'c) Bigarray.Array1.t -> ?⁠n:int -> int option -> int option -> ('d'e'f) Bigarray.Array1.t -> bool -> [< `C | `N | `T ] -> [< `N | `U ] -> int * int * int * int * char * char * char
val get_c : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> int -> int -> ('a'b'c) Bigarray.Array2.t
val get_rows_mat_tr : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> int -> [> `N ] -> string -> int option -> int
val get_cols_mat_tr : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> int -> [> `N ] -> string -> int option -> int
val get_inner_dim : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> int -> [> `N ] -> string -> ('d'e'f) Bigarray.Array2.t -> int -> int -> [> `N ] -> string -> int option -> int
val gemm_get_params : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> [< `C | `N | `T N ] -> int -> int -> ('g'h'i) Bigarray.Array2.t -> int -> [< `C | `N | `T N ] -> int -> ('a'b'c) Bigarray.Array2.t option -> int option -> int option -> int option -> int * int * int * char * char * ('a'b'c) Bigarray.Array2.t
val check_mat_square : string -> string -> ('a'b'c) Bigarray.Array2.t -> int -> int -> int -> unit
val symm_get_params : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int -> int -> ('g'h'i) Bigarray.Array2.t -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> int option -> int option -> [< `L | `R L ] -> bool -> int * int * char * char * ('a'b'c) Bigarray.Array2.t
val trXm_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int option -> int option -> [< `L | `R L ] -> bool -> [< `C | `N | `T ] -> [< `N | `U ] -> int * int * char * char * char * char
val syrk_get_params : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> int option -> int option -> bool -> [< `C | `N | `T N ] -> int * int * char * char * ('a'b'c) Bigarray.Array2.t
val syr2k_get_params : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int -> int -> ('g'h'i) Bigarray.Array2.t -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> int option -> int option -> bool -> [< `C | `N | `T N ] -> int * int * char * char * ('a'b'c) Bigarray.Array2.t
val xlange_get_params : string -> int option -> int option -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int * int
val xxtrs_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int option -> int * int
val xxtrs_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> int -> 'g
val xxtri_singular_err : string -> int -> 'a
val xxtri_err : string -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val xxcon_err : string -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val geXrf_get_params : string -> int option -> int option -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int * int
val getrf_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val getrf_lu_err : string -> int -> 'a
val getrf_get_ipiv : string -> (int32, Bigarray.int32_elt, Bigarray.fortran_layout) Bigarray.Array1.t option -> int -> int -> Common.int32_vec
val sytrf_get_ipiv : string -> (int32, Bigarray.int32_elt, Bigarray.fortran_layout) Bigarray.Array1.t option -> int -> Common.int32_vec
val sytrf_err : string -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val sytrf_fact_err : string -> int -> 'a
val potrf_chol_err : string -> int -> 'a
val potrf_err : string -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val potrs_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> int -> 'g
val trtrs_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> int -> 'g
val tbtrs_err : string -> int -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> int -> 'g
val getri_err : string -> (int -> int) -> int -> ('a'b'c) Bigarray.Array2.t -> int -> int -> 'd
val trtri_err : string -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val geqrf_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val gecon_err : string -> char -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val gees_err : string -> int -> int -> char -> char -> 'a
val dummy_select_fun : 'a -> bool
val gees_get_params_generic : string -> (int -> int -> ('a'b'c) Bigarray.Array2.t) -> ('a'b'c) Bigarray.Array2.t -> [< `Compute_Schur_vectors | `No_Schur_vectors ] -> [< `No_sort | `Select_custom of 'd -> bool | `Select_exterior_disk | `Select_interior_disk | `Select_left_plane | `Select_right_plane ] -> int option -> int -> int -> ('e'f'g) Bigarray.Array2.t -> int -> int -> ('a'b'c) Bigarray.Array2.t option -> char * char * int * ('d -> bool) * int * ('a'b'c) Bigarray.Array2.t
val gees_get_params_real : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> (int -> int -> ('d'e'f) Bigarray.Array2.t) -> ('d'e'f) Bigarray.Array2.t -> [< `Compute_Schur_vectors | `No_Schur_vectors ] -> [< `No_sort | `Select_custom of 'g -> bool | `Select_exterior_disk | `Select_interior_disk | `Select_left_plane | `Select_right_plane ] -> int option -> int -> int -> ('h'i'j) Bigarray.Array2.t -> ('a'b'c) Bigarray.Array1.t option -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> char * char * int * ('g -> bool) * int * ('d'e'f) Bigarray.Array2.t * ('a'b'c) Bigarray.Array1.t * ('a'b'c) Bigarray.Array1.t
val gees_get_params_complex : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> (int -> int -> ('d'e'f) Bigarray.Array2.t) -> ('d'e'f) Bigarray.Array2.t -> [< `Compute_Schur_vectors | `No_Schur_vectors ] -> [< `No_sort | `Select_custom of 'g -> bool | `Select_exterior_disk | `Select_interior_disk | `Select_left_plane | `Select_right_plane ] -> int option -> int -> int -> ('h'i'j) Bigarray.Array2.t -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> char * char * int * ('g -> bool) * int * ('d'e'f) Bigarray.Array2.t * ('a'b'c) Bigarray.Array1.t
val gesvd_err : string -> char -> char -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> ('g'h'i) Bigarray.Array2.t -> int -> int -> 'j
val gesvd_get_params : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> (int -> int -> ('d'e'f) Bigarray.Array2.t) -> [< `A | `N | `O | `S ] -> [< `A | `N | `O | `S ] -> int option -> int option -> int -> int -> ('g'h'i) Bigarray.Array2.t -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> char * char * int * int * ('a'b'c) Bigarray.Array1.t * ('d'e'f) Bigarray.Array2.t * ('d'e'f) Bigarray.Array2.t
val gesdd_err : string -> char -> int -> int -> ('a'b'c) Bigarray.Array2.t -> ('d'e'f) Bigarray.Array2.t -> ('g'h'i) Bigarray.Array2.t -> int -> int -> 'j
val gesdd_get_params : string -> (int -> ('a'b'c) Bigarray.Array1.t) -> (int -> int -> ('d'e'f) Bigarray.Array2.t) -> [< `A | `N | `O | `S ] -> int option -> int option -> int -> int -> ('g'h'i) Bigarray.Array2.t -> ('a'b'c) Bigarray.Array1.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> int -> int -> ('d'e'f) Bigarray.Array2.t option -> char * int * int * ('a'b'c) Bigarray.Array1.t * ('d'e'f) Bigarray.Array2.t * ('d'e'f) Bigarray.Array2.t
val xxsv_err : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val xxsv_lu_err : string -> int -> 'a
val xxsv_pos_err : string -> int -> 'a
val xxsv_ind_err : string -> int -> 'a
val xxsv_a_err : string -> ('a'b'c) Bigarray.Array2.t -> int -> 'd
val xxsv_work_err : string -> int -> 'a
val xxsv_get_ipiv : string -> (int32, Bigarray.int32_elt, Bigarray.fortran_layout) Bigarray.Array1.t option -> int -> Common.int32_vec
val xxsv_get_params : string -> int -> int -> ('a'b'c) Bigarray.Array2.t -> int option -> int -> int -> ('d'e'f) Bigarray.Array2.t -> int option -> int * int