17template<
typename TCoordinate,
typename TEdge>
29 typename edge_type::weight_type
m_unit;
34 explicit WeightedSquareGrid4(TCoordinate height, TCoordinate width,
typename edge_type::weight_type unit = 1);
37 typename edge_type::weight_type
getUnit()
const;
39 void setUnit(
typename edge_type::weight_type unit);
71 std::string
name()
const override;
79template<
typename TCoordinate,
typename TEdge>
84template<
typename TCoordinate,
typename TEdge>
86 if (unit > 0) m_unit = unit;
91template<
typename TCoordinate,
typename TEdge>
94 typename TEdge::weight_type unit)
95 :
SquareGrid<TCoordinate, TEdge>(height, width), m_unit(unit) {
100template<
typename TCoordinate,
typename TEdge>
103 return TEdge(a, b, m_unit);
108template<
typename TCoordinate,
typename TEdge>
115 default:
return false;
121template<
typename TCoordinate,
typename TEdge>
123 return "SqaureGrid4Weighted";
140template<
typename TCoordinate,
typename TEdge>
150 grid.addObstacle(std::move(obstacle));
Class extending the pair class from the standard library. Original reason is to allow printing of the...
Definition: pair.hpp:43
static ext::pair< DefaultCoordinateType, DefaultCoordinateType > normalizeObstacle(ext::pair< TCoordinate, TCoordinate > &&obstacle)
Definition: Normalize.hpp:82
TCoordinate coordinate_type
Definition: GridInterface.hpp:23
TEdge edge_type
Definition: GridInterface.hpp:24
Definition: SquareGrid.hpp:29
TCoordinate getHeight() const
Definition: SquareGrid.hpp:155
TCoordinate getWidth() const
Definition: SquareGrid.hpp:160
TCoordinate m_height
Definition: SquareGrid.hpp:41
TCoordinate m_width
Definition: SquareGrid.hpp:42
ext::set< node_type > m_obstacles
Definition: SquareGrid.hpp:43
const ext::set< node_type > & getObstacleList() const &
Definition: SquareGrid.hpp:142
Definition: WeightedSquareGrid4.hpp:18
edge_type::weight_type getUnit() const
Definition: WeightedSquareGrid4.hpp:80
bool isValidDirection(direction_type direction) const override
Definition: WeightedSquareGrid4.hpp:109
SquareGridDirections direction_type
Definition: WeightedSquareGrid4.hpp:25
TEdge createEdge(const node_type &a, const node_type &b) const override
Definition: WeightedSquareGrid4.hpp:101
WeightedSquareGrid4(TCoordinate height, TCoordinate width, typename edge_type::weight_type unit=1)
Definition: WeightedSquareGrid4.hpp:92
void setUnit(typename edge_type::weight_type unit)
Definition: WeightedSquareGrid4.hpp:85
auto operator<=>(const WeightedSquareGrid4 &other) const
Definition: WeightedSquareGrid4.hpp:46
edge_type::weight_type m_unit
Definition: WeightedSquareGrid4.hpp:29
std::string name() const override
Definition: WeightedSquareGrid4.hpp:122
bool operator==(const WeightedSquareGrid4 &other) const
Definition: WeightedSquareGrid4.hpp:50
ext::pair< TCoordinate, TCoordinate > node_type
Definition: WeightedSquareGrid4.hpp:24
int i
Definition: AllEpsilonClosure.h:118
Definition: normalize.hpp:10
constexpr tuple< Elements &... > tie(Elements &... args) noexcept
Helper of extended tuple of references construction. The tuple is constructed to reffer to values in ...
Definition: tuple.hpp:218
reference_mover< T > make_mover(T ¶m)
Move adaptor construction function specialized to lvalue reference parameter.
Definition: iterator.hpp:468
Definition: GridDirection.hpp:12
SquareGridDirections
Definition: GridDirection.hpp:16
static grid::WeightedSquareGrid4 eval(grid::WeightedSquareGrid4< TCoordinate, TEdge > &&value)
Definition: WeightedSquareGrid4.hpp:142
Definition: normalize.hpp:13