C# Class CSMSL.Tolerance

Afficher le fichier Open project: dbaileychess/CSMSL Class Usage Examples

Méthodes publiques

Méthode Description
CalculatePrecursorMassError ( double theoreticalMass, double observedMass, int &nominalMassOffset, double &adjustedObservedMass, double difference = Constants.C13C12Difference, ToleranceUnit type = ToleranceUnit.PPM ) : Tolerance
FromDA ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
FromMMU ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
FromPPM ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
GetMaximumValue ( double mean ) : double

Gets the maximum value that is still within this tolerance

GetMinimumValue ( double mean ) : double

Gets the minimum value that is still within this tolerance

GetRange ( double mean ) : DoubleRange

Gets the range of values encompassed by this tolerance

GetTolerance ( double experimental, double theoretical, ToleranceUnit type ) : double
ToString ( ) : string
Tolerance ( ToleranceUnit unit, double value, ToleranceType type = ToleranceType.PlusAndMinus ) : System

Creates a new tolerance given a unit, value, and whether the tolerance is ±

Tolerance ( ToleranceUnit unit, double experimental, double theoretical, ToleranceType type = ToleranceType.PlusAndMinus ) : System

Creates a new tolerance given a unit, two points (one experimental and one theoretical), and whether the tolerance is ±

Tolerance ( string s ) : System

Calculates a tolerance from the string representation

i.e., "10 PPM", "-+10 PPM", "5 DA", "±10 MMU", etc...

Within ( double experimental, double theoretical ) : bool

Indicates if the two values provided are within this tolerance

Method Details

CalculatePrecursorMassError() public static méthode

public static CalculatePrecursorMassError ( double theoreticalMass, double observedMass, int &nominalMassOffset, double &adjustedObservedMass, double difference = Constants.C13C12Difference, ToleranceUnit type = ToleranceUnit.PPM ) : Tolerance
theoreticalMass double
observedMass double
nominalMassOffset int
adjustedObservedMass double
difference double
type ToleranceUnit
Résultat Tolerance

FromDA() public static méthode

public static FromDA ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
value double
toleranceType ToleranceType
Résultat Tolerance

FromMMU() public static méthode

public static FromMMU ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
value double
toleranceType ToleranceType
Résultat Tolerance

FromPPM() public static méthode

public static FromPPM ( double value, ToleranceType toleranceType = ToleranceType.PlusAndMinus ) : Tolerance
value double
toleranceType ToleranceType
Résultat Tolerance

GetMaximumValue() public méthode

Gets the maximum value that is still within this tolerance
public GetMaximumValue ( double mean ) : double
mean double
Résultat double

GetMinimumValue() public méthode

Gets the minimum value that is still within this tolerance
public GetMinimumValue ( double mean ) : double
mean double
Résultat double

GetRange() public méthode

Gets the range of values encompassed by this tolerance
public GetRange ( double mean ) : DoubleRange
mean double The mean value
Résultat DoubleRange

GetTolerance() public static méthode

public static GetTolerance ( double experimental, double theoretical, ToleranceUnit type ) : double
experimental double
theoretical double
type ToleranceUnit
Résultat double

ToString() public méthode

public ToString ( ) : string
Résultat string

Tolerance() public méthode

Creates a new tolerance given a unit, value, and whether the tolerance is ±
public Tolerance ( ToleranceUnit unit, double value, ToleranceType type = ToleranceType.PlusAndMinus ) : System
unit ToleranceUnit The units for this tolerance
value double The numerical value of the tolerance
type ToleranceType Whether the tolerance is full or half width
Résultat System

Tolerance() public méthode

Creates a new tolerance given a unit, two points (one experimental and one theoretical), and whether the tolerance is ±
public Tolerance ( ToleranceUnit unit, double experimental, double theoretical, ToleranceType type = ToleranceType.PlusAndMinus ) : System
unit ToleranceUnit The units for this tolerance
experimental double The experimental value
theoretical double The theoretical value
type ToleranceType Whether the tolerance is full or half width
Résultat System

Tolerance() public méthode

Calculates a tolerance from the string representation

i.e., "10 PPM", "-+10 PPM", "5 DA", "±10 MMU", etc...

public Tolerance ( string s ) : System
s string
Résultat System

Within() public méthode

Indicates if the two values provided are within this tolerance
public Within ( double experimental, double theoretical ) : bool
experimental double The experimental value
theoretical double The theoretical value
Résultat bool