Package com.intel.hadoop.graphbuilder.graph.simplegraph

Examples of com.intel.hadoop.graphbuilder.graph.simplegraph.SimpleGraph.addEdges()


    List<Integer> sources = Arrays.asList(1, 2, 3, 4, 5);
    List<Integer> targets = Arrays.asList(5, 4, 3, 2, 1);
    List<String> edata = Arrays.asList("a", "b", "c", "d", "e");

    assertEquals(mygraph.numEdges(), 0);
    mygraph.addEdges(sources, targets, edata);
    assertEquals(mygraph.numEdges(), sources.size());

    SimpleJsonFormatter formatter = new SimpleJsonFormatter();
    String s = formatter.structWriter(mygraph).toString();
    String expected = "{\"source\":1,\"targets\":[5]}\n"
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.