TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IMapNeighbors< T > Class Template Referenceabstract

Abstract interface for neighbor queries in map-like data structures. More...

#include <IMap.h>

Inheritance diagram for IMapNeighbors< T >:
Inheritance graph
[legend]

Public Member Functions

virtual std::vector< Coordinate< T > > getNeighbors (Coordinate< T > from) const =0
 Get world coordinates of neighboring cells (for pathfinding or navigation).
 
virtual bool isValid (const Coordinate< T > &coord) const =0
 Check if a coordinate is inside the map bounds.
 

Detailed Description

template<typename T = DistanceM>
class tinyrobotics::IMapNeighbors< T >

Abstract interface for neighbor queries in map-like data structures.

Provides a minimal interface for pathfinding and navigation algorithms to query neighboring coordinates and check coordinate validity. Any map or graph class that supports neighbor queries can implement this interface, enabling use with generic planning algorithms (e.g., A*, Dijkstra).

Template Parameters
TScalar type for coordinates and math (default: DistanceM)

Required Methods

Member Function Documentation

◆ getNeighbors()

virtual std::vector< Coordinate< T > > getNeighbors ( Coordinate< T >  from) const
pure virtual

Get world coordinates of neighboring cells (for pathfinding or navigation).

Parameters
fromThe cell coordinate to find neighbors for.
Returns
Vector of neighboring coordinates.

Implemented in GridBitMap< T >, GridMap< StateT, T >, CallbackMap< T >, and PointCloud< T >.

◆ isValid()

virtual bool isValid ( const Coordinate< T > &  coord) const
pure virtual

Check if a coordinate is inside the map bounds.

Parameters
coordThe coordinate to check.
Returns
True if valid, false otherwise.

Implemented in GridBitMap< T >, GridMap< StateT, T >, CallbackMap< T >, and PointCloud< T >.


The documentation for this class was generated from the following file: