Package org.neo4j.graphalgo.beta.pregel
Class PregelContext<CONFIG extends PregelConfig>
- java.lang.Object
-
- org.neo4j.graphalgo.beta.pregel.PregelContext<CONFIG>
-
- Direct Known Subclasses:
PregelContext.ComputeContext
,PregelContext.InitContext
public abstract class PregelContext<CONFIG extends PregelConfig> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PregelContext.ComputeContext<CONFIG extends PregelConfig>
A context that is used during the computation.static class
PregelContext.InitContext<CONFIG extends PregelConfig>
A context that is used during the initialization phase, which is before the first superstep is being executed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CONFIG
config()
Allows access to the user-defined Pregel configuration.int
degree()
Returns the degree (number of relationships) of the currently processed node.long
nodeCount()
Number of nodes in the input graph.long
nodeId()
The identifier of the node that is currently processed.long
relationshipCount()
Number of relationships in the input graph.void
setNodeValue(java.lang.String key, double value)
Sets a node double value for given the node schema key.void
setNodeValue(java.lang.String key, double[] value)
Sets a node long value for given the node schema key.void
setNodeValue(java.lang.String key, long value)
Sets a node long value for given the node schema key.void
setNodeValue(java.lang.String key, long[] value)
Sets a node long value for given the node schema key.
-
-
-
Method Detail
-
nodeId
public long nodeId()
The identifier of the node that is currently processed.
-
config
public CONFIG config()
Allows access to the user-defined Pregel configuration.
-
setNodeValue
public void setNodeValue(java.lang.String key, double value)
Sets a node double value for given the node schema key.- Parameters:
key
- node schema keyvalue
- property value
-
setNodeValue
public void setNodeValue(java.lang.String key, long value)
Sets a node long value for given the node schema key.- Parameters:
key
- node schema keyvalue
- property value
-
setNodeValue
public void setNodeValue(java.lang.String key, long[] value)
Sets a node long value for given the node schema key.- Parameters:
key
- node schema keyvalue
- property value
-
setNodeValue
public void setNodeValue(java.lang.String key, double[] value)
Sets a node long value for given the node schema key.- Parameters:
key
- node schema keyvalue
- property value
-
nodeCount
public long nodeCount()
Number of nodes in the input graph.
-
relationshipCount
public long relationshipCount()
Number of relationships in the input graph.
-
degree
public int degree()
Returns the degree (number of relationships) of the currently processed node.
-
-