10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-14 18:13:40 +01:00

Working on CI

This commit is contained in:
Anthony Scemama 2019-04-03 23:09:20 +02:00
parent c2ead899d9
commit 34033829e4

View File

@ -337,6 +337,15 @@ let create_matrix_spin f det_space =
)
type mdata =
{ i_a : int ref;
j_a : int ref;
j0 : int ref;
j_alfa_prev : int ref;
bi : int;
h1 : (int -> int -> int -> int -> float) ref
h123_prev : (int -> float) ref
}
(* Create a matrix using the fact that the determinant space is made of
the outer product of spindeterminants. *)
@ -389,24 +398,26 @@ let create_matrix_spin_computed f det_space =
if i <> !i_prev then
begin
i_prev := i;
let j_a = ref (-n_alfa) in
let j0 = ref (!j_a * n_beta) in
let i_a = (i-1)/n_beta in
let i_alfa = i_a + 1 in
let h1 =
h (i_alfa-1)
in
let i_beta = i - i_a*n_beta in
let bi = (i_beta-1) in
let h123_prev = ref (fun _ -> 0.) in
let j_a = ref (-n_alfa) in
let bi =
let i_beta = i - i_a*n_beta in
i_beta-1
in
let j_alfa_prev = ref (-10) in
let j0 = ref (!j_a * n_beta) in
result := fun j ->
if j > !j0 + n_beta
|| j < !j0
then begin
j_a := (j-1)/n_beta;
j0 := !j_a * n_beta
end;
let h123_prev = ref (fun _ -> 0.) in
let f j =
if j > !j0 + n_beta || j < !j0 then
begin
let x = (j-1)/n_beta in
j_a := x;
j0 := x * n_beta
end;
let j_alfa = !j_a + 1 in
let h123 =
if j_alfa <> !j_alfa_prev then
@ -418,6 +429,8 @@ let create_matrix_spin_computed f det_space =
in
let j_beta = j - !j0 in
h123 (j_beta-1)
in
result := f ;
end;
!result
in