Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for binomial (0.31 sec)

  1. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertEquals(expected, BigIntegerMath.binomial(n, k));
          }
        }
      }
    
      public void testBinomialOutside() {
        for (int n = 0; n <= 50; n++) {
          try {
            BigIntegerMath.binomial(n, -1);
            fail("Expected IllegalArgumentException");
          } catch (IllegalArgumentException expected) {
          }
          try {
            BigIntegerMath.binomial(n, n + 1);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 17:58:33 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Collections2.java

              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
        public int size() {
          return size;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Collections2.java

              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
        public int size() {
          return size;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. src/math/big/int_test.go

    		{1000, 990, "263409560461970212832400"},
    	} {
    		if got := z.Binomial(test.n, test.k).String(); got != test.want {
    			t.Errorf("Binomial(%d, %d) = %s; want %s", test.n, test.k, got, test.want)
    		}
    	}
    }
    
    func BenchmarkBinomial(b *testing.B) {
    	var z Int
    	for i := 0; i < b.N; i++ {
    		z.Binomial(1000, 990)
    	}
    }
    
    // Examples from the Go Language Spec, section "Arithmetic operators"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  5. src/math/big/int.go

    	neg := false
    	if a < 0 {
    		neg = (b-a)&1 == 0
    		a, b = -b, -a
    	}
    
    	z.abs = z.abs.mulRange(uint64(a), uint64(b))
    	z.neg = neg
    	return z
    }
    
    // Binomial sets z to the binomial coefficient C(n, k) and returns z.
    func (z *Int) Binomial(n, k int64) *Int {
    	if k > n {
    		return z.SetInt64(0)
    	}
    	// reduce the number of multiplications by reducing k
    	if k > n-k {
    		k = n - k // C(n, k) == C(n, n-k)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 17:02:38 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  6. src/runtime/metrics_test.go

    			// With 100 trials and profile fraction of 2, we expect to capture
    			// 50 samples. Allow the test to pass if we get at least 20 samples;
    			// the CDF of the binomial distribution says there's less than a
    			// 1e-9 chance of that, which is an acceptably low flakiness rate.
    			const samplingSlop = 2.5
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Sets.java

                    return size;
                  }
                };
              }
            };
          }
    
          @Override
          public int size() {
            return IntMath.binomial(index.size(), size);
          }
    
          @Override
          public String toString() {
            return "Sets.combinations(" + index.keySet() + ", " + size + ")";
          }
        };
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 77.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Sets.java

                    return size;
                  }
                };
              }
            };
          }
    
          @Override
          public int size() {
            return IntMath.binomial(index.size(), size);
          }
    
          @Override
          public String toString() {
            return "Sets.combinations(" + index.keySet() + ", " + size + ")";
          }
        };
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 78.8K bytes
    - Viewed (0)
  9. src/go/types/hilbert_test.go

    		g.p("\tprintln(")
    		for j := 0; j < n; j++ {
    			if j > 0 {
    				g.p(", ")
    			}
    			g.p("p%d_%d", i, j)
    		}
    		g.p(")\n")
    	}
    	g.p("}\n\n")
    }
    
    func (g *gen) binomials(n int) {
    	g.p(`// Binomials
    const (
    `)
    	for j := 0; j <= n; j++ {
    		if j > 0 {
    			g.p("\n")
    		}
    		for k := 0; k <= j; k++ {
    			g.p("\tb%d_%d = f%d / (f%d*f%d)\n", j, k, j, k, j-k)
    		}
    	}
    	g.p(")\n\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_generated_ops.td

    def TF_StatelessRandomBinomialOp : TF_Op<"StatelessRandomBinomial", [Pure, TF_NoConstantFold]> {
      let summary = [{
    Outputs deterministic pseudorandom random numbers from a binomial distribution.
      }];
    
      let description = [{
    Outputs random values from a binomial distribution.
    
    The outputs are a deterministic function of `shape`, `seed`, `counts`, and `probs`.
      }];
    
      let arguments = (ins
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 23:24:08 UTC 2024
    - 793K bytes
    - Viewed (0)
Back to top