spinx going book

This commit is contained in:
Steffen Illium
2023-12-12 17:51:37 +01:00
parent 7feba6d452
commit e7933985cb
44 changed files with 392 additions and 310 deletions

View File

@ -8,10 +8,10 @@ def points_to_graph(coordiniates, allow_euclidean_connections=True, allow_manhat
"""
Given a set of coordinates, this function contructs a non-directed graph, by conncting adjected points.
There are three combinations of settings:
Allow all neigbors: Distance(a, b) <= sqrt(2)
Allow only manhattan: Distance(a, b) == 1
Allow only Euclidean: Distance(a, b) == sqrt(2)
- Allow all neigbors: Distance(a, b) <= sqrt(2)
- Allow only manhattan: Distance(a, b) == 1
- Allow only Euclidean: Distance(a, b) == sqrt(2)
:param coordiniates: A set of coordinates.
:type coordiniates: Tuple[int, int]