10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2025-01-03 01:55:40 +01:00

Pretty printer for vectors

This commit is contained in:
Anthony Scemama 2024-09-06 15:55:04 +02:00
parent 51f216da90
commit 2090aca15e
3 changed files with 8 additions and 0 deletions

View File

@ -73,3 +73,8 @@ let normalize v =
let (%.) t i = t.{i}
let set t i v = t.{i} <- v
let pp ppf m =
let m = to_bigarray_inplace m in
Lacaml.Io.pp_fvec ppf m

View File

@ -142,3 +142,5 @@ val (%.) : 'a t -> int -> float
val set : 'a t -> int -> float -> unit
(** Modifies the value in-place at the i-th position *)
val pp : Format.formatter -> 'a t -> unit

View File

@ -22,6 +22,7 @@ let printers =
"Gaussian.Contracted_shell.pp" ;
"Gaussian.General_basis.pp" ;
"Linear_algebra.Matrix.pp" ;
"Linear_algebra.Vector.pp" ;
"Mo.Basis.pp" ;
"Mo.Class.pp" ;
"Mo.Fock.pp" ;