10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-07 22:53:41 +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 (* Create a matrix using the fact that the determinant space is made of
the outer product of spindeterminants. *) the outer product of spindeterminants. *)
@ -389,23 +398,25 @@ let create_matrix_spin_computed f det_space =
if i <> !i_prev then if i <> !i_prev then
begin begin
i_prev := i; 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_a = (i-1)/n_beta in
let i_alfa = i_a + 1 in let i_alfa = i_a + 1 in
let h1 = let h1 =
h (i_alfa-1) h (i_alfa-1)
in in
let bi =
let i_beta = i - i_a*n_beta in let i_beta = i - i_a*n_beta in
let bi = (i_beta-1) in i_beta-1
let h123_prev = ref (fun _ -> 0.) in in
let j_a = ref (-n_alfa) in
let j_alfa_prev = ref (-10) in let j_alfa_prev = ref (-10) in
let j0 = ref (!j_a * n_beta) in let h123_prev = ref (fun _ -> 0.) in
result := fun j -> let f j =
if j > !j0 + n_beta if j > !j0 + n_beta || j < !j0 then
|| j < !j0 begin
then begin let x = (j-1)/n_beta in
j_a := (j-1)/n_beta; j_a := x;
j0 := !j_a * n_beta j0 := x * n_beta
end; end;
let j_alfa = !j_a + 1 in let j_alfa = !j_a + 1 in
let h123 = let h123 =
@ -418,6 +429,8 @@ let create_matrix_spin_computed f det_space =
in in
let j_beta = j - !j0 in let j_beta = j - !j0 in
h123 (j_beta-1) h123 (j_beta-1)
in
result := f ;
end; end;
!result !result
in in