diff options
| author | 2026-11-10 06:37:40 +0000 | |
|---|---|---|
| committer | 2026-11-10 06:37:40 +0000 | |
| commit | 7ac9c048bb7c00d614230997df520b9319f0a030 (patch) | |
| tree | 74e016451f0c344508f621b12ebc6ea6d96ca25d /src/common.h | |
| download | lab-06-7ac9c048bb7c00d614230997df520b9319f0a030.tar.gz | |
Diffstat (limited to 'src/common.h')
| -rw-r--r-- | src/common.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h new file mode 100644 index 0000000..7a186ba --- /dev/null +++ b/src/common.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #ifndef INCLUDED_COMMON_H | ||
| 2 | #define INCLUDED_COMMON_H | ||
| 3 | |||
| 4 | extern struct path { | ||
| 5 | u8 *items; | ||
| 6 | u32 count; | ||
| 7 | u32 capacity; | ||
| 8 | } path; | ||
| 9 | |||
| 10 | extern struct crdf { | ||
| 11 | struct crdf_entry { | ||
| 12 | f32 c; | ||
| 13 | u32 j; | ||
| 14 | } *items; | ||
| 15 | u32 count; | ||
| 16 | u32 capacity; | ||
| 17 | } crdf; | ||
| 18 | |||
| 19 | f32 build_crdf (u8 i); | ||
| 20 | f32 measure_path (void); | ||
| 21 | void added_j (u8 j); | ||
| 22 | void export_path (u8 path[NODE_COUNT], int generation); | ||
| 23 | bool finished (void); | ||
| 24 | |||
| 25 | extern f32 (*pheromones_current)[NODE_COUNT]; | ||
| 26 | |||
| 27 | #endif // INCLUDED_COMMON_H | ||
