Package

org.hammerlab.magic

math

Permalink

package math

Visibility
  1. Public
  2. All

Type Members

  1. case class HyperGeometricDistribution(N: Long, K: Long, n: Int) extends Product with Serializable

    Permalink

    Implementation of a hypergeometric distribution, modeled after org.apache.commons.math3.distribution.HypergeometricDistribution, but supporting Long parameters.

    Implementation of a hypergeometric distribution, modeled after org.apache.commons.math3.distribution.HypergeometricDistribution, but supporting Long parameters.

    N

    Population size.

    K

    Number of successes.

    n

    Number to sample.

  2. class RoundNumbers[I] extends SimpleBufferedIterator[I]

    Permalink

    Emit an exponentially-increasing sequence of integers composed of repetitions of steps scaled by successive powers of base.

Value Members

  1. object RoundNumbers

    Permalink

    Constructors.

  2. object Steps

    Permalink

    Some utilities for generating exponential sequences of integers that can be used as e.g.

    Some utilities for generating exponential sequences of integers that can be used as e.g. histogram-bucket boundaries.

  3. object VarNum

    Permalink

    Serialization wrapper for Longs which burns one bit per byte indicating whether any more bytes follow.

    Serialization wrapper for Longs which burns one bit per byte indicating whether any more bytes follow.

    Can utilize less serialized space than naively writing 8-byte Longs in datasets where absolute values tend to be less than 248 more often than they are ≥ 255.

    Long's absolute values correspond to the following number of serialized bytes:

    [ 0, 26): 1 byte [ 26, 213): 2 bytes [213, 220): 3 bytes [220, 227): 4 bytes [227, 234): 5 bytes [234, 241): 6 bytes [241, 248): 7 bytes [248, 255): 8 bytes [255, 2^63): 9 bytes

    The first byte, in addition to its most significant bit indicating whether any more bites follow, uses its second-most-significant bit to represent the sign of the Long.

Ungrouped