10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-02 03:15:19 +02: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
let zero_m_array =
let key = String.concat " "
[ string_of_int maxm ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
let key = (maxm, expo_pq_inv, norm_pq_sq) in
try
let result =
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
let zero_m_array =
let key = String.concat " "
[ string_of_int 0 ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
let key = (0, expo_pq_inv, norm_pq_sq) in
try
let result =
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
let zero_m_array =
let key = String.concat " "
[ string_of_int maxm ; string_of_float expo_pq_inv ; string_of_float norm_pq_sq ]
in
let key = (maxm, expo_pq_inv, norm_pq_sq) in
try
let result =
Hashtbl.find zero_m_cache key