diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-23 00:31:12 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-12-23 00:31:12 +0100 |
| commit | 4dddac9e257433a8e2f5f763d91470a7e05ff680 (patch) | |
| tree | b6f01defc37373ceabd216146262969b6958e7ed /src/symcoord.c | |
| parent | 9d3c52efd1115e3d01869f729f274027813422c3 (diff) | |
| download | nissy-4dddac9e257433a8e2f5f763d91470a7e05ff680.tar.gz nissy-4dddac9e257433a8e2f5f763d91470a7e05ff680.zip | |
Added the possibility to compress tables to 2 bits per entry.
This is done similarly to nxopt: one base value is selected and entries
are memorized based on that base value. Values higher than base+3
are returned as base+3 (still a valid estimate) and values lower
or equal to base require a lookup on a "fallback" table, which
must give a valid estimate for the larger one (e.g. nxopt31 or khuge
can fallback to drud_sym16).
I have also added some info to the pruning table files: base value and
distribution. Unfortunately this means that everyone who has used nissy
2.0beta has to re-generate the tables.
Diffstat (limited to 'src/symcoord.c')
| -rw-r--r-- | src/symcoord.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/symcoord.c b/src/symcoord.c index 8b0eeb4..cb178b7 100644 --- a/src/symcoord.c +++ b/src/symcoord.c | |||
| @@ -166,8 +166,8 @@ antindex_nxopt31(uint64_t ind) | |||
| 166 | Cube c; | 166 | Cube c; |
| 167 | 167 | ||
| 168 | c = antindex_eofbepos_sym16(ind/(BINOM8ON4*POW3TO7)); | 168 | c = antindex_eofbepos_sym16(ind/(BINOM8ON4*POW3TO7)); |
| 169 | c.cp = coord_cpud_separate.cube((ind/POW3TO7)%BINOM8ON4).cp; | 169 | c.cp = coord_cpud_separate.cube(ind % BINOM8ON4).cp; |
| 170 | c.coud = ind % POW3TO7; | 170 | c.coud = (ind / BINOM8ON4) % POW3TO7; |
| 171 | 171 | ||
| 172 | return c; | 172 | return c; |
| 173 | } | 173 | } |
| @@ -231,9 +231,9 @@ index_nxopt31(Cube cube) | |||
| 231 | 231 | ||
| 232 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; | 232 | t = sd_eofbepos_16.transtorep[coord_eofbepos.index(cube)]; |
| 233 | c = apply_trans(t, cube); | 233 | c = apply_trans(t, cube); |
| 234 | a = (index_eofbepos_sym16(c)*BINOM8ON4) + coord_cpud_separate.index(c); | 234 | a = (index_eofbepos_sym16(c)*POW3TO7) + c.coud; |
| 235 | 235 | ||
| 236 | return a * POW3TO7 + c.coud; | 236 | return a * BINOM8ON4 + coord_cpud_separate.index(c); |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | static int | 239 | static int |
