From ec2c172ce0af2d1a1cf7fcedec52d6fe72c000c7 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sat, 22 Apr 2017 18:01:30 -0700 Subject: [PATCH] Rip out some unused members of `Slipnode`. NFC. --- copycat/slipnet.py | 12 ++++++------ copycat/slipnode.py | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/copycat/slipnet.py b/copycat/slipnet.py index 511b027..4a4713a 100644 --- a/copycat/slipnet.py +++ b/copycat/slipnet.py @@ -8,13 +8,13 @@ class Slipnet(object): # pylint: disable=too-many-instance-attributes def __init__(self): logging.debug("Slipnet.__init__()") - self.initiallyClampedSlipnodes = [] self.slipnodes = [] self.sliplinks = [] self.bondFacets = [] self.numberOfUpdates = 0 self.__addInitialNodes() self.__addInitialLinks() + self.reset() def __repr__(self): return '' @@ -129,11 +129,11 @@ class Slipnet(object): self.bondFacets += [self.letterCategory] self.bondFacets += [self.length] - # - self.initiallyClampedSlipnodes += [self.letterCategory] - self.letterCategory.clamped = True - self.initiallyClampedSlipnodes += [self.stringPositionCategory] - self.stringPositionCategory.clamped = True + # some factors are considered "very relevant" a priori + self.initiallyClampedSlipnodes = [ + self.letterCategory, + self.stringPositionCategory, + ] def __addInitialLinks(self): self.sliplinks = [] diff --git a/copycat/slipnode.py b/copycat/slipnode.py index ec42bc4..824ebf0 100644 --- a/copycat/slipnode.py +++ b/copycat/slipnode.py @@ -12,14 +12,12 @@ class Slipnode(object): self.slipnet = slipnet self.name = name self.conceptualDepth = depth - self.usualConceptualDepth = depth self.intrinsicLinkLength = length self.shrunkLinkLength = length * 0.4 self.activation = 0.0 self.buffer = 0.0 self.clamped = False - self.bondFacetFactor = 0.0 self.categoryLinks = [] self.instanceLinks = [] self.propertyLinks = [] @@ -28,7 +26,6 @@ class Slipnode(object): self.incomingLinks = [] self.outgoingLinks = [] self.codelets = [] - self.clampBondDegreeOfAssociation = False def __repr__(self): return '' % self.name @@ -64,7 +61,7 @@ class Slipnode(object): def bondDegreeOfAssociation(self): linkLength = self.intrinsicLinkLength - if (not self.clampBondDegreeOfAssociation) and self.fully_active(): + if self.fully_active(): linkLength = self.shrunkLinkLength result = math.sqrt(100 - linkLength) * 11.0 return min(100.0, result)