コード例 #1
0
 def intSum(arcs,A):
     s = 0
     for a in A:
         for arc in arcs:
             i = intervalIntersection(arc[1:],a)
             if i: s += i[1] - i[0]
     return s
コード例 #2
0
 def intSum(arcs,A):
     s = 0
     for a in A:
         for arc in arcs:
             i = intervalIntersection(arc[1:],a)
             if i: s += i[1] - i[0]
     return s