blob: 252debfc9bbdaf255d551c8a79e435855296a142 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <stdio.h>
#include <time.h>
#define WALK_LEN 1000000
#define SAVE_TO_FILE_ON_WALK "files/in.txt"
#define PRINT_ITEM_FREQUENCY
// #define PRINT_ON_WALK
#define ITEM_CAP 3
int ITEMS = 3;
double chain[ITEM_CAP][ITEM_CAP] = {
{ 0.2, 0.6, 0.2 },
{ 0.3, 0.0, 0.7 },
{ 0.5, 0.0, 0.5 }
};
char item_names[ITEM_CAP][64] = {
"Burger",
"Pizza",
"Hotdog"
};
#include "markov.h"
int main(void)
{
srand(time(NULL));
print_chain();
take_walk();
return 0;
}
|