View Javadoc

    1   /*
    2    * Copyright 2003-2004 The Apache Software Foundation.
    3    *
    4    * Licensed under the Apache License, Version 2.0 (the "License");
    5    * you may not use this file except in compliance with the License.
    6    * You may obtain a copy of the License at
    7    *
    8    *      http://www.apache.org/licenses/LICENSE-2.0
    9    *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16
    17  package org.apache.commons.math.distribution;
    18
    19  /***
    20   * The Hypergeometric Distribution.
    21   *
    22   * Instances of HypergeometricDistribution objects should be created using
    23   * {@link DistributionFactory#createHypergeometricDistribution(int, int, int)}.
    24   *
    25   * <p>
    26   * References:
    27   * <ul>
    28   * <li><a href="http://mathworld.wolfram.com/HypergeometricDistribution.html">
    29   * Hypergeometric Distribution</a></li>
    30   * </ul>
    31   * </p>
    32   *
    33   * @version $Revision: 1.11 $ $Date: 2004/11/07 03:32:48 $
    34   */
    35  public interface HypergeometricDistribution extends IntegerDistribution {
    36      /***
    37       * Access the number of successes.
    38       * @return the number of successes.
    39       */
    40      public abstract int getNumberOfSuccesses();
    41
    42      /***
    43       * Access the population size.
    44       * @return the population size.
    45       */
    46      public abstract int getPopulationSize();
    47
    48      /***
    49       * Access the sample size.
    50       * @return the sample size.
    51       */
    52      public abstract int getSampleSize();
    53
    54      /***
    55       * Modify the number of successes.
    56       * @param num the new number of successes.
    57       */
    58      public abstract void setNumberOfSuccesses(int num);
    59
    60      /***
    61       * Modify the population size.
    62       * @param size the new population size.
    63       */
    64      public abstract void setPopulationSize(int size);
    65
    66      /***
    67       * Modify the sample size.
    68       * @param size the new sample size.
    69       */
    70      public abstract void setSampleSize(int size);
    71  }