mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 20:29:17 +00:00
added a comment to hyperbolic_celldistance
This commit is contained in:
parent
d4dfdc1a43
commit
581d26ef45
@ -851,6 +851,14 @@ int sibling_distance(cell *a, cell *b, int limit) {
|
||||
}
|
||||
}
|
||||
|
||||
/** An algorithm for computing distance between two cells.
|
||||
This algorithm runs correctly in O(d) assuming that:
|
||||
- distances from the origin are known
|
||||
- the set of cells in distance d from the origin forms a cycle
|
||||
- the map is Gromov hyperbolic (with sibling_limit computed correctly) and planar
|
||||
- all vertices have valence <= 4
|
||||
- each vertex has at most two parents
|
||||
*/
|
||||
EX int hyperbolic_celldistance(cell *c1, cell *c2) {
|
||||
int found_distance = INF;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user