@Override public AverageClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input) throws Exception { super.run(input); DataSet<LocalClusteringCoefficient.Result<K>> localClusteringCoefficient = input .run(new LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficientHelper = new AverageClusteringCoefficientHelper<>(); localClusteringCoefficient .output(averageClusteringCoefficientHelper) .name("Average clustering coefficient"); return this; }
.run(new org.apache.flink.graph.library.clustering.undirected.LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); return undirectedResult;
@Override public AverageClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input) throws Exception { super.run(input); DataSet<LocalClusteringCoefficient.Result<K>> localClusteringCoefficient = input .run(new LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficientHelper = new AverageClusteringCoefficientHelper<>(); localClusteringCoefficient .output(averageClusteringCoefficientHelper) .name("Average clustering coefficient"); return this; }
@Override public AverageClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input) throws Exception { super.run(input); DataSet<LocalClusteringCoefficient.Result<K>> localClusteringCoefficient = input .run(new LocalClusteringCoefficient<K, VV, EV>() .setLittleParallelism(littleParallelism)); averageClusteringCoefficientHelper = new AverageClusteringCoefficientHelper<>(); localClusteringCoefficient .output(averageClusteringCoefficientHelper) .name("Average clustering coefficient"); return this; }
@Override public AverageClusteringCoefficient<K, VV, EV> run(Graph<K, VV, EV> input) throws Exception { super.run(input); DataSet<LocalClusteringCoefficient.Result<K>> localClusteringCoefficient = input .run(new LocalClusteringCoefficient<K, VV, EV>() .setParallelism(parallelism)); averageClusteringCoefficientHelper = new AverageClusteringCoefficientHelper<>(); localClusteringCoefficient .output(averageClusteringCoefficientHelper) .name("Average clustering coefficient"); return this; }
/** * {@inheritDoc} * * Calls Flink Gelly algorithms to compute the local clustering coefficients for an undirected * graph. */ @Override protected LogicalGraph executeInternal(Graph<GradoopId, NullValue, NullValue> gellyGraph) throws Exception { DataSet<Vertex> resultVertices = new org.apache.flink.graph.library.clustering.undirected .LocalClusteringCoefficient<GradoopId, NullValue, NullValue>().run(gellyGraph) .map(new LocalUndirectedCCResultToTupleMap()) .join(currentGraph.getVertices()) .where(0).equalTo(new Id<>()) .with(new LocalCCResultTupleToVertexJoin()); return currentGraph.getConfig().getLogicalGraphFactory().fromDataSets( currentGraph.getGraphHead(), resultVertices, currentGraph.getEdges()); }
/** * {@inheritDoc} * * Calls Flink Gelly algorithms to compute the local clustering coefficients for an undirected * graph. */ @Override protected LogicalGraph executeInternal(Graph<GradoopId, NullValue, NullValue> gellyGraph) throws Exception { DataSet<Vertex> resultVertices = new org.apache.flink.graph.library.clustering.undirected .LocalClusteringCoefficient<GradoopId, NullValue, NullValue>().run(gellyGraph) .map(new LocalUndirectedCCResultToTupleMap()) .join(currentGraph.getVertices()) .where(0).equalTo(new Id<>()) .with(new LocalCCResultTupleToVertexJoin()); return currentGraph.getConfig().getLogicalGraphFactory().fromDataSets( currentGraph.getGraphHead(), resultVertices, currentGraph.getEdges()); } }