Skip to content

Commit

Permalink
Edit set_environment for ProjTTNApply.
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Kloss committed Jan 30, 2024
1 parent fefc66a commit 9c5b42f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/treetensornetworks/projttns/projttn_apply.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ function set_environments(p::ProjTTNApply, environments)
return ProjTTNApply(pos(p), init_state(p), operator(p), environments)
end

function set_environment(p::ProjTTNApply, edge, env)
newenv = merge(p.environments, Dictionary((edge,), (env,)))
return ProjTTNApply(pos(p), init_state(p), operator(p), newenv)
end

set_environment(p::ProjTTNApply, edge, env) = set_environment!(copy(p), edge, env)
function set_environment!(p::ProjTTNApply, edge, env)
set!(environments(p), edge, env)
return p
Expand Down

0 comments on commit 9c5b42f

Please sign in to comment.