当前位置: 首页>>代码示例>>Java>>正文


Java ScatterFunction类代码示例

本文整理汇总了Java中org.apache.flink.graph.spargel.ScatterFunction的典型用法代码示例。如果您正苦于以下问题:Java ScatterFunction类的具体用法?Java ScatterFunction怎么用?Java ScatterFunction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ScatterFunction类属于org.apache.flink.graph.spargel包,在下文中一共展示了ScatterFunction类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runScatterGatherIteration

import org.apache.flink.graph.spargel.ScatterFunction; //导入依赖的package包/类
/**
 * Runs a ScatterGather iteration on the graph with configuration options.
 *
 * @param scatterFunction the scatter function
 * @param gatherFunction the gather function
 * @param maximumNumberOfIterations maximum number of iterations to perform
 * @param parameters the iteration configuration parameters
 *
 * @return the updated Graph after the scatter-gather iteration has converged or
 * after maximumNumberOfIterations.
 */
public <M> Graph<K, VV, EV> runScatterGatherIteration(
		ScatterFunction<K, VV, M, EV> scatterFunction,
		org.apache.flink.graph.spargel.GatherFunction<K, VV, M> gatherFunction,
		int maximumNumberOfIterations, ScatterGatherConfiguration parameters) {

	ScatterGatherIteration<K, VV, M, EV> iteration = ScatterGatherIteration.withEdges(
			edges, scatterFunction, gatherFunction, maximumNumberOfIterations);

	iteration.configure(parameters);

	DataSet<Vertex<K, VV>> newVertices = this.getVertices().runOperation(iteration);

	return new Graph<>(newVertices, this.edges, this.context);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:26,代码来源:Graph.java


注:本文中的org.apache.flink.graph.spargel.ScatterFunction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。