Exemple #1
0
  /** Load all the data. */
  public static void init(Resolver loader, String file) {
    if (initialized) return;

    inclGraph = new SimpleDirectedGraph<GraphClass, Inclusion>(Inclusion.class);
    problems = new Vector<Problem>();
    load(loader, file, inclGraph, problems);

    // Sort problems
    Collections.sort(
        problems,
        new Comparator<Problem>() {
          public int compare(Problem o1, Problem o2) {
            return o1.getName().compareTo(o2.getName());
          }
        });

    // Gather the classnames
    names = new TreeMap<String, GraphClass>(new LessLatex());
    for (GraphClass gclass : inclGraph.vertexSet()) names.put(gclass.toString(), gclass);

    // Gather the SCCs
    sccs = GAlg.calcSCCMap(inclGraph);

    initialized = true;
  }
Exemple #2
0
 /** Returns the nodes of the available graphclasses ordered alphabetically. */
 public static Collection<GraphClass> getClasses() {
   return Collections.unmodifiableCollection(names.values());
 }
Exemple #3
0
 /** Returns the names of the available graphclasses ordered alphabetically. */
 public static Set<String> getClassNames() {
   return Collections.unmodifiableSet(names.keySet());
 }