parser.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:occt-analysis 作者: jackfischer 项目源码 文件源码
def sum_graph(i, j):
  '''sum graph [i,j) to determine distance b/w indicies i and j
  Automatically perform wraparound'''
  if i < j: #normal case, no wraparound
    return sum(graph[i:j])
  elif i > j: #destination point is earlier in list, wrap around
    return sum(graph[i:]) + sum(graph[:j])
  else:
      return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号