HighMap library (C++)
Loading...
Searching...
No Matches
shortest_path.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
13#pragma once
14
15#include "highmap/array.hpp"
16
17namespace hmap
18{
19
61void find_path_dijkstra(const Array &z,
62 Vec2<int> ij_start,
63 Vec2<int> ij_end,
64 std::vector<int> &i_path,
65 std::vector<int> &j_path,
66 float elevation_ratio = 0.1f,
67 float distance_exponent = 2.f,
68 float upward_penalization = 1.f,
69 const Array *p_mask_nogo = nullptr);
70
71void find_path_dijkstra(const Array &z,
72 Vec2<int> ij_start,
73 std::vector<Vec2<int>> ij_end_list,
74 std::vector<std::vector<int>> &i_path_list,
75 std::vector<std::vector<int>> &j_path_list,
76 float elevation_ratio = 0.1f,
77 float distance_exponent = 2.f,
78 float upward_penalization = 1.f,
79 const Array *p_mask_nogo = nullptr);
80
81} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Definition algebra.hpp:28
void find_path_dijkstra(const Array &z, Vec2< int > ij_start, Vec2< int > ij_end, std::vector< int > &i_path, std::vector< int > &j_path, float elevation_ratio=0.1f, float distance_exponent=2.f, float upward_penalization=1.f, const Array *p_mask_nogo=nullptr)
Finds the path with the lowest elevation and elevation difference between two points in a 2D array us...
Definition dijsktra.cpp:141