Class MinAllowedLikelihoodFilter

java.lang.Object
_global.tri.oxidationstates.calculator.likelihood.MinAllowedLikelihoodFilter
All Implemented Interfaces:
matsci.util.arrays.ArrayIndexer.Filter

public class MinAllowedLikelihoodFilter extends Object implements matsci.util.arrays.ArrayIndexer.Filter
This filter only allows combinations of oxidation states that have a likelihood score above a given threshold
  • Constructor Details

    • MinAllowedLikelihoodFilter

      public MinAllowedLikelihoodFilter(LikelihoodCalculator calculator, IonFactory.Ion[][] allowedIons, double minAllowedLikelihood)
      Initialize the filter
      Parameters:
      calculator - The calculator used to calculate the likelihood score
      allowedIons - Each element in this array is an array of ions of the same type with different oxidation states. For each state, the set of ions is given by ions[i] = allowedIons[i][state[i]]
      minAllowedLikelihood - This filter will screen out all combinations of ions with likelihood score below this value
  • Method Details

    • setMinAllowedLikelihood

      public void setMinAllowedLikelihood(double value)
      Set the minimum allowed likelihood score. Any set of ions with a likelihood score below this value will be screened out.
      Parameters:
      value - the minimum allowed likelihood score. Any set of ions with a likelihood score below this value will be screened out.
    • getMinAllowedLikelihood

      public double getMinAllowedLikelihood()
      Returns the minimum allowed likelihood score. Any set of ions with a likelihood score below this value will be screened out.
      Returns:
      the minimum allowed likelihood score. Any set of ions with a likelihood score below this value will be screened out.
    • getLastValidLikelihood

      public double getLastValidLikelihood()
      Returns the likelihood score of the last state to pass this filter. Note that this state may not have passed other filters.
      Returns:
      the likelihood score of the last state to pass this filter. Note that this state may not have passed other filters.
    • getLastValidFermiLevel

      public double getLastValidFermiLevel()
      Returns the optimal electronic chemical potential for the last state to pass this filter. Note that this state may not have passed other filters.
      Returns:
      the optimal electronic chemical potential for the last state to pass this filter. Note that this state may not have passed other filters.
    • getBranchIndex

      public int getBranchIndex(int[] currentState)
      Specified by:
      getBranchIndex in interface matsci.util.arrays.ArrayIndexer.Filter