10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-23 04:43:32 +01:00
QCaml/Basis/Overlap_primitives.ml

36 lines
742 B
OCaml
Raw Normal View History

2018-01-22 23:19:24 +01:00
open Util
(** Horizontal and Vertical Recurrence Relations (HVRR) *)
let hvrr (angMom_a, angMom_b) (expo_inv_p) (center_ab, center_pa)
=
(** Vertical recurrence relations *)
let rec vrr angMom_a =
2018-03-13 18:24:00 +01:00
if angMom_a > 0 then
chop center_pa (fun () -> vrr (angMom_a-1))
+. chop (0.5 *. float_of_int (angMom_a-1) *. expo_inv_p)
2018-01-22 23:19:24 +01:00
(fun () -> vrr (angMom_a-2))
2018-03-13 18:24:00 +01:00
else if angMom_a = 0 then 1.
else 0.
2018-01-22 23:19:24 +01:00
(** Horizontal recurrence relations *)
and hrr angMom_a angMom_b =
2018-03-13 18:24:00 +01:00
if angMom_b > 0 then
2018-01-22 23:19:24 +01:00
hrr (angMom_a+1) (angMom_b-1) +. chop center_ab
(fun () -> hrr angMom_a (angMom_b-1) )
2018-03-13 18:24:00 +01:00
else if angMom_b = 0 then
vrr angMom_a
else 0.
2018-01-22 23:19:24 +01:00
in
hrr angMom_a angMom_b
let overlap = hvrr