C# Class NetworkCommsDotNet.Tools.CommsMath

A class used for math operations in NetworkComms.Net. Primarily used for load analysis.
Mostrar archivo Open project: MarcFletcher/NetworkComms.Net Class Usage Examples

Public Methods

Method Description
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.

Method Details

AddValue() public method

Add a new value to the internal list
public AddValue ( double value ) : void
value double The value to add
return void

AddValue() public method

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
return void

CalculateMean() public method

Return the mean of the current list.
public CalculateMean ( ) : double
return double

CalculateMean() public static method

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
return double

CalculateMean() public static method

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
return double

CalculateMean() public method

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
return double

CalculateStdDeviation() public method

Return the standard deviation of the current list.
public CalculateStdDeviation ( ) : double
return double

CalculateStdDeviation() public static method

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
return double

CalculateStdDeviation() public static method

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
return double

CalculateStdDeviation() public method

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
return double

ClearList() public method

Reset the value list
public ClearList ( ) : void
return void

CommsMath() public method

Create a new empty instance of CommsMath
public CommsMath ( ) : System
return System

CommsMath() public method

Create a new empty instance of CommsMath
public CommsMath ( List initialValues, List initialWeights ) : System
initialValues List
initialWeights List
return System

TrimList() public method

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
return void