Interface Reducer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double emptyValue()
      The empty value is used when a node did not receive any messages.
      double identity()
      The identity element is used as the initial value.
      boolean isEmptyValue​(double value)
      Checks if the given value is the empty value.
      double reduce​(double current, double message)
      Computes a new value based on the current value and the message.
    • Method Detail

      • identity

        double identity()
        The identity element is used as the initial value.
      • reduce

        double reduce​(double current,
                      double message)
        Computes a new value based on the current value and the message.
      • emptyValue

        double emptyValue()
        The empty value is used when a node did not receive any messages.
      • isEmptyValue

        boolean isEmptyValue​(double value)
        Checks if the given value is the empty value.