Base.append! is thought for ordered collections like Vector, while Base.merge! is thought for key-indexed collections like Dict. Our TensorNetwork type resembles more a Dict since Tensors are not ordered and are key-indexed, so semantically makes more sense to use merge!.
Base.append!
is thought for ordered collections likeVector
, whileBase.merge!
is thought for key-indexed collections likeDict
. OurTensorNetwork
type resembles more aDict
sinceTensor
s are not ordered and are key-indexed, so semantically makes more sense to usemerge!
.