Class BitLength<E>

java.lang.Object
dk.jonaslindstrom.ruffini.common.algorithms.BitLength<E>
Type Parameters:
E - Element type.

public class BitLength<E> extends Object
Compute the bit length of an element in a ring assuming access to a bit shift operation.
  • Constructor Details

    • BitLength

      public BitLength(Ring<E> ring, java.util.function.BiFunction<E,Integer,E> rightShift)
  • Method Details

    • bitLength

      public int bitLength(E n, int maxBitLength)