Files
puzzle-generator/src/main/generated-sources/puzzle/DictDataL6.java
2026-01-17 16:17:18 +01:00

47 lines
1.2 KiB
Java

package puzzle;
public final class DictDataL6 {
private DictDataL6() {}
static final int LEN = 6;
static final int ROWS = 156;
static final int COLS = 125;
static final int WORDS_LEN = 8000;
static final int POS_LEN = 19500;
private static long[] words() {
return DictDataL6W0.DATA;
}
private static long[] posFlat() {
long[] out = new long[POS_LEN];
int k = 0;
k = copy(out, k, DictDataL6P0.DATA);
k = copy(out, k, DictDataL6P1.DATA);
k = copy(out, k, DictDataL6P2.DATA);
return out;
}
public static SwedishGenerator.DictEntry entry() {
long[] wds = words();
long[] flat = posFlat();
long[][] pos = reshape(flat, ROWS, COLS);
return new SwedishGenerator.DictEntry(wds, pos, wds.length, (wds.length + 63) >>> 6);
}
private static int copy(long[] dst, int at, long[] src) {
System.arraycopy(src, 0, dst, at, src.length);
return at + src.length;
}
private static long[][] reshape(long[] flat, int rows, int cols) {
long[][] out = new long[rows][cols];
int k = 0;
for (int r = 0; r < rows; r++) {
System.arraycopy(flat, k, out[r], 0, cols);
k += cols;
}
return out;
}
}