|
@@ -131,7 +131,7 @@ class Graph:
|
|
|
|
|
|
if not isinstance(self.verticles[0], verticle):
|
|
|
print("Перепись " + "="*32)
|
|
|
- space = np.linspace(0, 2*np.pi, len(self.verticles)+1)[:-1]
|
|
|
+ space = np.linspace(np.pi/2, 2*np.pi+np.pi/2, len(self.verticles)+1)[:-1]
|
|
|
self.__verticles = [verticle(name, np.cos(sp)+x, np.sin(sp)+y) for name, sp in zip(self.verticles, space)]
|
|
|
|
|
|
print([vert.name for vert in self.verticles])
|
|
@@ -201,11 +201,11 @@ if __name__ == "__main__":
|
|
|
# print("Invert G1:",~g)
|
|
|
# g.plot(1, 1)
|
|
|
# h.plot(3.2, 1)
|
|
|
- g = Graph.build([[0, 1, 1, 1, 1],
|
|
|
- [1, 0, 0, 0, 0],
|
|
|
- [1, 0, 0, 1, 1],
|
|
|
- [1, 0, 1, 0, 0],
|
|
|
- [1, 0, 1, 0, 0]])
|
|
|
+ g = Graph.build([[0, 10, 30, 50, 10],
|
|
|
+ [0, 0, 0, 0, 0],
|
|
|
+ [0, 0, 0, 0, 10],
|
|
|
+ [0, 40, 20, 0, 0],
|
|
|
+ [10, 0, 10, 30, 0]])
|
|
|
print(repr(g.graph_type))
|
|
|
g.plot()
|
|
|
print(g)
|