C# Class NetworkCommsDotNet.Tools.CommsMath

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

Méthodes publiques

Méthode 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 méthode

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

AddValue() public méthode

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
Résultat void

CalculateMean() public méthode

Return the mean of the current list.
public CalculateMean ( ) : double
Résultat double

CalculateMean() public static méthode

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
Résultat double

CalculateMean() public static méthode

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
Résultat double

CalculateMean() public méthode

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
Résultat double

CalculateStdDeviation() public méthode

Return the standard deviation of the current list.
public CalculateStdDeviation ( ) : double
Résultat double

CalculateStdDeviation() public static méthode

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
Résultat double

CalculateStdDeviation() public static méthode

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
Résultat double

CalculateStdDeviation() public méthode

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
Résultat double

ClearList() public méthode

Reset the value list
public ClearList ( ) : void
Résultat void

CommsMath() public méthode

Create a new empty instance of CommsMath
public CommsMath ( ) : System
Résultat System

CommsMath() public méthode

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

TrimList() public méthode

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
Résultat void