Object - streams : StdDev

The aggregator object to calculate standard deviation.

Methods

Fields

  • mean float 0.0
  • description

  • stdDeviation float 0.0
  • description

  • sumValue float 0.0
  • description

  • count int 0
  • description

process

(anydata value, EventType eventType)

returns anydata

Updates the current standard deviation as the new values come into the aggregation.

Parameters

  • value anydata
  • Value being added or removed from aggregation in order to calculate the new standard deviation.

  • eventType EventType
  • Type of the incoming event streams:CURRENT, streams:EXPIRED or streams:RESET.

  • Return Type

    (anydata)
  • Updated standard deviation.

copy

()

returns Aggregator

Returns a copy of the StdDev aggregator.

  • Return Type

    (Aggregator)
  • A Aggregator object which represents StdDev aggregator.

saveState

()

returns map

Return current state to be saved as a map of any typed values.

  • Return Type

    (map)
  • A map of any typed values.

restoreState

Restores the saved state which is passed as a map of any typed values.

Parameters

  • state map
  • A map of typed any values. This map contains the values to be restored from the persisted data.