private static byte GetSgnfcntCornersCnt(ITruthTable truthTable) { byte sgnfcntCubeCornersCnt = 0; for (byte i = 0; i < truthTable.GetRowCount(); i++) { if (truthTable[i, truthTable.ArgCount]) { sgnfcntCubeCornersCnt++; } } return(sgnfcntCubeCornersCnt); }
public static Coverage GetNullCoverage(ITruthTable truthTable) { var cubes = new ICube[GetSgnfcntCornersCnt(truthTable)]; for (byte i = 0, cubesI = 0; i < truthTable.GetRowCount(); i++) { if (!truthTable[i, truthTable.ArgCount]) { continue; } var row = new State[truthTable.ArgCount]; for (byte j = 0; j < truthTable.ArgCount; j++) { row[j] = truthTable[i, j]; } cubes[cubesI] = new Cube(row); cubesI++; } return(new Coverage(cubes)); }