本文整理汇总了Python中Debug.show方法的典型用法代码示例。如果您正苦于以下问题:Python Debug.show方法的具体用法?Python Debug.show怎么用?Python Debug.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug.show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LoadData
# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import show [as 别名]
def LoadData(FileName):
fin = open(FileName)
x1, y1, x2, y2 = fin.readline().split(' ')
points = []
S = graph.Point(float(x1), float(y1))
T = graph.Point(float(x2), float(y2))
points.append(S)
points.append(T)
centors = []
Q = int(fin.readline())
R = []
while Q > 0:
Q -= 1
x, y, r = fin.readline().split(' ')
x = float(x)
y = float(y)
r = float(r)
R.append(r * 1.0)
centors.append(graph.Point(x, y))
for i in range(8):
points.append(graph.Point(x + dx[i] * r, y + dy[i] * r))
views.setBan(x, y, r)
#print centors[0].DistenceToLine(points[0], points[1])
#return None
edge = []
for i in range(len(points)):
for j in range(i + 1, len(points), 1):
Flag = True
for k in range(len(centors)):
if (centors[k].DistenceToPoint(points[j]) + EPS < R[k]) and (centors[k].DistenceToPoint(points[i]) + EPS < R[k]):
print 'Set'
Flag = False
continue
if (points[i].DistenceToPoint(points[j]) < EPS):
continue
print i, j
if (centors[k].DistenceToLine(points[i], points[j]) + EPS <= R[k]):
print 'Pro'
Flag = False
if (Flag):
edge.append((i, j, points[i].DistenceToPoint(points[j])))
x = []
y = []
for point in points:
x.append(point.x)
y.append(point.y)
Debug.show(x, y)
Debug.show([200], [100])
return edge, x, y