Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SampledDataGenerator<T>

A sampled data generator. Samples given data with specific frequency.

Type parameters

  • T

    Data type for the data that the generator samples.

    To create a new instance of sampled data generator use createSampledDataGenerator factory.

Hierarchy

Index

Constructors

constructor

Methods

generate

  • Generate new instance of DataHost with unique data. Data is added to the DataHost asynchronously.

    Returns DataHost<SampledPoint<T>>

    A new DataHost.

setInputData

  • Returns a new Data generator with new the new array of data as sampling target.

    Parameters

    • inputData: T[]

      Array of data to sample.

    Returns SampledDataGenerator<T>

setSamplingFrequency

  • Returns a new Data generator with the new sampling frequency.

    Parameters

    • samplingFrequency: number

      Set the frequency that the data is sampled from the input array.

    Returns SampledDataGenerator<T>

setStep

  • Returns a new Data generator with the new step.

    Parameters

    • step: number

      A constant step between samplings.

    Returns SampledDataGenerator<T>