Java源码示例:org.apache.flink.graph.spargel.ScatterFunction

示例1
/**
 * 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);
}
 
示例2
/**
 * 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);
}
 
示例3
/**
 * 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);
}
 
示例4
/**
 * Runs a ScatterGather iteration on the graph.
 * No configuration options are provided.
 *
 * @param scatterFunction the scatter function
 * @param gatherFunction the gather function
 * @param maximumNumberOfIterations maximum number of iterations to perform
 *
 * @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) {

	return this.runScatterGatherIteration(scatterFunction, gatherFunction,
			maximumNumberOfIterations, null);
}
 
示例5
/**
 * Runs a ScatterGather iteration on the graph.
 * No configuration options are provided.
 *
 * @param scatterFunction the scatter function
 * @param gatherFunction the gather function
 * @param maximumNumberOfIterations maximum number of iterations to perform
 *
 * @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) {

	return this.runScatterGatherIteration(scatterFunction, gatherFunction,
			maximumNumberOfIterations, null);
}
 
示例6
/**
 * Runs a ScatterGather iteration on the graph.
 * No configuration options are provided.
 *
 * @param scatterFunction the scatter function
 * @param gatherFunction the gather function
 * @param maximumNumberOfIterations maximum number of iterations to perform
 *
 * @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) {

	return this.runScatterGatherIteration(scatterFunction, gatherFunction,
			maximumNumberOfIterations, null);
}