/** * run Sequential. * * @param S polynomial list. * @param action what to to. */ @SuppressWarnings("unchecked") static void runSequential(PolynomialList S, String action, boolean plusextra) { List<GenSolvablePolynomial> L = S.list; List<GenSolvablePolynomial> G = null; long t; SolvableReduction sred = new SolvableReductionSeq(); SolvableGroebnerBase sbb = null; if (plusextra) { // sbb = new SolvableGroebnerBaseSeqPlusextra(); // System.out.println("SolvableGroebnerBaseSeqPlusextra not implemented using // SolvableGroebnerBaseSeq"); sbb = new SolvableGroebnerBaseSeq(sred); } else { sbb = new SolvableGroebnerBaseSeq(); } t = System.currentTimeMillis(); System.out.println("\nSolvable GB [" + action + "] sequential ..."); if (action.equals("irr")) { G = sred.leftIrreducibleSet(L); } if (action.equals("left")) { G = sbb.leftGB(L); } if (action.equals("right")) { G = sbb.rightGB(L); } if (action.equals("two")) { G = sbb.twosidedGB(L); } if (G == null) { System.out.println("unknown action = " + action + "\n"); return; } S = new PolynomialList(S.ring, G); System.out.println("G =\n" + S); System.out.println("G.size() = " + G.size()); t = System.currentTimeMillis() - t; if (plusextra) { System.out.print("seq+, "); } else { System.out.print("seq, "); } System.out.println("time = " + t + " milliseconds"); checkGB(S); System.out.println(""); }