Commit d2e7d4f9 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

BlockState: Remove instance counting

parent d0709299
...@@ -92,12 +92,9 @@ class BlockState(object): ...@@ -92,12 +92,9 @@ class BlockState(object):
memory, memory,
""" """
_state_ref_count = 0
def __init__(self, g, eweight=None, vweight=None, b=None, def __init__(self, g, eweight=None, vweight=None, b=None,
B=None, clabel=None, deg_corr=True, B=None, clabel=None, deg_corr=True,
max_BE=1000, **kwargs): max_BE=1000, **kwargs):
BlockState._state_ref_count += 1
# initialize weights to unity, if necessary # initialize weights to unity, if necessary
if eweight is None: if eweight is None:
......
...@@ -85,9 +85,6 @@ class CovariateBlockState(BlockState): ...@@ -85,9 +85,6 @@ class CovariateBlockState(BlockState):
def __init__(self, g, ec, eweight=None, vweight=None, b=None, B=None, def __init__(self, g, ec, eweight=None, vweight=None, b=None, B=None,
clabel=None, layers=False, deg_corr=True, overlap=False, clabel=None, layers=False, deg_corr=True, overlap=False,
**kwargs): **kwargs):
BlockState._state_ref_count += 1
self.g = g self.g = g
if kwargs.get("ec_done", False): if kwargs.get("ec_done", False):
......
...@@ -75,8 +75,6 @@ class OverlapBlockState(BlockState): ...@@ -75,8 +75,6 @@ class OverlapBlockState(BlockState):
def __init__(self, g, b=None, B=None, clabel=None, deg_corr=True, def __init__(self, g, b=None, B=None, clabel=None, deg_corr=True,
max_BE=1000, **kwargs): max_BE=1000, **kwargs):
BlockState._state_ref_count += 1
# determine if there is a base graph, and overlapping structure # determine if there is a base graph, and overlapping structure
self.base_g = kwargs.get("base_g", None) self.base_g = kwargs.get("base_g", None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment