From 6fdc0e636024739c6382f6451d03a3df2806eaf4 Mon Sep 17 00:00:00 2001 From: b-kloss Date: Thu, 1 Feb 2024 11:53:32 -0500 Subject: [PATCH] Replace access by field by accessor function. Co-authored-by: Matt Fishman --- src/treetensornetworks/projttns/projttnsum.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/treetensornetworks/projttns/projttnsum.jl b/src/treetensornetworks/projttns/projttnsum.jl index 4906e34a..fef61f3e 100644 --- a/src/treetensornetworks/projttns/projttnsum.jl +++ b/src/treetensornetworks/projttns/projttnsum.jl @@ -20,7 +20,7 @@ on_edge(P::ProjTTNSum) = on_edge(terms(P)[1]) nsite(P::ProjTTNSum) = nsite(terms(P)[1]) function set_nsite(Ps::ProjTTNSum, nsite) - return ProjTTNSum(map(M -> set_nsite(M, nsite), Ps.terms)) + return ProjTTNSum(map(p -> set_nsite(p, nsite), terms(Ps))) end underlying_graph(P::ProjTTNSum) = underlying_graph(terms(P)[1])