Interface Reduction
public interface Reduction
An atomic reduction of one or more variables (argMinMax).
-
Method Summary
Modifier and TypeMethodDescription<T> ReductionandUpdate(PgxVertex vertex, VertexProperty<T> property, T value) If the reduction in the Reduction applies, also update the property the property specified here.<T1,T2> Reduction andUpdate(T1 lhs, T2 rhs) If the reduction in the Reduction applies, also update the variable specified here.static <T> ReductionupdateMaxValue(PgxVertex vertex, VertexProperty<T> property, T value) Create an atomic reduction of a vertex property.static <T1,T2> Reduction updateMaxValue(T1 lhs, T2 rhs) Create an atomic reduction of a variable.static <T> ReductionupdateMinValue(PgxVertex vertex, VertexProperty<T> property, T value) Create an atomic reduction of a vertex property.static <T1,T2> Reduction updateMinValue(T1 lhs, T2 rhs) Create an atomic reduction of a variable.
-
Method Details
-
updateMinValue
Create an atomic reduction of a vertex property. If the given value is less than the current value of the node property, then update the node property to the given value.- Type Parameters:
T-- Parameters:
vertex-property-value-- Returns:
-
updateMinValue
Create an atomic reduction of a variable. If the value on the rhs is less than the value on the lhs, then update the value on the lhs.- Type Parameters:
T1-T2-- Parameters:
lhs-rhs-- Returns:
-
updateMaxValue
Create an atomic reduction of a vertex property. If the given value is greater than the current value of the node property, then update the node property to the given value.- Type Parameters:
T-- Parameters:
vertex-property-value-- Returns:
-
updateMaxValue
Create an atomic reduction of a variable. If the value on the rhs is greater than the value on the lhs, then update the value on the lhs.- Type Parameters:
T1-T2-- Parameters:
lhs-rhs-- Returns:
-
andUpdate
If the reduction in the Reduction applies, also update the property the property specified here.- Type Parameters:
T-- Parameters:
vertex-property-value-- Returns:
-
andUpdate
If the reduction in the Reduction applies, also update the variable specified here.- Type Parameters:
T1-T2-- Parameters:
lhs-rhs-- Returns:
-