Class MixedValenceChargeBalanceFilter
java.lang.Object
_global.tri.oxidationstates.calculator.MixedValenceChargeBalanceFilter
- All Implemented Interfaces:
matsci.util.arrays.ArrayIndexer.Filter
public class MixedValenceChargeBalanceFilter
extends Object
implements matsci.util.arrays.ArrayIndexer.Filter
Filters out all combinations of ions that aren't charge balanced, or could
not be made charge balanced by allowing one ion to have mixed valence. The
mixed-valence ion would have one oxidation state corresponding to the given
set of states and one oxidation state that is more negative.
-
Constructor Summary
ConstructorsConstructorDescriptionMixedValenceChargeBalanceFilter(IonFactory.Ion[][] allAllowedIons, double[] weights) Initializes the filter. -
Method Summary
-
Constructor Details
-
MixedValenceChargeBalanceFilter
Initializes the filter. It's important that allAllowedIons are sorted from most negative to least negative oxidation state.- Parameters:
allAllowedIons- Each element of this array is the set of all allowed ions for a particular ion type. IMPORTANT: These arrays should be sorted from most negative to least negative oxidation state.weights- The relative compositions of each ion type, in order corresponding to the order of allAllowedIons.
-
-
Method Details
-
getBranchIndex
public int getBranchIndex(int[] currentState) - Specified by:
getBranchIndexin interfacematsci.util.arrays.ArrayIndexer.Filter
-