public interface ReduceComputation<M extends Value> extends Computation<M>
| Modifier and Type | Method and Description |
|---|---|
default void |
compute(ComputationContext context,
Vertex vertex,
Iterator<M> messages)
Compute the specified vertex with messages.
|
default void |
compute0(ComputationContext context,
Vertex vertex)
Compute with initial message.
|
M |
computeMessage(ComputationContext context,
Vertex vertex,
M message)
Compute the vertex with combined message, or null if no message received.
|
M |
initialValue(ComputationContext context,
Vertex vertex)
Set vertex's value and return initial message.
|
default void |
sendMessage(ComputationContext context,
Vertex vertex,
M result)
Send result to adjacent vertices of a specified vertex.
|
default void |
updateState(Vertex vertex)
Set vertex's state after computation, set inactive by default.
|
afterSuperstep, beforeSuperstep, category, close, init, nameM initialValue(ComputationContext context, Vertex vertex)
default void compute0(ComputationContext context, Vertex vertex)
compute0 in interface Computation<M extends Value>default void compute(ComputationContext context, Vertex vertex, Iterator<M> messages)
compute in interface Computation<M extends Value>M computeMessage(ComputationContext context, Vertex vertex, M message)
message - Combined message, or null if no message receiveddefault void sendMessage(ComputationContext context, Vertex vertex, M result)
default void updateState(Vertex vertex)
Copyright © 2020–2022. All rights reserved.