From f72ed978ba30e231dd393e043f65c2e1664ca4a5 Mon Sep 17 00:00:00 2001 From: infrub Date: Sat, 29 Jun 2019 03:13:36 +0900 Subject: [PATCH] Rename --- netcon.py | 12 ++++++------ tdt.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/netcon.py b/netcon.py index fcf42f7..89c8930 100644 --- a/netcon.py +++ b/netcon.py @@ -14,7 +14,7 @@ import itertools -class HistTensorFrame: +class TensorFrame: """Tensor class for netcon. Attributes: @@ -32,7 +32,7 @@ def __init__(self,rpn=[],bits=0,bonds=[],cost=0.0,is_new=True): self.is_new = is_new def __repr__(self): - return "HistTensorFrame({0}, bonds={1}, cost={2:.6e}, bits={3}, is_new={4})".format( + return "TensorFrame({0}, bonds={1}, cost={2:.6e}, bits={3}, is_new={4})".format( self.rpn, self.bonds, self.cost, self.bits, self.is_new) def __str__(self): @@ -40,12 +40,12 @@ def __str__(self): self.rpn, self.bonds, self.cost, self.bits, self.is_new) -class NetconClass: +class NetconOptimizer: def __init__(self, prime_tensors, bond_dims): self.prime_tensors = prime_tensors self.BOND_DIMS = bond_dims[:] - def calc(self): + def optimize(self): """Find optimal contraction sequence. Args: @@ -106,7 +106,7 @@ def init_tensordict_of_size(self): if i>=0: bits += (1<