Rip out some unused members of Slipnode. NFC.

This commit is contained in:
Arthur O'Dwyer
2017-04-22 18:01:30 -07:00
parent b5b04c77a1
commit ec2c172ce0
2 changed files with 7 additions and 10 deletions

View File

@ -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 '<slipnet>'
@ -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 = []

View File

@ -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 '<Slipnode: %s>' % 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)