aboutsummaryrefslogtreecommitdiff
path: root/src/fst.c
blob: 91c022aa45642eceac39b720297bd13cac1f9c48 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#define FST_C

#include "fst.h"

static void             fst_to_ep(FstCube fst, int *ep);

FstCube
cube_to_fst(Cube *cube)
{
	Cube c;
	FstCube ret;

	copy_cube(cube, &c);
	ret.uf_eofb    = index_eofb(&c);
	ret.uf_eposepe = index_eposepe(&c);
	ret.uf_coud    = index_coud(&c);
	ret.uf_cp      = index_cp(&c);
	copy_cube(cube, &c);
	transform_cube(fr, &c);
	ret.fr_eofb    = index_eofb(&c);
	ret.fr_eposepe = index_eposepe(&c);
	ret.fr_coud    = index_coud(&c);
	transform_cube(rd, &c);
	ret.rd_eofb    = index_eofb(&c);
	ret.rd_eposepe = index_eposepe(&c);
	ret.rd_coud    = index_coud(&c);

	return ret;
}

FstCube
fst_inverse(FstCube fst)
{
	/* TODO */
}

FstCube
fst_move(Move m, FstCube fst)
{
	/* TODO */
}

void
fst_to_cube(FstCube fst, Cube *cube)
{
	invindex_eofb((uint64_t)fst.uf_eofb, cube);
	fst_to_ep(fst, cube->ep);
	invindex_coud((uint64_t)fst.uf_coud, cube);
	invindex_cp((uint64_t)fst.uf_cp, cube);
}

static void
fst_to_ep(FstCube fst, int *ep)
{
	/* TODO */
}

#endif

Generated with cgit - Back to sebastiano.tronto.net