Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for gcd (0.14 sec)

  1. android/guava/src/com/google/common/math/IntMath.java

        int bTwos = Integer.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
        while (a != b) { // both a, b are odd
          // The key to the binary GCD algorithm is as follows:
          // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
          // We bend over backwards to avoid branching, adapting a technique from
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  2. docs/distributed/DESIGN.md

    1024 drives. In this scenario 16 becomes the erasure set size. This is decided based on the greatest common divisor (GCD) of acceptable erasure set sizes ranging from *4 to 16*.
    
    - *If total drives has many common divisors the algorithm chooses the minimum amounts of erasure sets possible for a erasure set size of any N*.  In the example with 1024 drives - 4, 8, 16 are GCD factors. With 16 drives we get a total of 64 possible sets, with 8 drives we get a total of 128 possible sets, with 4...
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : POSITIVE_INTEGER_CANDIDATES) {
            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(IntMath.gcd(a, b)));
          }
        }
      }
    
      public void testGCDZero() {
        for (int a : POSITIVE_INTEGER_CANDIDATES) {
          assertEquals(a, IntMath.gcd(a, 0));
          assertEquals(a, IntMath.gcd(0, a));
        }
        assertEquals(0, IntMath.gcd(0, 0));
      }
    
      public void testGCDNegativePositiveThrows() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : POSITIVE_INTEGER_CANDIDATES) {
            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(IntMath.gcd(a, b)));
          }
        }
      }
    
      public void testGCDZero() {
        for (int a : POSITIVE_INTEGER_CANDIDATES) {
          assertEquals(a, IntMath.gcd(a, 0));
          assertEquals(a, IntMath.gcd(0, a));
        }
        assertEquals(0, IntMath.gcd(0, 0));
      }
    
      public void testGCDNegativePositiveThrows() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/LongMath.java

        int bTwos = Long.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
        while (a != b) { // both a, b are odd
          // The key to the binary GCD algorithm is as follows:
          // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
          // We bend over backwards to avoid branching, adapting a technique from
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b)));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testGCDZero() {
        for (long a : POSITIVE_LONG_CANDIDATES) {
          assertEquals(a, LongMath.gcd(a, 0));
          assertEquals(a, LongMath.gcd(0, a));
        }
        assertEquals(0, LongMath.gcd(0, 0));
      }
    
      @GwtIncompatible // TODO
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/LongMathTest.java

            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b)));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testGCDZero() {
        for (long a : POSITIVE_LONG_CANDIDATES) {
          assertEquals(a, LongMath.gcd(a, 0));
          assertEquals(a, LongMath.gcd(0, a));
        }
        assertEquals(0, LongMath.gcd(0, 0));
      }
    
      @GwtIncompatible // TODO
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  8. cmd/endpoint-ellipses.go

    // all the ellipses sizes.
    func getDivisibleSize(totalSizes []uint64) (result uint64) {
    	gcd := func(x, y uint64) uint64 {
    		for y != 0 {
    			x, y = y, x%y
    		}
    		return x
    	}
    	result = totalSizes[0]
    	for i := 1; i < len(totalSizes); i++ {
    		result = gcd(result, totalSizes[i])
    	}
    	return result
    }
    
    // isValidSetSize - checks whether given count is a valid set size for erasure coding.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/Ints.java

        //     moved at that point. Otherwise, we can rotate the cycle a[1], a[1 + d], a[1 + 2d], etc,
        //     then a[2] etc, and so on until we have rotated all elements. There are gcd(d, n) cycles
        //     in all.
        // (3) "Successive". We can consider that we are exchanging a block of size d (a[0..d-1]) with a
        //     block of size n-d (a[d..n-1]), where in general these blocks have different sizes. If we
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 29.7K bytes
    - Viewed (0)
Back to top