Rip out some unused members of Slipnode. NFC.
This commit is contained in:
@ -8,13 +8,13 @@ class Slipnet(object):
|
|||||||
# pylint: disable=too-many-instance-attributes
|
# pylint: disable=too-many-instance-attributes
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
logging.debug("Slipnet.__init__()")
|
logging.debug("Slipnet.__init__()")
|
||||||
self.initiallyClampedSlipnodes = []
|
|
||||||
self.slipnodes = []
|
self.slipnodes = []
|
||||||
self.sliplinks = []
|
self.sliplinks = []
|
||||||
self.bondFacets = []
|
self.bondFacets = []
|
||||||
self.numberOfUpdates = 0
|
self.numberOfUpdates = 0
|
||||||
self.__addInitialNodes()
|
self.__addInitialNodes()
|
||||||
self.__addInitialLinks()
|
self.__addInitialLinks()
|
||||||
|
self.reset()
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<slipnet>'
|
return '<slipnet>'
|
||||||
@ -129,11 +129,11 @@ class Slipnet(object):
|
|||||||
self.bondFacets += [self.letterCategory]
|
self.bondFacets += [self.letterCategory]
|
||||||
self.bondFacets += [self.length]
|
self.bondFacets += [self.length]
|
||||||
|
|
||||||
#
|
# some factors are considered "very relevant" a priori
|
||||||
self.initiallyClampedSlipnodes += [self.letterCategory]
|
self.initiallyClampedSlipnodes = [
|
||||||
self.letterCategory.clamped = True
|
self.letterCategory,
|
||||||
self.initiallyClampedSlipnodes += [self.stringPositionCategory]
|
self.stringPositionCategory,
|
||||||
self.stringPositionCategory.clamped = True
|
]
|
||||||
|
|
||||||
def __addInitialLinks(self):
|
def __addInitialLinks(self):
|
||||||
self.sliplinks = []
|
self.sliplinks = []
|
||||||
|
|||||||
@ -12,14 +12,12 @@ class Slipnode(object):
|
|||||||
self.slipnet = slipnet
|
self.slipnet = slipnet
|
||||||
self.name = name
|
self.name = name
|
||||||
self.conceptualDepth = depth
|
self.conceptualDepth = depth
|
||||||
self.usualConceptualDepth = depth
|
|
||||||
self.intrinsicLinkLength = length
|
self.intrinsicLinkLength = length
|
||||||
self.shrunkLinkLength = length * 0.4
|
self.shrunkLinkLength = length * 0.4
|
||||||
|
|
||||||
self.activation = 0.0
|
self.activation = 0.0
|
||||||
self.buffer = 0.0
|
self.buffer = 0.0
|
||||||
self.clamped = False
|
self.clamped = False
|
||||||
self.bondFacetFactor = 0.0
|
|
||||||
self.categoryLinks = []
|
self.categoryLinks = []
|
||||||
self.instanceLinks = []
|
self.instanceLinks = []
|
||||||
self.propertyLinks = []
|
self.propertyLinks = []
|
||||||
@ -28,7 +26,6 @@ class Slipnode(object):
|
|||||||
self.incomingLinks = []
|
self.incomingLinks = []
|
||||||
self.outgoingLinks = []
|
self.outgoingLinks = []
|
||||||
self.codelets = []
|
self.codelets = []
|
||||||
self.clampBondDegreeOfAssociation = False
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<Slipnode: %s>' % self.name
|
return '<Slipnode: %s>' % self.name
|
||||||
@ -64,7 +61,7 @@ class Slipnode(object):
|
|||||||
|
|
||||||
def bondDegreeOfAssociation(self):
|
def bondDegreeOfAssociation(self):
|
||||||
linkLength = self.intrinsicLinkLength
|
linkLength = self.intrinsicLinkLength
|
||||||
if (not self.clampBondDegreeOfAssociation) and self.fully_active():
|
if self.fully_active():
|
||||||
linkLength = self.shrunkLinkLength
|
linkLength = self.shrunkLinkLength
|
||||||
result = math.sqrt(100 - linkLength) * 11.0
|
result = math.sqrt(100 - linkLength) * 11.0
|
||||||
return min(100.0, result)
|
return min(100.0, result)
|
||||||
|
|||||||
Reference in New Issue
Block a user