introduce bitloops

This commit is contained in:
mike
2026-01-20 07:08:31 +01:00
parent 47ead135d3
commit a764f45041
83 changed files with 205106 additions and 175 deletions

View File

@@ -4,6 +4,7 @@ import module java.base;
import com.google.gson.Gson;
import lombok.val;
import puzzle.SwedishGenerator.Lemma;
import static puzzle.SwedishGenerator.THRESS;
public class Meta {
static final Gson GSON = new Gson();
@@ -42,8 +43,9 @@ public class Meta {
return new ShardLem(Lemma.from("XXX"), -1, new String[0]);
}
}
static final Path[] SHARDS = IntStream.range(0, 10).mapToObj(sId -> Path.of("src/main/generated-sources/puzzle").resolve(sId + ".idx")).toArray(
Path[]::new);
static final Path[] SHARDS = IntStream.range(0, 10).mapToObj(sId -> Path.of("src/main/generated-sources/puzzle" + (THRESS == 0 ? "" : "/dict" + THRESS)).resolve(sId + ".idx"))
.toArray(
Path[]::new);
static Path shardKey(long word) {
return SHARDS[Lemma.unpackSize(word) + 1];
}