API

gtravyl Package

Functions

euclid_heuristic(cur, t, grid)

euclidean_dist(ind1, ind2, value1, value2)

Neighbor indices are computed under the standard Euclidean distance.

heappop(heap, /)

Pop the smallest item off the heap, maintaining the heap invariant.

heappush(heap, item, /)

Push item onto heap, maintaining the heap invariant.

in_bounds(pt, dim)

Checks if the candidate point actually exists in the grid.

moore_neighbors(ind, int], grid, ...], ...)

Return the Moore neighborhood of a particular cell in the grid.

no_heuristic(cur, t, grid)

no_wrap(ind, dim)

Does not wrap indices.

not_one(value)

Checks if a value is not 1.

shortest_path(grid, ...], ...[, neighbors, ...])

Find shortest path from s to t in a given grid.

sqrt(x, /)

Return the square root of x.

unit_dist(ind1, ind2, value1, value2)

Every neighbor is 1 unit distant from the other.

vn_neighbors(ind, int], grid, ...], ...[, wrap])

Return the von Neumann neighborhood of a particular cell in the grid.

wrap(ind, dim)

Wraps the cell values around. So, if you start at (0, 0) and go left you end up at (x dimension, 0) :param ind: The index to potentially modify (that is, wrap it if applicable). :param dim: Dimensions of the grid.