Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Types | Public Member Functions | Protected Member Functions
grid::SquareGrid4< TCoordinate, TEdge > Class Template Reference

#include <SquareGrid4.hpp>

Inheritance diagram for grid::SquareGrid4< TCoordinate, TEdge >:
[legend]
Collaboration diagram for grid::SquareGrid4< TCoordinate, TEdge >:
[legend]

Public Types

using coordinate_type = TCoordinate
 
using edge_type = TEdge
 
using node_type = ext::pair< TCoordinate, TCoordinate >
 
using direction_type = SquareGridDirections
 
- Public Types inherited from grid::SquareGrid< TCoordinate, TEdge >
using coordinate_type = TCoordinate
 
using edge_type = TEdge
 
using node_type = ext::pair< TCoordinate, TCoordinate >
 
using direction_type = SquareGridDirections
 
- Public Types inherited from grid::GridInterface< TCoordinate, TEdge >
using coordinate_type = TCoordinate
 
using edge_type = TEdge
 
using node_type = ext::pair< TCoordinate, TCoordinate >
 

Public Member Functions

 SquareGrid4 (TCoordinate height, TCoordinate width)
 
auto operator<=> (const SquareGrid4 &other) const
 
bool operator== (const SquareGrid4 &other) const
 
bool isValidDirection (direction_type direction) const override
 
std::string name () const override
 
- Public Member Functions inherited from grid::SquareGrid< TCoordinate, TEdge >
 SquareGrid (TCoordinate height, TCoordinate width)
 
const ext::set< node_type > & getObstacleList () const &
 
ext::set< node_type > && getObstacleList () &&
 
void operator>> (ext::ostream &ostream) const override
 
TCoordinate getHeight () const
 
TCoordinate getWidth () const
 
virtual void resize (TCoordinate height, TCoordinate width)
 
virtual void addObstacle (const node_type &n)
 
virtual void addObstacle (node_type &&n)
 
virtual void addObstacle (TCoordinate &&x, TCoordinate &&y)
 
virtual ext::pair< bool, node_typestep (const node_type &n, direction_type direction) const
 
virtual ext::pair< bool, TEdge > stepEdge (const node_type &n, direction_type direction) const
 
virtual bool isObstacle (const node_type &n) const
 
virtual bool isNode (const node_type &n) const
 
virtual std::string toStringAs (const ext::map< node_type, char > &map) const
 
size_t nodeCount () const override
 
size_t edgeCount () const override
 
ext::set< node_typegetNodes () const override
 
ext::vector< TEdge > getEdges () const override
 
ext::set< node_typesuccessors (const node_type &n) const override
 
ext::vector< TEdge > successorEdges (const node_type &n) const override
 
ext::set< node_typepredecessors (const node_type &n) const override
 
ext::vector< TEdge > predecessorEdges (const node_type &n) const override
 
- Public Member Functions inherited from grid::GridBase
virtual ~GridBase () noexcept=default
 

Protected Member Functions

TEdge createEdge (const node_type &a, const node_type &b) const override
 
- Protected Member Functions inherited from grid::SquareGrid< TCoordinate, TEdge >
virtual bool checkCoordinates (const node_type &coordinate) const
 
virtual void throwCoordinates (const node_type &coordinate) const
 

Additional Inherited Members

- Protected Attributes inherited from grid::SquareGrid< TCoordinate, TEdge >
TCoordinate m_height
 
TCoordinate m_width
 
ext::set< node_typem_obstacles
 

Member Typedef Documentation

◆ coordinate_type

template<typename TCoordinate , typename TEdge >
using grid::SquareGrid4< TCoordinate, TEdge >::coordinate_type = TCoordinate

◆ direction_type

template<typename TCoordinate , typename TEdge >
using grid::SquareGrid4< TCoordinate, TEdge >::direction_type = SquareGridDirections

◆ edge_type

template<typename TCoordinate , typename TEdge >
using grid::SquareGrid4< TCoordinate, TEdge >::edge_type = TEdge

◆ node_type

template<typename TCoordinate , typename TEdge >
using grid::SquareGrid4< TCoordinate, TEdge >::node_type = ext::pair<TCoordinate, TCoordinate>

Constructor & Destructor Documentation

◆ SquareGrid4()

template<typename TCoordinate , typename TEdge >
grid::SquareGrid4< TCoordinate, TEdge >::SquareGrid4 ( TCoordinate  height,
TCoordinate  width 
)
explicit

Member Function Documentation

◆ createEdge()

template<typename TCoordinate , typename TEdge >
TEdge grid::SquareGrid4< TCoordinate, TEdge >::createEdge ( const node_type a,
const node_type b 
) const
overrideprotectedvirtual

◆ isValidDirection()

template<typename TCoordinate , typename TEdge >
bool grid::SquareGrid4< TCoordinate, TEdge >::isValidDirection ( SquareGrid4< TCoordinate, TEdge >::direction_type  direction) const
overridevirtual

◆ name()

template<typename TCoordinate , typename TEdge >
std::string grid::SquareGrid4< TCoordinate, TEdge >::name
overridevirtual

◆ operator<=>()

template<typename TCoordinate , typename TEdge >
auto grid::SquareGrid4< TCoordinate, TEdge >::operator<=> ( const SquareGrid4< TCoordinate, TEdge > &  other) const
inline
Here is the call graph for this function:

◆ operator==()

template<typename TCoordinate , typename TEdge >
bool grid::SquareGrid4< TCoordinate, TEdge >::operator== ( const SquareGrid4< TCoordinate, TEdge > &  other) const
inline
Here is the call graph for this function:

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