Table of Contents

Class Median

Namespace
Pamoja.Kit
Assembly
Pamoja.Kit.dll

Rejects a single wild reading, where an average would let it pull the answer.

public sealed class Median : IDisposable
Inheritance
Median
Implements
Inherited Members

Constructors

Median()

Creates an empty median filter.

public Median()

Exceptions

PamojaException

The native filter could not be created.

Properties

Value

The current median, or null before the first reading.

public float? Value { get; }

Property Value

float?

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Update(float)

Folds a reading in and returns the median of the window.

public float Update(float reading)

Parameters

reading float

The reading to add.

Returns

float

The median across the window.