예제 #1
0
  public void test(String problemId, String algorithmId) throws Exception {
    System.out.println("Testing algorithms:");
    System.out.println("-------------------");

    IProblemProvider provider = _providers.get(problemId);
    ProblemInfo pi = provider.getProblemInfo();
    String problemName = pi.getValueStr("name");
    System.out.println(problemName);

    testProblem(provider, pi, pi.getDataNode("Algorithms").getDataNodeById(algorithmId));
  }
예제 #2
0
  private void testProblem(IProblemProvider provider) {
    try {
      ProblemInfo pi = provider.getProblemInfo();
      String problemName = pi.getValueStr("name");
      System.out.println(problemName);

      for (DataNode alg : pi.getDataNode("Algorithms").getDataNodes()) {
        testProblem(provider, pi, alg);
        // System.out.println("\t"+alg.getValueStr("id")/*+" ("+alg.getValueStr("id")+")"*/);
      }
    } catch (Exception ex) {
      // System.err.println(problemId+": "+ex.getLocalizedMessage());
      ex.printStackTrace();
    }
  }