Package net.wigis.graph.dnv

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


          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

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

      graph.writeGraph( dnvFileName );
    }
    else
    {
      System.out.println( "WARNING: graph file has no data" );
    }
View Full Code 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, "," );
View Full Code Here

      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

      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

      }
      else if( lastFile.endsWith( ".dnv" ) )
      {
        Logger.write( "Format is DNV. Verify the file and save it." );
        DNVGraph graph = new DNVGraph( csvPath + lastFile );
        graph.writeGraph( Settings.GRAPHS_PATH + lastFile );
      }
      else
      {
        Logger.write( "File must be one of the accepted formats: XML CSV or TUP.  \n\n" );
        throw new Exception();
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.