src.canns.task¶
Submodules¶
Attributes¶
Classes¶
Package Contents¶
- class src.canns.task.GeodesicDistanceResult[source]¶
- accessible_indices: numpy.ndarray¶
- cost_grid: MovementCostGrid¶
- distances: numpy.ndarray¶
- class src.canns.task.MovementCostGrid[source]¶
- get_cell_index(pos)[source]¶
Get the geodesic index of the grid cell containing the given position.
This method is JAX-compatible and can be used inside jitted functions.
- Parameters:
pos (collections.abc.Sequence[float]) – (x, y) coordinates of the position.
- Returns:
Index of the grid cell in the accessible_indices array, or -1 if the position is out of bounds or in an impassable cell.
- Return type:
Note
Returns -1 (instead of None) for JAX compatibility. The caller should check for negative values to detect invalid positions.
- accessible_indices: numpy.ndarray | None = None¶
- property accessible_mask: numpy.ndarray¶
- costs: numpy.ndarray¶
- property x_centers: numpy.ndarray¶
- x_edges: numpy.ndarray¶
- property y_centers: numpy.ndarray¶
- y_edges: numpy.ndarray¶