Examples of writeGraph()


Examples of com.tinkerpop.gremlin.structure.io.kryo.KryoWriter.writeGraph()

    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
    public void shouldReadWriteModernToKryo() throws Exception {
        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final KryoWriter writer = KryoWriter.build().custom(graphProvider.createConfiguredGremlinKryo()).create();
            writer.writeGraph(os, g);

            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName());
            graphProvider.clear(configuration);
            final Graph g1 = graphProvider.openTestGraph(configuration);
            final KryoReader reader = KryoReader.build()
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.kryo.KryoWriter.writeGraph()

    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
    public void shouldReadWriteCrewToKryo() throws Exception {
        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final KryoWriter writer = KryoWriter.build().custom(graphProvider.createConfiguredGremlinKryo()).create();
            writer.writeGraph(os, g);

            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName());
            graphProvider.clear(configuration);
            final Graph g1 = graphProvider.openTestGraph(configuration);
            final KryoReader reader = KryoReader.build()
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.kryo.KryoWriter.writeGraph()

    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
    public void shouldReadWriteClassicToKryo() throws Exception {
        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final KryoWriter writer = KryoWriter.build().custom(graphProvider.createConfiguredGremlinKryo()).create();
            writer.writeGraph(os, g);

            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName());
            graphProvider.clear(configuration);
            final Graph g1 = graphProvider.openTestGraph(configuration);
            final KryoReader reader = KryoReader.build()
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.kryo.KryoWriter.writeGraph()

    private Text deflateTinkerVertex() {
        try {
            final ByteArrayOutputStream bos = new ByteArrayOutputStream();
            final KryoWriter writer = KryoWriter.build().create();
            writer.writeGraph(bos, this.tinkerVertex.graph());
            bos.flush();
            bos.close();
            return new Text(bos.toByteArray());
        } catch (final IOException e) {
            throw new IllegalStateException(e.getMessage(), e);
View Full Code Here

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

    if( firstSpaceIndex == -1 )
      firstSpaceIndex = searchQuery.length();
    String fileName = searchQuery.substring( 0, firstSpaceIndex ) + " " + now();
    String selectedFile = OUTPUT_FILE_PATH + CITESEER_SEARCH_PREFIX + fileName + OUTPUT_FILE_EXTENSION;
    // this.searchResults = null;
    g.writeGraph( selectedFile );
    FacesContext fc = FacesContext.getCurrentInstance();
    PaintBean pb = PaintBean.getCurrentInstance();
    GraphsBean gb = (GraphsBean)ContextLookup.lookup( "graphsBean", fc );
    if( gb != null )
      gb.buildFileList();
View Full Code Here

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

   
    public static void main(String[] args){
      BarabasiAlbertGenerator bsg = new BarabasiAlbertGenerator(500,10);
      bsg.evolveGraph(500);
      DNVGraph graph = bsg.create();
      graph.writeGraph("/Users/scarlettteng/dev/bs1000_5000graph.dnv");
    }
}
View Full Code Here

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

    // input = readMatrix( directory, file );
    // double [][] weights = generateRandomInput( numberOfNodes );
    int n = input[0].length; // number of data objects
    double[][] output = MDSJ.stressMinimization( input ); // apply MDS
    DNVGraph graph = generateGraph( input, n, output );
    graph.writeGraph( Settings.GRAPHS_PATH + "MDS_stressMinimization.dnv" );

    output = MDSJ.classicalScaling( input ); // apply MDS
    graph = generateGraph( input, n, output );
    graph.writeGraph( Settings.GRAPHS_PATH + "MDS_classicalMDS.dnv" );
View Full Code Here

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

    DNVGraph graph = generateGraph( input, n, output );
    graph.writeGraph( Settings.GRAPHS_PATH + "MDS_stressMinimization.dnv" );

    output = MDSJ.classicalScaling( input ); // apply MDS
    graph = generateGraph( input, n, output );
    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 );
View Full Code Here

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

    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" );
  }

  /**
   * Read matrix.
   *
 
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.csv" );
    graph.writeGraph( Settings.GRAPHS_PATH + "dep.dnv" );
  }
}
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.