Average Operator

February 25, 2020 ยท View on GitHub

Overview

Calculate the average of numbers emitted by an Observable and emits this average.

Instances

  • AverageFloat32
  • AverageFloat64
  • AverageInt
  • AverageInt8
  • AverageInt16
  • AverageInt32
  • AverageInt64

Example

observable := rxgo.Just(1, 2, 3, 4)().AverageInt()

Output:

2

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPool

  • WithCPUPool

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Instances
  3. 3Example
  4. 4Options