Add fixed values and visualize input in console

This commit is contained in:
Lukas | AstroGD 2024-06-10 18:03:19 +02:00
parent bf46b3b454
commit 11d807f289
Signed by: AstroGD
GPG Key ID: 82A5E6C236C535AA

View File

@ -1,8 +1,55 @@
import generateRules, { getLength } from "./src/rules";
import fs from "fs";
import { v } from "./src/util";
import { visualizeValues } from "./src/visualizeValues";
const constValues: number[] = [];
const constValues: number[] = [
v(2, 1, 8),
v(4, 1, 9),
v(6, 1, 7),
v(7, 1, 3),
v(2, 2, 3),
v(3, 2, 9),
v(5, 2, 6),
v(7, 2, 2),
v(8, 2, 8),
v(2, 3, 5),
v(3, 3, 7),
v(8, 3, 9),
v(1, 4, 5),
v(2, 4, 1),
v(3, 4, 6),
v(5, 4, 2),
v(9, 4, 8),
v(2, 5, 4),
v(4, 5, 7),
v(5, 5, 8),
v(6, 5, 1),
v(8, 5, 6),
v(9, 5, 2),
v(1, 6, 2),
v(2, 6, 7),
v(3, 6, 8),
v(5, 6, 4),
v(6, 6, 6),
v(7, 6, 9),
v(2, 7, 9),
v(3, 7, 4),
v(6, 7, 3),
v(7, 7, 6),
v(1, 8, 3),
v(3, 8, 5),
v(4, 8, 6),
v(5, 8, 9),
v(8, 8, 7),
v(9, 8, 1),
v(9, 9, 9),
];
console.log("Input values:");
visualizeValues(constValues);
console.log("\nRule generation:");
const rules = generateRules(constValues);
const output = fs.createWriteStream("output.cnf");