Interface ReadableVectorMatch

All Known Implementing Classes:
VectorMatch

public interface ReadableVectorMatch
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Returns an array of indexes into the current batch.
    int
    Returns the number of valid values in the array from "getSelection".
    boolean
    Checks if this match has accepted *nothing*.
    boolean
    isAllTrue(int vectorSize)
    Checks if this match has accepted every row in the vector.
    boolean
    Checks if this match is valid (increasing row numbers, no out-of-range row numbers).
  • Method Details

    • getSelection

      int[] getSelection()
      Returns an array of indexes into the current batch. Only the first "getSelectionSize" are valid. Even though this array is technically mutable, it is very poor form to mutate it if you are not the owner of the VectorMatch object. The reason we use a mutable array here instead of positional getter methods, by the way, is in the hopes of keeping access to the selection vector as low-level and optimizable as possible. Potential optimizations could include making it easier for the JVM to use CPU-level vectorization, avoid method calls, etc.
    • getSelectionSize

      int getSelectionSize()
      Returns the number of valid values in the array from "getSelection".
    • isAllTrue

      boolean isAllTrue(int vectorSize)
      Checks if this match has accepted every row in the vector.
      Parameters:
      vectorSize - the current vector size; must be passed in since VectorMatch objects do not "know" the size of the vector they came from.
    • isAllFalse

      boolean isAllFalse()
      Checks if this match has accepted *nothing*.
    • isValid

      boolean isValid(@Nullable ReadableVectorMatch mask)
      Checks if this match is valid (increasing row numbers, no out-of-range row numbers). Can additionally verify that the match is a subset of a provided "mask". Used by assertions and tests.
      Parameters:
      mask - if provided, checks if this match is a subset of the mask.