Improve Templates name and readme

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
2024-06-21 21:28:11 +02:00
parent 9a3c3cdd04
commit f10202da96
3 changed files with 83 additions and 69 deletions
+15 -1
View File
@@ -1,6 +1,6 @@
# astar
Fast and easy to use header only 2D astar algorithm library in C++20.
Fast and easy to use standalone header only 2D astar algorithm library in C++20.
I made it for learning how the astar algorithm works, try to make the fastest, tested and configurable as possible for my needs (future games and works).
@@ -24,6 +24,20 @@ It is an [astar algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm), t
* [x] Debug mode in template argument and lambda function
* [x] Support direct access and not access to the map
* [x] Unit tests and benchmarks
* [ ] Working CI (WIP)
### Heuristic function
You can set the heuristic function to calculate the distance between two points and return the cost.
| Heuristic | C++ Function | Description |
|-----------|--------------|-------------|
| euclidean | AStar::Heuristic::euclidean | Default |
| manhattan | AStar::Heuristic::manhattan | |
| octagonal | AStar::Heuristic::octagonal | |
| chebyshev | AStar::Heuristic::chebyshev | |
| euclideanNoSQR | AStar::Heuristic::euclideanNoSQR | |
| dijkstra | AStar::Heuristic::dijkstra | Always return 0 |
# How to use it