System.Beacon.TMeanCalculator

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

  TMeanCalculator<T> = record
  private
    FSize: Integer;
    FCenter: Integer;
    FIsEmpty: Boolean;
    ArrayRatio: array of T;
    Index: Integer;
    IsFull: Boolean;
    procedure SetSize(ASize: Integer);
    procedure AddValue(AValue: T);
  public
    constructor Create(const ASize: Integer);
    procedure Reset;
    function GetAsDouble: Double;
    function GetAsInteger: Integer;
    function GetMedianAsDouble: Double;
    function GetMedianAsInteger: Integer;
    function GetLast: T;
    function Get: T;
    function AddGetValue(AValue: T; IsMoving: Boolean): T;
    function IsEmpty: Boolean;
  end;

C++

template<typename T> struct DECLSPEC_DRECORD TMeanCalculator__1

Properties

Type Visibility Source Unit Parent
record
struct
public
System.Beacon.pas
System.Beacon.hpp
System.Beacon System.Beacon

Description

Record that provides methods that you can use to get stabilized values for Rssi. TMeanCalculator is a template record that accepts an Integer or a Double as T.

The available methods allow you to create or reset an array of T, calculate mean or median values from the current values in the array of T or check if the array of T is empty.

See Also