Examples of writeGraph()


Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

    DNVGraph graph = new DNVGraph( Settings.GRAPHS_PATH + Settings.DEFAULT_GRAPH );
    System.out.println( graph.getNodes( 0 ).size() );
    cluster( graph, 0 );
    System.out.println( graph.getNodes( 0 ).size() );
    System.out.println( graph.getNodes( 1 ).size() );
    graph.writeGraph( Settings.GRAPHS_PATH + Settings.DEFAULT_GRAPH + "_clustered.dnv" );
  }
}
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

   *             Signals that an I/O exception has occurred.
   */
  public static void main( String args[] ) throws IOException
  {
    DNVGraph graph = convert( Settings.GRAPHS_PATH + "dep.dot" );
    graph.writeGraph( Settings.GRAPHS_PATH + "dep.dot.dnv" );
  }
}
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

    List<DNVNode> nodes = generateSeries( graph, 7, nodeColor, "G" );
    DNVNode node = addNode( graph, nodeColor, "G", nodes );
    addEdge( graph, "G", nodes.get( 5 ), node );
    applyPositions( gPositions, nodes );
   
    graph.writeGraph( Settings.GRAPHS_PATH + "WiGis.dnv" );
  }

  private static Vector2D wPositions[] = {
    new Vector2D( 0, 20 ),
    new Vector2D( 5, 100 ),
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

        }
        System.out.print( "---------------------------------------------------------------------------------------\n\n" );

        tempIndex = fileNames[i].lastIndexOf( "." );
        tempFileName = fileNames[i].substring( 0, tempIndex ) + "_interp" + fileNames[i].substring( tempIndex );
        graph.writeGraph( tempFileName );
      }

      fw.close();
    }
    catch( IOException e )
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

      while( i.hasNext() )
      {
        i.next().setPosition( (float)Math.random(), (float)Math.random() );
      }

      graph.writeGraph( Settings.GRAPHS_PATH + graphs[j] );
    }
  }
}
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

          DNVEdge edge = new DNVEdge(graph);
          edge.setFrom(graph.getNode(0, eIndex.getFirst() - minIndex));
          edge.setTo(graph.getNode(0, eIndex.getSecond() - minIndex));
          graph.addEdge(0, edge);
        }
        graph.writeGraph(path + "tupos_" + filename + ".dnv");
         
       
        br.close();
        fr.close();
        System.out.println("finish converting " + filename);
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

        line = graphFileReader.readLine();
        lineIndex++;
      }

      graph.writeGraph( dnvFileName );
    }
    else
    {
      System.out.println( "WARNING: graph file has no data" );
    }
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

      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, "," );
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

      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, "," );
View Full Code Here

Examples of net.wigis.graph.dnv.DNVGraph.writeGraph()

      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." );
        DNVGraph graph = new DNVGraph( csvPath + lastFile );
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.