org.apache.flink.graph.asm.result.PrintableResult Java Examples
The following examples show how to use
org.apache.flink.graph.asm.result.PrintableResult.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TriangleListing.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.directed.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return directedResult; case UNDIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.undirected.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }
Example #2
Source File: ClusteringCoefficient.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return directedResult; case UNDIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }
Example #3
Source File: TriangleListing.java From flink with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.directed.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return directedResult; case UNDIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.undirected.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }
Example #4
Source File: ClusteringCoefficient.java From flink with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return directedResult; case UNDIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }
Example #5
Source File: TriangleListing.java From flink with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.directed.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return directedResult; case UNDIRECTED: if (computeTriadicCensus.getValue()) { triadicCensus = graph .run(new org.apache.flink.graph.library.clustering.undirected.TriadicCensus<K, VV, EV>() .setParallelism(parallelism)); } @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.TriangleListing<K, VV, EV>() .setPermuteResults(permuteResults.getValue()) .setSortTriangleVertices(sortTriangleVertices.getValue()) .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }
Example #6
Source File: ClusteringCoefficient.java From flink with Apache License 2.0 | 5 votes |
@Override public DataSet plan(Graph<K, VV, EV> graph) throws Exception { int parallelism = this.parallelism.getValue().intValue(); switch (order.getValue()) { case DIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.directed.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> directedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.directed.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return directedResult; case UNDIRECTED: globalClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.GlobalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficient = graph .run(new org.apache.flink.graph.library.clustering.undirected.AverageClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); @SuppressWarnings("unchecked") DataSet<PrintableResult> undirectedResult = (DataSet<PrintableResult>) (DataSet<?>) graph .run(new org.apache.flink.graph.library.clustering.undirected.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return undirectedResult; default: throw new RuntimeException("Unknown order: " + order); } }