10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 12:23:31 +01:00

Optimized hash

This commit is contained in:
Anthony Scemama 2018-02-02 21:23:33 +01:00
parent 94ab6f0174
commit 7ee34f3c9f
2 changed files with 3 additions and 9 deletions

View File

@ -352,9 +352,7 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
in in
let zero_m_array = let zero_m_array =
let key = String.concat " " let key = (maxm, expo_pq_inv, norm_pq_sq) in
[ string_of_int maxm ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
try try
let result = let result =
Hashtbl.find zero_m_cache key Hashtbl.find zero_m_cache key

View File

@ -338,9 +338,7 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
in in
let zero_m_array = let zero_m_array =
let key = String.concat " " let key = (0, expo_pq_inv, norm_pq_sq) in
[ string_of_int 0 ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
try try
let result = let result =
Hashtbl.find zero_m_cache key Hashtbl.find zero_m_cache key
@ -379,9 +377,7 @@ let contracted_class_shell_pairs ~zero_m ?schwartz_p ?schwartz_q shell_p shell_q
in in
let zero_m_array = let zero_m_array =
let key = String.concat " " let key = (maxm, expo_pq_inv, norm_pq_sq) in
[ string_of_int maxm ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
try try
let result = let result =
Hashtbl.find zero_m_cache key Hashtbl.find zero_m_cache key