/** * @see GraphBuilder#createDirectedGraph() * @return type-erased directed graph */ @Deprecated public HipsterDirectedGraph buildDirectedGraph(){ return createDirectedGraph(); }
/** * @see GraphBuilder#createUndirectedGraph() * @return type-erased undirected graph */ @Deprecated public HipsterGraph buildUndirectedGraph(){ return createUndirectedGraph(); }
public static <V, E> GraphBuilder<V,E> create() { return new GraphBuilder<V, E>(); }
final GraphBuilder<Class, DataTransformer> builder = GraphBuilder.<Class, DataTransformer> create(); for(final Class<?> from : cheapest.keySet()) { for(final Class<?> to : cheapest.get(from).keySet()) { final DataTransformer transformer = cheapest.get(from).get(to); builder.connect(from).to(to).withEdge(transformer); graph = builder.createDirectedGraph();
GraphBuilder.<String,Double>create() .connect("A").to("B").withEdge(2d) .connect("A").to("C").withEdge(2d) .connect("A").to("D").withEdge(2d) .connect("B").to("E").withEdge(5d) .connect("B").to("F").withEdge(10d) .connect("B").to("G").withEdge(5d) .connect("B").to("H").withEdge(10d) .connect("C").to("I").withEdge(5d) .connect("C").to("J").withEdge(10d) .connect("C").to("K").withEdge(5d) .connect("K").to("L").withEdge(5d) .createUndirectedGraph();
GraphBuilder.<String,Double>create() .connect("A").to("B").withEdge(4d) .connect("A").to("C").withEdge(2d) .connect("B").to("C").withEdge(5d) .connect("B").to("D").withEdge(10d) .connect("C").to("E").withEdge(3d) .connect("D").to("F").withEdge(11d) .connect("E").to("D").withEdge(4d) .createDirectedGraph();
/** * @see GraphBuilder#createDirectedGraph() * @return type-erased directed graph */ @Deprecated public HipsterDirectedGraph buildDirectedGraph(){ return createDirectedGraph(); }
/** * @see GraphBuilder#createUndirectedGraph() * @return type-erased undirected graph */ @Deprecated public HipsterGraph buildUndirectedGraph(){ return createUndirectedGraph(); }
public static <V, E> GraphBuilder<V,E> create() { return new GraphBuilder<V, E>(); }