File: example-graphs_astar_example.md

package info (click to toggle)
mrpt 1%3A2.5.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,448 kB
  • sloc: cpp: 551,662; ansic: 38,702; xml: 3,914; python: 2,547; sh: 404; makefile: 237
file content (18 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
\page graphs_astar_example Example: graphs_astar_example

Demo for the A* generic solver:

Example console output:

```
Input an integer number to solve a problem, or "e" to end.
761
An optimal solution has been found:
	2 coins of 2 piastres.
	0 coins of 7 piastres.
	2 coins of 8 piastres.
	39 coins of 19 piastres.
```

C++ example source code:
\include graphs_astar_example/test.cpp