Examples of FruchtermanReingold


Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

   */
  private static void writeGraphs( DNVGraph yearGraph, DNVGraph totalGraph )
  {
    if( yearGraph != null )
    {
      FruchtermanReingold fr = new FruchtermanReingold();
      fr.runLayout( 100, 100, yearGraph, 0.1f, 0, false, false, true );
      yearGraph.writeGraph( Settings.GRAPHS_PATH + "WC_" + yearGraph.getName() + ".dnv" );
      fr.runLayout( 100, 100, totalGraph, 0.1f, 0, false, false, true );
      totalGraph.writeGraph( Settings.GRAPHS_PATH + "WC_until_" + yearGraph.getName() + ".dnv" );
    }
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

    graph.writeGraph( Settings.GRAPHS_PATH + "MDS_classicalMDS.dnv" );

    float width = GraphFunctions.getGraphWidth( graph, 0, false );

    new RandomLayout().runLayout( graph, 0, width );
    new FruchtermanReingold().runLayout( width, width, graph, 0.01f, 0, false, false );
    graph.writeGraph( Settings.GRAPHS_PATH + "MDS_FR.dnv" );
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

      edge.setTo( toNode );
      edge.setDirectional( true );
      graph.addNode( 0, edge );
    }

    new FruchtermanReingold().runLayout( 100, 100, graph, 0.1f, 0, false, false );
    return graph;
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

        }
      }
    }
   
    graph.removeIsolatedNodes();
    new FruchtermanReingold().runLayout( 80, 80, graph, 0.1f, 0, false, false );
    graph.writeGraph( directory + outputFileName );     
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

        color.setZ( (float)Math.min( 1, color.getZ() ) );
      }
      tempNode.setColor( color );
    }
   
    new FruchtermanReingold().runLayout( 100, 100, graph, 0.01f, 0, false, false );

    System.out.println( "Graph has " + graph.getGraphSize( 0 ) + " nodes and " + graph.getEdgeMap( 0 ).size() + " edges." );

    graph.writeGraph( Settings.GRAPHS_PATH + "PADA/" + nodesFile + ".dnv" );
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

    nEdges = dnvGraph.getEdges( 0 ).size();
    nNodes = dnvGraph.getNodes( 0 ).size();
    if( runLayout )
    {
      new FruchtermanReingold().runLayout( 100, 100, dnvGraph, 0.1f, 0, false, false );
    }
    dnvGraph.writeGraph( Settings.GRAPHS_PATH + graphName + "_" + nNodes + "_" + nEdges + ".dnv" );

    // csv
    if( writeCSV )
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

        edge.setDirectional( true );
        graph.addNode( 0, edge );
      }
    }

    new FruchtermanReingold().runLayout( 100, 100, graph, 0.1f, 0, false, false );
    return graph;
  }
View Full Code Here

Examples of net.wigis.graph.dnv.layout.implementations.FruchtermanReingold

      // handle multiple filetypes here
      if( lastFile.endsWith( ".xml" ) )
      {
        Logger.write( "Format is XML, Invoking XML Parser" );
        DNVGraph graph = XMLToDNV.read( csvPath + lastFile );
        new FruchtermanReingold().runLayout( 80, 80, graph, 0.1f, 0, false, false );
        graph.writeGraph( Settings.GRAPHS_PATH + UPLOAD_FILE_PREFIX + lastFile + ".dnv" );
      }
      else if( lastFile.endsWith( ".csv" ) )
      {
        Logger.write( "Format is CSV, Invoking CSV Parser" );
        DNVGraph graph = ReadCSVtoDNVGraph.read( csvPath + lastFile, "," );
        new FruchtermanReingold().runLayout( 80, 80, graph, 0.1f, 0, false, false );
        graph.writeGraph( Settings.GRAPHS_PATH + UPLOAD_FILE_PREFIX + lastFile + ".dnv" );
      }
      else if( lastFile.endsWith( ".tup" ) )
      {
        Logger.write( "Format is simple tuples, Invoking tuple Parser" );
        DNVGraph graph = SimpleEdgeTuplesToDNVGraph.read( csvPath + lastFile, "," );
        new FruchtermanReingold().runLayout( 80, 80, graph, 0.1f, 0, false, false );
        graph.writeGraph( Settings.GRAPHS_PATH + UPLOAD_FILE_PREFIX + lastFile + ".dnv" );
      }
      else if( lastFile.endsWith( ".dnv" ) )
      {
        Logger.write( "Format is DNV. Verify the file and save it." );
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.