C# Класс NetworkCommsDotNet.Tools.CommsMath

A class used for math operations in NetworkComms.Net. Primarily used for load analysis.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddValue ( double value ) : void

Add a new value to the internal list

AddValue ( double value, double weight ) : void

Add a new value to the internal list

CalculateMean ( ) : double

Return the mean of the current list.

CalculateMean ( List localValues ) : double

Return the mean of the provided list of values

CalculateMean ( List localValues, List weights ) : double

Return the mean of the provided list of values

CalculateMean ( int lastNValues ) : double

Return the mean of the current list.

CalculateStdDeviation ( ) : double

Return the standard deviation of the current list.

CalculateStdDeviation ( List localValues ) : double

Return the standard deviation of the provided list of values

CalculateStdDeviation ( List localValues, List weights ) : double

Return the standard deviation of the provided list of values

CalculateStdDeviation ( int lastNValues ) : double

Return the standard deviation of the current list.

ClearList ( ) : void

Reset the value list

CommsMath ( ) : System

Create a new empty instance of CommsMath

CommsMath ( List initialValues, List initialWeights ) : System

Create a new empty instance of CommsMath

TrimList ( int maxCount ) : void

Trims the list to the provided maxCount. The most recently added items are preserved.

Описание методов

AddValue() публичный Метод

Add a new value to the internal list
public AddValue ( double value ) : void
value double The value to add
Результат void

AddValue() публичный Метод

Add a new value to the internal list
public AddValue ( double value, double weight ) : void
value double The value to add
weight double The weight to apply to the provided value
Результат void

CalculateMean() публичный Метод

Return the mean of the current list.
public CalculateMean ( ) : double
Результат double

CalculateMean() публичный статический Метод

Return the mean of the provided list of values
public static CalculateMean ( List localValues ) : double
localValues List Values for which a mean should be calculated
Результат double

CalculateMean() публичный статический Метод

Return the mean of the provided list of values
public static CalculateMean ( List localValues, List weights ) : double
localValues List Values for which a mean should be calculated
weights List The weights to apply to the corresponding values
Результат double

CalculateMean() публичный Метод

Return the mean of the current list.
public CalculateMean ( int lastNValues ) : double
lastNValues int If less than the number of items in the value list returns the mean of the lastNValues
Результат double

CalculateStdDeviation() публичный Метод

Return the standard deviation of the current list.
public CalculateStdDeviation ( ) : double
Результат double

CalculateStdDeviation() публичный статический Метод

Return the standard deviation of the provided list of values
public static CalculateStdDeviation ( List localValues ) : double
localValues List Values for which a standard deviation should be calculated
Результат double

CalculateStdDeviation() публичный статический Метод

Return the standard deviation of the provided list of values
public static CalculateStdDeviation ( List localValues, List weights ) : double
localValues List Values for which a standard deviation should be calculated
weights List The weights to apply to the corresponding values
Результат double

CalculateStdDeviation() публичный Метод

Return the standard deviation of the current list.
public CalculateStdDeviation ( int lastNValues ) : double
lastNValues int If less than the number of items in the value list returns the mean of the lastNValues
Результат double

ClearList() публичный Метод

Reset the value list
public ClearList ( ) : void
Результат void

CommsMath() публичный Метод

Create a new empty instance of CommsMath
public CommsMath ( ) : System
Результат System

CommsMath() публичный Метод

Create a new empty instance of CommsMath
public CommsMath ( List initialValues, List initialWeights ) : System
initialValues List
initialWeights List
Результат System

TrimList() публичный Метод

Trims the list to the provided maxCount. The most recently added items are preserved.
public TrimList ( int maxCount ) : void
maxCount int The maximum size of the list after being trimmed
Результат void