コード例 #1
0
 def process(g):
   for i in range(len(capacities)):
     nc = g(i)
     ns = T.makeLeaf(nc, state)
     if(isNewContents(ns)):
       T.addSubtree(state, ns)
       nss.append(ns)
コード例 #2
0
 def extendSolution(n):
   nss = []
   for i in D:
     nc = i
     st = T.makeLeaf(nc, n)
     if(shouldBeAdded(st)):
       T.addSubtree(n, st)
       nss.append(st)
   return nss
コード例 #3
0
 def extendSolution(n):
   nss = []
   for i in choices:
     ncs = process(i)
     for nc in ncs: 
       st = T.makeLeaf(nc, n)
       if(shouldBeAdded(st)):
         T.addSubtree(n, st)
         nss.append(st)
   return nss