mirror of
https://github.com/mfocko/blog.git
synced 2024-12-24 21:31:30 +01:00
algorithms(bf-to-astar): fix small typos
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
7f6671999d
commit
701e18ea36
1 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ auto bf(const graph& g, const vertex_t& source, const vertex_t& destination)
|
|||
:::info Relaxation
|
||||
|
||||
I have made a brief mention of the relaxation in the comment in the code. You've
|
||||
been probably thought that **relaxation of an edge** means that you found
|
||||
been probably taught that **relaxation of an edge** means that you found
|
||||
a better solution to the problem.
|
||||
|
||||
In general it is an approximation technique that _reduces_ the problem of
|
||||
|
@ -129,9 +129,9 @@ Cost: 22
|
|||
If you have a better look at the map, you will realize that the cost `22` is the
|
||||
one path skipping the `*` cells, since they cost more than going around.
|
||||
|
||||
We can play around a bit with it. The `*` cells can be even vortices that pull
|
||||
We can play around a bit with it. The `*` cells can even be vortices that pull
|
||||
you in with a negative price and let you _propel_ yourself out :wink: Let's
|
||||
change their cost to `-1` then. Let's check what's the fastest path to the cell.
|
||||
change their cost to `-1` then and see what's the fastest path to our goal.
|
||||
|
||||
```
|
||||
Normal cost: 1
|
||||
|
|
Loading…
Reference in a new issue