Skip to content

Commit

Permalink
es -> edges
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Oct 3, 2023
1 parent ccc7946 commit 6fdd8d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/beliefpropagation/sqrt_beliefpropagation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function sqrt_belief_propagation_iteration(
tn::ITensorNetwork,
sqrt_mts::DataGraph;
update_order::String="parallel",
es=edges(sqrt_mts),
edges=Graphs.edges(sqrt_mts),

# compute_norm=false,
)
Expand All @@ -40,7 +40,7 @@ function sqrt_belief_propagation_iteration(
end
incoming_mts = update_order == "parallel" ? mts : new_mts
c = 0.0
for e in es
for e in edges
environment_tensornetworks = ITensorNetwork[
sqrt_mts[e_in] for
e_in in setdiff(boundary_edges(sqrt_mts, [src(e)]; dir=:in), [reverse(e)])
Expand All @@ -58,7 +58,7 @@ function sqrt_belief_propagation_iteration(
# c += 0.5 * norm(LHS - RHS)
# end
end
return new_sqrt_mts, c / (length(es))
return new_sqrt_mts, c / (length(edges))
end

function update_sqrt_message_tensor(
Expand Down

0 comments on commit 6fdd8d8

Please sign in to comment.