aboutsummaryrefslogtreecommitdiff
path: root/src/fst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fst.c')
-rw-r--r--src/fst.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/fst.c b/src/fst.c
new file mode 100644
index 0000000..91c022a
--- /dev/null
+++ b/src/fst.c
@@ -0,0 +1,58 @@
1#define FST_C
2
3#include "fst.h"
4
5static void fst_to_ep(FstCube fst, int *ep);
6
7FstCube
8cube_to_fst(Cube *cube)
9{
10 Cube c;
11 FstCube ret;
12
13 copy_cube(cube, &c);
14 ret.uf_eofb = index_eofb(&c);
15 ret.uf_eposepe = index_eposepe(&c);
16 ret.uf_coud = index_coud(&c);
17 ret.uf_cp = index_cp(&c);
18 copy_cube(cube, &c);
19 transform_cube(fr, &c);
20 ret.fr_eofb = index_eofb(&c);
21 ret.fr_eposepe = index_eposepe(&c);
22 ret.fr_coud = index_coud(&c);
23 transform_cube(rd, &c);
24 ret.rd_eofb = index_eofb(&c);
25 ret.rd_eposepe = index_eposepe(&c);
26 ret.rd_coud = index_coud(&c);
27
28 return ret;
29}
30
31FstCube
32fst_inverse(FstCube fst)
33{
34 /* TODO */
35}
36
37FstCube
38fst_move(Move m, FstCube fst)
39{
40 /* TODO */
41}
42
43void
44fst_to_cube(FstCube fst, Cube *cube)
45{
46 invindex_eofb((uint64_t)fst.uf_eofb, cube);
47 fst_to_ep(fst, cube->ep);
48 invindex_coud((uint64_t)fst.uf_coud, cube);
49 invindex_cp((uint64_t)fst.uf_cp, cube);
50}
51
52static void
53fst_to_ep(FstCube fst, int *ep)
54{
55 /* TODO */
56}
57
58#endif

Generated with cgit - Back to sebastiano.tronto.net