C# Class QACExperimenter.Utilities

Afficher le fichier Open project: stewhir/recent-robust-qac

Méthodes publiques

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

public static CountInstancesOfCharacters ( string inString, char character ) : int
inString string
character char
Résultat int

DateTimeToUnixTimestamp() public static méthode

public static DateTimeToUnixTimestamp ( System.DateTime dateTime ) : int
dateTime System.DateTime
Résultat int

GetPrefix() public static méthode

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

SigmoidFunction() public static méthode

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