Package edu.uci.ics.jung.graph

Examples of edu.uci.ics.jung.graph.Graph


   * Save the current converter graph to the user's home directory

   */
  private void saveGraph() {
    GraphMLFile writer = new GraphMLFile();
    Graph g = (Graph) graph.copy();
    for (Iterator edges = g.getEdges().iterator(); edges.hasNext();) {
      Edge e = (Edge) edges.next();
      e.removeUserDatum(SERVICE_LIST);
    }

    writer.save(g, System.getProperty("user.home")
View Full Code Here


     */
    public void mousePressed(MouseEvent e) {
        Point p = e.getPoint();
        if (checkModifiers(e) || e.getModifiers() == mskbutton) {
            final VisualizationViewer vv = (VisualizationViewer)e.getSource();
            final Graph graph = vv.getGraphLayout().getGraph();
            //todo remove
            JPopupMenu jpm = new JPopupMenu();
            if (isInVV == false) {
               
                info.setVisible(false);
View Full Code Here

     */
    public void mousePressed(MouseEvent e) {
        Point p = e.getPoint();
        if (checkModifiers(e) || e.getModifiers() == mskbutton) {
            final VisualizationViewer vv = (VisualizationViewer)e.getSource();
            final Graph graph = vv.getGraphLayout().getGraph();
            Point2D ip = vv.inverseViewTransform(p);

            PickSupport picksupport = vv.getPickSupport();
            final PickedState pickedstate = vv.getPickedState();
            Vertex v = picksupport.getVertex(ip.getX(), ip.getY());
View Full Code Here

    }
  } 
 
  /** Makes a copy of the graph given to it and merges states in the pair supplied. */
  public static DirectedSparseGraph mergeAndDeterminize(Graph model, OrigStatePair pair){
    Graph original = (Graph)model.copy();
    Vertex q = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getQ().getUserDatum(JUConstants.LABEL),original);
    Vertex qDash = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getR().getUserDatum(JUConstants.LABEL),original);
   
    DirectedSparseGraph temp = merge((DirectedSparseGraph)original, new OrigStatePair(q,qDash));
    OrigStatePair mergable = findMergablePair(temp);
View Full Code Here

    }
  } 
 
  /** Makes a copy of the graph given to it and merges states in the pair supplied. */
  public static DirectedSparseGraph mergeAndDeterminize(Graph model, OrigStatePair pair){
    Graph original = (Graph)model.copy();
    Vertex q = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getQ().getUserDatum(JUConstants.LABEL),original);
    Vertex qDash = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getR().getUserDatum(JUConstants.LABEL),original);
    pair = new OrigStatePair(q,qDash);
    DirectedSparseGraph temp = merge((DirectedSparseGraph)original, pair);
    OrigStatePair mergable = findMergablePair(temp);
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

    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    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 ExperimentGraphMLHandler());
        Graph brokenGraph=graphmlFile.load(new StringReader(writer.toString().replace("VERTEX=\"BB1\"", "VERTEX=\""+Transform322.Initial+" BB1\"")));
        try
        {
          new FSMStructure(brokenGraph,Configuration.getDefaultConfiguration());
        }
        catch(IllegalArgumentException ex)
View Full Code Here

    StringWriter writer = new StringWriter();gr.transform.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 g=graphmlFile.load(new StringReader(writer.toString().replace("BB1", Transform.Initial+"_BB1")));
        try
        {
          new LearnerGraph(g,Configuration.getDefaultConfiguration());
        }
        catch(IllegalArgumentException ex)
View Full Code Here

    }
  } 
 
  /** Makes a copy of the graph given to it and merges states in the pair supplied. */
  public static DirectedSparseGraph mergeAndDeterminize(Graph model, OrigStatePair pair){
    Graph original = (Graph)model.copy();
    Vertex q = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getQ().getUserDatum(JUConstants.LABEL),original);
    Vertex qDash = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getR().getUserDatum(JUConstants.LABEL),original);
    pair = new OrigStatePair(q,qDash);
    DirectedSparseGraph temp = merge((DirectedSparseGraph)original, pair);
    OrigStatePair mergable = findMergablePair(temp);
View Full Code Here

    }
  } 
 
  /** Makes a copy of the graph given to it and merges states in the pair supplied. */
  public static DirectedSparseGraph mergeAndDeterminize(Graph model, OrigStatePair pair){
    Graph original = (Graph)model.copy();
    Vertex q = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getQ().getUserDatum(JUConstants.LABEL),original);
    Vertex qDash = DeterministicDirectedSparseGraph.findVertex(JUConstants.LABEL, pair.getR().getUserDatum(JUConstants.LABEL),original);
   
    DirectedSparseGraph temp = merge((DirectedSparseGraph)original, new OrigStatePair(q,qDash));
    OrigStatePair mergable = findMergablePair(temp);
View Full Code Here

TOP

Related Classes of edu.uci.ics.jung.graph.Graph

Copyright © 2018 www.massapicom. 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.