C# Class QACExperimenter.Utilities

Show file Open project: stewhir/recent-robust-qac

Public Methods

Method Description
CountInstancesOfCharacters ( string inString, char character ) : int
DateTimeToUnixTimestamp ( System.DateTime dateTime ) : int
GetPrefix ( string query, int prefixLength ) : string

Extract the prefix from a query, returns the prefix of length prefixLength, or null if the query is not long enough to extract a prefix from

SigmoidFunction ( double x, double max, double k, double n ) : double

Implements a sigmoid function with the parameters: y = max · k n / (k n + x n) (Returns Y value). See: http://numberlinx.org/Sigmoid%20Curves.html for visual parameter tuning examples.

Method Details

CountInstancesOfCharacters() public static method

public static CountInstancesOfCharacters ( string inString, char character ) : int
inString string
character char
return int

DateTimeToUnixTimestamp() public static method

public static DateTimeToUnixTimestamp ( System.DateTime dateTime ) : int
dateTime System.DateTime
return int

GetPrefix() public static method

Extract the prefix from a query, returns the prefix of length prefixLength, or null if the query is not long enough to extract a prefix from
public static GetPrefix ( string query, int prefixLength ) : string
query string
prefixLength int
return string

SigmoidFunction() public static method

Implements a sigmoid function with the parameters: y = max · k n / (k n + x n) (Returns Y value). See: http://numberlinx.org/Sigmoid%20Curves.html for visual parameter tuning examples.
public static SigmoidFunction ( double x, double max, double k, double n ) : double
x double X value
max double Maximum value
k double Half-maximum
n double Steepness
return double