Package edu.uci.ics.jung.io

Examples of edu.uci.ics.jung.io.GraphMLFile.load()


    String wholePath = graphDir.getAbsolutePath()+System.getProperty("file.separator");
    GraphMLFile graphmlFile = new GraphMLFile();
    graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
    DirectedSparseGraph dg = new DirectedSparseGraph();
    dg.getEdgeConstraints().clear();
    dg = (DirectedSparseGraph)graphmlFile.load(wholePath+args[1]);
    GraphMLVisualiser gmlVis = new GraphMLVisualiser();
    gmlVis.construct(dg);
  }

}
View Full Code Here


    //config.setQuestionGenerator(QuestionGeneratorKind.SYMMETRIC);
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        graph = new LearnerGraph(graphmlFile.load(
            //"resources/pcodaExperiments/5StatesCrowded/5Inputs_15_13.xml"
            "resources/pcodaExperiments/25StatesCrowded/25Inputs_75_12.xml"
            ),config);
    }
   
View Full Code Here

    long tmStarted = new Date().getTime(),tmFinished = 0;;
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        graph = new LearnerGraph(graphmlFile.load(
            //"../../W_experiment/experiment_4300.xml"
            //"../W_experiment/3000/N_3000_1.xml"
            "resources/LargeGraphs/experiment_1000.xml"
            ),config);
    }
View Full Code Here

      FSMStructure graph = null;
      synchronized (computeStateScores.syncObj)
      {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
          GraphMLFile graphmlFile = new GraphMLFile();
          graphmlFile.setGraphMLFileHandler(new statechum.analysis.learning.experiments.ExperimentGraphMLHandler());
          graph = new FSMStructure(graphmlFile.load(from),cnf);
        from.close();
      }
      return graph;
    }
View Full Code Here

      {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
          GraphMLFile graphmlFile = new GraphMLFile();
          graphmlFile.setGraphMLFileHandler(new statechum.analysis.learning.experiments.ExperimentGraphMLHandler());
          String fileToLoad = fileName;
          if (!new java.io.File(fileToLoad).canRead()) fileToLoad+=".xml";
          FSMStructure graph = new FSMStructure(graphmlFile.load(fileToLoad),config);
          return graph;
      }
    }

    public String findVertex(String string) {
View Full Code Here

    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        try
        {
          new LearnerGraph(graphmlFile.load(new StringReader(writer.toString().replace("ACCEPTED=\"false\"", "ACCEPTED=\"aa\""))),Configuration.getDefaultConfiguration());
        }
        catch(FatalException ex)
        {
          Assert.assertTrue(ex.getCause() instanceof IllegalUserDataException);
        }
View Full Code Here

        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
       
        try
        {
          new LearnerGraph(graphmlFile.load(new StringReader(writer.toString().replace("COLOUR=\"red\"", "COLOUR=\"aa\""))),Configuration.getDefaultConfiguration());
        }
        catch(FatalException ex)
        {
          Assert.assertTrue(ex.getCause() instanceof IllegalUserDataException);
        }
View Full Code Here

    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        Graph brokenGraph=graphmlFile.load(new StringReader(writer.toString().replace("VERTEX=\"BB1\"", "VERTEX=\""+Transform322.Initial+" BB1\"")));
        try
        {
          new LearnerGraph(brokenGraph,Configuration.getDefaultConfiguration());
        }
        catch(IllegalArgumentException ex)
View Full Code Here

      String wholePath = graphDir.getAbsolutePath()+System.getProperty("file.separator");
      GraphMLFile graphmlFile = new GraphMLFile();
      graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
      DirectedSparseGraph dg = new DirectedSparseGraph();
      dg.getEdgeConstraints().clear();
      dg = (DirectedSparseGraph)graphmlFile.load(wholePath+args[1]);
      int size = dg.getEdges().size()*4;
    RandomPathGenerator rpg = new RandomPathGenerator(dg, new Random(1),size, 5);
    Collection<List<String>> fullSet = rpg.getAllPaths();
    final FSMStructure expected = getGraphData(dg);
   
View Full Code Here

    LearnerGraph graph = null;
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        graph = new LearnerGraph(graphmlFile.load(from),cnf);
      from.close();
    }
    return graph;
  }
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.