test_class.declarator: hypergeometric = new Hypergeometric()
test_class.modifier: private static final
test_class.original_string: private static final Hypergeometric hypergeometric = new Hypergeometric();
test_class.type: Hypergeometric
test_class.var_name: hypergeometric
test_class.declarator: EPSILON = 0.00001
test_class.modifier: private static final
test_class.original_string: private static final double EPSILON = 0.00001;
test_class.type: double
test_class.var_name: EPSILON
test_class.file: phenol-analysis/src/test/java/org/monarchinitiative/phenol/stats/HypergeometricTest.java
test_class.identifier: HypergeometricTest
test_case.body: @Test
    void test_dhyper() {
      int x = 14; // # number of white balls drawn from urn
      int m = 70; // # white balls in urn
      int n = 30; // # number of other balls
      int k = 20; // # number of balls drawn from urn
      int N = m+n; // # total number of balls in urn
      double result = hypergeometric.dhyper(x, N, m, k);
      assertEquals(0.2140911, result, EPSILON);
    }
test_case.class_method_signature: HypergeometricTest.test_dhyper()
test_case.full_signature: @Test void test_dhyper()
test_case.identifier: test_dhyper
test_case.invocations: dhyper assertEquals
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_dhyper()
focal_class.declarator: lfactorial
focal_class.modifier: private final
focal_class.original_string: private final Vector<Double> lfactorial;
focal_class.type: Vector<Double>
focal_class.var_name: lfactorial
focal_class.file: phenol-analysis/src/main/java/org/monarchinitiative/phenol/stats/Hypergeometric.java
focal_class.identifier: Hypergeometric
focal_class.class_method_signature: Hypergeometric.Hypergeometric()
focal_class.full_signature: public  Hypergeometric()
focal_class.identifier: Hypergeometric
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Hypergeometric()
focal_class.class_method_signature: Hypergeometric.phypergeometric(int n, double p, int k, int r)
focal_class.full_signature: public double phypergeometric(int n, double p, int k, int r)
focal_class.identifier: phypergeometric
focal_class.modifiers: public
focal_class.parameters: (int n, double p, int k, int r)
focal_class.return: double
focal_class.signature: double phypergeometric(int n, double p, int k, int r)
focal_class.class_method_signature: Hypergeometric.phypergeometric(int m, int m_t, int n, int n_t)
focal_class.full_signature: public double phypergeometric(int m, int m_t, int n, int n_t)
focal_class.identifier: phypergeometric
focal_class.modifiers: public
focal_class.parameters: (int m, int m_t, int n, int n_t)
focal_class.return: double
focal_class.signature: double phypergeometric(int m, int m_t, int n, int n_t)
focal_class.class_method_signature: Hypergeometric.dhyper(int x, int N, int M, int n)
focal_class.full_signature: public double dhyper(int x, int N, int M, int n)
focal_class.identifier: dhyper
focal_class.modifiers: public
focal_class.parameters: (int x, int N, int M, int n)
focal_class.return: double
focal_class.signature: double dhyper(int x, int N, int M, int n)
focal_class.class_method_signature: Hypergeometric.phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.full_signature: public double phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.identifier: phyper
focal_class.modifiers: public
focal_class.parameters: (int x, int N, int M, int n, boolean lowerTail)
focal_class.return: double
focal_class.signature: double phyper(int x, int N, int M, int n, boolean lowerTail)
focal_class.class_method_signature: Hypergeometric.lNchooseK(int n, int k)
focal_class.full_signature: public double lNchooseK(int n, int k)
focal_class.identifier: lNchooseK
focal_class.modifiers: public
focal_class.parameters: (int n, int k)
focal_class.return: double
focal_class.signature: double lNchooseK(int n, int k)
focal_class.class_method_signature: Hypergeometric.logfact(int i)
focal_class.full_signature: public double logfact(int i)
focal_class.identifier: logfact
focal_class.modifiers: public
focal_class.parameters: (int i)
focal_class.return: double
focal_class.signature: double logfact(int i)
focal_method.body: public double dhyper(int x, int N, int M, int n) {
      /* It is not possible to draw more white balls
       * from an urn containing M white balls. Hence
       * the probability is 0.
       */
      if (x > M) return 0;
  
      /* Of course it is also not possible to draw
       * more white balls than the number of drawings.
       * The probability is 0.
       */
      if (x > n) return 0;
  
      /* Last but not least, it is also not possible
       * to draw more black balls than there are within
       * the urn.
       */
      if (n - x > N - M) return 0;
  
      return Math.exp(lNchooseK(M, x) + lNchooseK(N - M, n - x) - lNchooseK(N, n));
    }
focal_method.class_method_signature: Hypergeometric.dhyper(int x, int N, int M, int n)
focal_method.full_signature: public double dhyper(int x, int N, int M, int n)
focal_method.identifier: dhyper
focal_method.invocations: exp lNchooseK lNchooseK lNchooseK
focal_method.modifiers: public
focal_method.parameters: (int x, int N, int M, int n)
focal_method.return: double
focal_method.signature: double dhyper(int x, int N, int M, int n)