We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 620da37 commit 180183eCopy full SHA for 180183e
src/normalize.jl
@@ -17,15 +17,16 @@ function rescale(
17
end
18
19
function rescale(
20
- alg::Algorithm"bp",
+ alg::Algorithm,
21
tn::AbstractITensorNetwork,
22
vs=collect(vertices(tn));
23
(cache!)=nothing,
24
+ cache_construction_kwargs=default_cache_construction_kwargs(alg, tn),
25
update_cache=isnothing(cache!),
26
cache_update_kwargs=default_cache_update_kwargs(cache!),
27
)
28
if isnothing(cache!)
- cache! = Ref(BeliefPropagationCache(tn, group(v -> v, vertices(tn))))
29
+ cache! = Ref(cache(alg, tn; cache_construction_kwargs...))
30
31
32
if update_cache
0 commit comments