Class IntHypergeometric

    • Constructor Detail

      • IntHypergeometric

        public IntHypergeometric()
      • IntHypergeometric

        public IntHypergeometric​(int populationSize,
                                 int numberOfSuccesses,
                                 int sampleSize)
    • Method Detail

      • setDistribution

        protected void setDistribution​(org.apache.commons.math3.distribution.IntegerDistribution distribution)
        Description copied from class: IntDistribution
        Sets the discrete distribution to use.
        Overrides:
        setDistribution in class IntDistribution
      • getPopulationSize

        public int getPopulationSize()
      • setPopulationSize

        public void setPopulationSize​(int populationSize)
                               throws org.apache.commons.math3.exception.NotStrictlyPositiveException
        The total population size.
        Parameters:
        populationSize - The value for the population size.
        Throws:
        org.apache.commons.math3.exception.NotStrictlyPositiveException - If the supplied value was <=0.
      • getNumberOfSuccesses

        public int getNumberOfSuccesses()
      • setNumberOfSuccesses

        public void setNumberOfSuccesses​(int numberOfSuccesses)
                                  throws org.apache.commons.math3.exception.NumberIsTooLargeException
        The number of possible successes in the population.
        Parameters:
        numberOfSuccesses - The number of successes.
        Throws:
        org.apache.commons.math3.exception.NumberIsTooLargeException - If the supplied value is larger than populationSize.
      • getSampleSize

        public int getSampleSize()
      • setSampleSize

        public void setSampleSize​(int sampleSize)
                           throws org.apache.commons.math3.exception.NumberIsTooLargeException
        The number of samples taken.
        Parameters:
        sampleSize - The number of trials conducted.
        Throws:
        org.apache.commons.math3.exception.NumberIsTooLargeException - If the supplied value is larger than populationSize.