/** * Opens and outputs the plaintext values of this tableau for debugging. * * @param builder a builder to provide the open and print functionality * @param ps a PrintStream on which to print the debugging information */ public void debugInfo(ProtocolBuilderNumeric builder, PrintStream ps) { builder.debug().openAndPrint("C: ", C, ps); builder.debug().openAndPrint("B: ", B, ps); builder.debug().openAndPrint("F: ", F, ps); builder.debug().openAndPrint("z: ", z, ps); } }
/** * Prints the current state of the LPSolver to System.out. NOTE: This information is useful for * debugging, but should not be revealed in production environments. */ private void printState(ProtocolBuilderNumeric builder, LpState state) { PrintStream stream = System.out; int iterations = state.iteration; builder.debug().openAndPrint("Basis [" + iterations + "]: ", state.basis, stream); builder.debug().openAndPrint("Update Matrix [" + iterations + "]: ", updateMatrix, stream); builder.debug().openAndPrint("Pivot [" + iterations + "]: ", state.prevPivot, stream); }
/** * Prints out the initial state of the LPSolver to System.out. NOTE: This information is useful * for debugging, but should not be reveal in production environments. */ private void printInitialState(ProtocolBuilderNumeric builder, LpState state) { PrintStream stream = System.out; int iterations = state.iteration; builder.debug().marker("Initial Tableau [" + iterations + "]: ", stream); state.tableau.debugInfo(builder, stream); builder.debug().openAndPrint("Basis [" + iterations + "]: ", state.basis, stream); builder.debug().openAndPrint("Update Matrix [" + iterations + "]: ", updateMatrix, stream); builder.debug().openAndPrint("Pivot [" + iterations + "]: ", state.prevPivot, stream); }
seq.debug().marker(sb.toString(), stream); return null; });
return () -> toPrint; }).seq((seq, inputs) -> { seq.debug().openAndPrint("testNumber", inputs.get(0), stream); seq.debug().openAndPrint("testVector", inputs, stream); ArrayList<DRes<SInt>> r1 = new ArrayList<>(); r1.add(inputs.get(0)); m.add(r2); Matrix<DRes<SInt>> matrix = new Matrix<>(2, 2, m); seq.debug().openAndPrint("testMatrix", matrix, stream); return null; });
if (phaseOneResult == 0) { if (isDebug()) { inner.debug() .openAndPrint("Entering Variable [" + state.iteration + "]: ", phaseOneOutput.getFirst(), System.out);