Skip to content

Commit

Permalink
Add important type annotation to CTMRGEnv VectorInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrehmer committed Apr 2, 2024
1 parent d14614e commit 714c7f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/environments/ctmrgenv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ end
# return e1
# end

function VectorInterface.add(e1, e2, α=1, β=1)
function VectorInterface.add(e1::CTMRGEnv, e2::CTMRGEnv, α=1, β=1)
corners = α * e1.corners + β * e2.corners
edges = α * e1.edges + β * e2.edges
return CTMRGEnv(corners, edges)
end
function VectorInterface.add!(e1, e2, α=1, β=1)
function VectorInterface.add!(e1::CTMRGEnv, e2::CTMRGEnv, α=1, β=1)
e1.corners .= α * e1.corners + β * e2.corners
e1.edges .= α * e1.edges + β * e2.edges
return e1
Expand Down

0 comments on commit 714c7f4

Please sign in to comment.