Class OxidationStateSet
java.lang.Object
_global.tri.oxidationstates.calculator.OxidationStateSet
- Direct Known Subclasses:
LikelihoodStateSet
Contains a set of oxidation states assigned to ion types (i.e. a set of ions)
-
Constructor Summary
ConstructorsConstructorDescriptionOxidationStateSet(IonFactory.Ion[] ions, double[] weights) Create an OxidationStateSet from the given ions and weightsOxidationStateSet(Composition composition) Initialize the OxidationStateSet from a given composition containing the ions and weights -
Method Summary
Modifier and TypeMethodDescriptiongetIons()Returns the set of ionsdoublegetWeight(IonFactory.Ion ion) Return the amount for the given iondouble[]Returns the amounts of each of the ions, in the same order as the array returned by getIons()booleanReturns true if the same ion type has more than one oxidation state in this set, false otherwise.toString()
-
Constructor Details
-
OxidationStateSet
Initialize the OxidationStateSet from a given composition containing the ions and weights- Parameters:
composition- The given composition
-
OxidationStateSet
Create an OxidationStateSet from the given ions and weights- Parameters:
ions- The given ionsweights- The amount of each of those ions, in the same order as the ions array.
-
-
Method Details
-
getIons
Returns the set of ions- Returns:
- the set of ions
-
getWeights
public double[] getWeights()Returns the amounts of each of the ions, in the same order as the array returned by getIons()- Returns:
- the amounts of each of the ions, in the same order as the array
returned by
getIons()
-
getWeight
Return the amount for the given ion- Parameters:
ion- THe given ion- Returns:
- the amount for the given ion
-
isMixedValence
public boolean isMixedValence()Returns true if the same ion type has more than one oxidation state in this set, false otherwise.- Returns:
- true if the same ion type has more than one oxidation state in this set, false otherwise.
-
toString
-