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

#include <WeightedSquareGrid8.hpp>

Inheritance diagram for grid::WeightedSquareGrid8< TCoordinate, TEdge >:
[legend]
Collaboration diagram for grid::WeightedSquareGrid8< 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

 WeightedSquareGrid8 (TCoordinate height, TCoordinate width, typename edge_type::weight_type unit=1)
 
edge_type::weight_type getUnit () const
 
void setUnit (typename edge_type::weight_type unit)
 
auto operator<=> (const WeightedSquareGrid8 &other) const
 
bool operator== (const WeightedSquareGrid8 &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
 

Protected Attributes

edge_type::weight_type m_unit
 
- 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::WeightedSquareGrid8< TCoordinate, TEdge >::coordinate_type = TCoordinate

◆ direction_type

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

◆ edge_type

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

◆ node_type

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

Constructor & Destructor Documentation

◆ WeightedSquareGrid8()

template<typename TCoordinate , typename TEdge >
grid::WeightedSquareGrid8< TCoordinate, TEdge >::WeightedSquareGrid8 ( TCoordinate  height,
TCoordinate  width,
typename edge_type::weight_type  unit = 1 
)
explicit

Member Function Documentation

◆ createEdge()

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

Implements grid::SquareGrid< TCoordinate, TEdge >.

Here is the call graph for this function:

◆ getUnit()

template<typename TCoordinate , typename TEdge >
TEdge::weight_type grid::WeightedSquareGrid8< TCoordinate, TEdge >::getUnit

◆ isValidDirection()

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

◆ name()

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

◆ operator<=>()

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

◆ operator==()

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

◆ setUnit()

template<typename TCoordinate , typename TEdge >
void grid::WeightedSquareGrid8< TCoordinate, TEdge >::setUnit ( typename edge_type::weight_type  unit)

Field Documentation

◆ m_unit

template<typename TCoordinate , typename TEdge >
edge_type::weight_type grid::WeightedSquareGrid8< TCoordinate, TEdge >::m_unit
protected

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