Class FrequencyCalculator
java.lang.Object
_global.tri.oxidationstates.calculator.OxidationStateCalculator
_global.tri.oxidationstates.calculator.frequency.FrequencyCalculator
Calculates the frequency score for possible sets of oxidation states
-
Constructor Summary
ConstructorsConstructorDescriptionInitialize the frequency score calculator, generating frequencies per ion from the user-provided data -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the frequency for a particular ion, where all frequencies for an ion type sum to 1.doublegetFrequencyScore(IonFactory.Ion[] ions) Calculates the frequency for a set of ions by multiplying the frequencies for all ionsin the setgetLikelyOxidationStates(String[] ionTypeIDs, double[] weights) Calculate the most likely oxidation states for the given ion types with the given composition.Methods inherited from class _global.tri.oxidationstates.calculator.OxidationStateCalculator
getLikelyOxidationStates, getLikelyOxidationStates, getLikelyOxidationStates
-
Constructor Details
-
FrequencyCalculator
Initialize the frequency score calculator, generating frequencies per ion from the user-provided data- Parameters:
data- The frequency of each ion will be determined based on the number of entries in this data set that contain the ion.
-
-
Method Details
-
getLikelyOxidationStates
Description copied from class:OxidationStateCalculatorCalculate the most likely oxidation states for the given ion types with the given composition.- Specified by:
getLikelyOxidationStatesin classOxidationStateCalculator- Parameters:
ionTypeIDs- The IDS of the ion types.weights- The composition of each ion type, ordered in the way that corresponds to the ordering of ionTypeIDs.- Returns:
- the most likely oxidation states for the given ion types with the given composition.
-
getFrequency
Returns the frequency for a particular ion, where all frequencies for an ion type sum to 1.- Parameters:
ion- The ion for which we want the frequency- Returns:
- The frequency for the ion, where all frequencies for an ion type sum to 1.
-
getFrequencyScore
Calculates the frequency for a set of ions by multiplying the frequencies for all ionsin the set- Parameters:
ions- The set of ions for which we want the frequency- Returns:
- The frequency score for the set of ions
-