示例#1
0
 def initialiseLeafNode(self,index,parentIndex,newSpans,newNumSpans):
     nprint("initialising a leaf node %s from the node %s"%(index,parentIndex))
     self.spans[index] = mergeTwoDicts(self.spans[parentIndex],newSpans)
     self.numSpans[index] = mergeTwoDicts(self.numSpans[parentIndex],newNumSpans)
     self.cost[index] = 0
     self.parent[index] = parentIndex 
     self.children[index] = []
     self.fullyExpanded[index] = False
     self.numberOfVisited[index] = 0    
示例#2
0
 def mergeNumSpan(self,numSpansPath,numSpan):
     return mergeTwoDicts(numSpansPath, numSpan)
示例#3
0
 def mergeSpan(self,spansPath,span): 
     return mergeTwoDicts(spansPath, span)