commit 762d285f3b914c877887469de06a70cee9028159
parent 76cc82994c1fbb969ec61d3aede6bd42fda09005
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Thu, 12 Sep 2024 10:12:07 +0200
Fix and cleanup printing table info
Diffstat:
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/nissy.c b/src/nissy.c
@@ -217,13 +217,10 @@ nissy_datainfo(
switch (info.type) {
case TABLETYPE_PRUNING:
write("\n");
- write("Table distribution");
- if (info.base != 0)
- write(" (base value = %" PRIu8 ")", info.base);
- write(":\nValue\tPositions\n");
+ write("Table distribution:\nValue\tPositions\n");
for (i = 0; i <= info.maxvalue; i++) {
write("%" PRIu8 "\t%" PRIu64 "\n",
- i, info.distribution[i]);
+ i + info.base, info.distribution[i]);
}
break;
case TABLETYPE_SPECIAL:
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
@@ -197,8 +197,10 @@ gendata_h48h0k4(gendata_h48_arg_t *arg)
.hash = 0, /* TODO */
.entries = H48_COORDMAX(0),
.classes = 0,
+ .h48h = 0,
.bits = 4,
.base = 0,
+ .maxvalue = 0,
.next = 0,
};
@@ -364,14 +366,17 @@ gendata_h48k2(gendata_h48_arg_t *arg)
selectedbase = base[arg->h];
arg->info = (tableinfo_t) {
- .solver = "h48 solver h = , k = 4",
+ .solver = "h48 solver h = , k = 2",
.type = TABLETYPE_PRUNING,
.infosize = INFOSIZE,
.fullsize = H48_TABLESIZE(arg->h, 2) + INFOSIZE,
.hash = 0, /* TODO */
.entries = H48_COORDMAX(arg->h),
+ .classes = 0,
+ .h48h = arg->h,
.bits = 2,
.base = selectedbase,
+ .maxvalue = 3,
.next = 0,
};
arg->info.solver[15] = (arg->h % 10) + '0';