Examples of solution()


Examples of com.db4o.diagnostic.DiagnosticBase.solution()

          return;
        if(arg0 instanceof ClassHasNoFields)
          return; // Ignore
        if(arg0 instanceof DiagnosticBase) {
          DiagnosticBase d = (DiagnosticBase) arg0;
          Logger.debug(this, "Diagnostic: "+d.getClass()+" : "+d.problem()+" : "+d.solution()+" : "+d.reason(), new Exception("debug"));
        } else
          Logger.debug(this, "Diagnostic: "+arg0+" : "+arg0.getClass(), new Exception("debug"));
      }
  }
  /**
 
View Full Code Here

Examples of cs.min2phase.Search.solution()

        String sol;
        if ((testValue & 0x10) != 0) {
            System.out.println("========== Selected Scramble Solving Test (Optimal Solver) ==========");
            System.out.print("IdCube Test: \"");
            String scr = Tools.fromScramble(new int[0]);
            System.out.print(search.solution(scr, 21, 100000, 0, Search.OPTIMAL_SOLUTION));
            System.out.println("\"");

            int n_test = 0;
            long curTime;
            for (int length = 1; length < 5; length++) {
View Full Code Here

Examples of cs.min2phase.Search.solution()

            }

            System.out.println("========== Selected Scramble Solving Test (Two-phase Solver) ==========");
            System.out.print("IdCube Test: \"");
            scr = Tools.fromScramble(new int[0]);
            System.out.print(search.solution(scr, 21, 100000, 0, Search.OPTIMAL_SOLUTION));
            System.out.println("\"");

            for (int length = 1; length < 5; length++) {
                System.out.print(String.format("%d-Move: ", length));
                curTime = System.nanoTime();
View Full Code Here

Examples of cs.min2phase.Search.solution()

                System.out.println(String.format("OK, %d Cube(s) Solved Optimally. AvgTime: %1.3f ms.", n_test, (System.nanoTime() - curTime) / 1000000d / n_test));
            }

            System.out.print("SuperFlip: ");
            curTime = System.nanoTime();
            sol = search.solution(Tools.superFlip(), 20, 100000, 0, 0);
            while (sol.length() > 60 || sol.startsWith("Error")) {
                if (sol.startsWith("Error") && !sol.startsWith("Error 8")) {
                    throw new RuntimeException(String.format("Cannot find the optimal solution: %s", sol));
                }
                sol = search.next(100000, 0, 0);
View Full Code Here

Examples of cs.min2phase.Search.solution()

                "U2 R2 D2 B  U2 B' F  D' B' R' D  U2 B2 F2 R' D' B  U' F' R2"
            };
            n_test = 10;
            curTime = System.nanoTime();
            for (int i = 0; i < depth20.length; i++) {
                sol = search.solution(Tools.fromScramble(depth20[0]), 20, 100000, 0, 0);
            }
            System.out.println(String.format("OK, Random %d Cube(s) Solved. AvgTime: %1.3f ms.", n_test, (System.nanoTime() - curTime) / 1000000d / n_test));
        }

        if ((testValue & 0x20) != 0) {
View Full Code Here

Examples of cs.min2phase.Search.solution()

            Tools.setRandomSource(new Random(42L));
            int totalLength = 0;
            while (System.nanoTime() - tm < 60000000000L && x < nSolves) {
                long curTime = System.nanoTime();
                String cube = Tools.randomCube();
                String s = search.solution(cube, maxLength, probeMax, probeMin, verbose);
                if (s.length() > 63) {
                    s = search.next(probeMax, 0, verbose);
                }
                curTime = System.nanoTime() - curTime;
                totalTime += curTime;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.