Class CircularPartitioner

java.lang.Object
io.nosqlbench.virtdata.lib.vectors.dnn.circular.CircularPartitioner

public class CircularPartitioner extends Object

Examples

One bit represents the possibility of subdividing the space in one of two ways, either once at angle 0 from the fixed reference point at (1,0), or twice, at the initial point and the half-way point around the unit circle.

Adding a bit of resolution represents a possibility of 4 subdivisions of the unit circle, and so on, doubling (subdividing) teach previous range for each bit added. However, it is not strictly required that the space be divided by only Some 2^n possible spaces. Any value represented by the bit field can represent a number of subdivisions, whereas the actual last value known to be used determines how many of the smallest intervals are subdivided and how many further are not. not.


Space Filling Curve Calculations

Here are the steps to mapping an ordinal to it's effective offset with the representable values for a given width of register. For some of these operations, you may need to mask to only retain values that properly fit within the register size for the maximum value, such as the zero case.
  1. Level of Subdivision -Determine the strata of resolution from the most significant bit in the ordinal. This is simply the leftmost bit which is set. For 0b101, the MSB is 3.
  2. Phase Bits - Determine the number of bits which represent all distinct points at that resolution. This is calculated as one less than the msb of the ordinal. For example ordinal 5 (0b101) has msb of 3, so within this level of resolution, the number of significant bits is 2 (3-1) or (max msb - ordinal msb)
  3. Phase Bit Shift - Determine how far the phase index image needs to shift left, to align the bits at the outer most level rotation. Every strata is aligned to the unit circle, only with a different initial position and step size. This is calculated as 2^(max msb - ordinal msb)
  • Constructor Details

    • CircularPartitioner

      public CircularPartitioner(int maxOrdinalExcluded)
  • Method Details

    • unitIntervalOf

      public double unitIntervalOf(int ordinal)
      Given the number of Return the value within the unit interval
      Parameters:
      ordinal -
      Returns:
    • ordinalToOffset

      public int ordinalToOffset(int ordinal)
    • ordinalToFraction

      public int[] ordinalToFraction(int ordinal)
    • ordinalToUnitInterval

      public double ordinalToUnitInterval(int ordinal)
    • vecOnCircle

      public double[] vecOnCircle(double unit)