public class VectorMatch extends Object implements ReadableVectorMatch
| Modifier and Type | Method and Description |
|---|---|
VectorMatch |
addAll(ReadableVectorMatch other,
VectorMatch scratch)
Adds all rows from "other" to this object, using "scratch" as scratch space if needed.
|
static ReadableVectorMatch |
allFalse()
Creates a match that matches nothing.
|
static ReadableVectorMatch |
allTrue(int numRows)
Creates a match that matches everything up to "numRows".
|
VectorMatch |
copyFrom(ReadableVectorMatch other)
Copies "other" into this object, and returns a reference to this object.
|
int[] |
getSelection()
Returns an array of indexes into the current batch.
|
int |
getSelectionSize()
Returns the number of valid values in the array from "getSelection".
|
boolean |
isAllFalse()
Checks if this match has accepted *nothing*.
|
boolean |
isAllTrue(int vectorSize)
Checks if this match has accepted every row in the vector.
|
boolean |
isValid(ReadableVectorMatch mask)
Checks if this match is valid (increasing row numbers, no out-of-range row numbers).
|
VectorMatch |
removeAll(ReadableVectorMatch other)
Removes all rows from this object that occur in "other", in place, and returns a reference to this object.
|
VectorMatch |
setSelectionSize(int newSelectionSize)
Sets the valid selectionSize, and returns a reference to this object.
|
String |
toString() |
static VectorMatch |
wrap(int[] selection)
Creates a new match object with selectionSize = 0, and the provided array as a backing array.
|
public static ReadableVectorMatch allTrue(int numRows)
public static ReadableVectorMatch allFalse()
public static VectorMatch wrap(int[] selection)
public boolean isAllTrue(int vectorSize)
ReadableVectorMatchisAllTrue in interface ReadableVectorMatchvectorSize - the current vector size; must be passed in since VectorMatch objects do not "know" the size
of the vector they came from.public boolean isAllFalse()
ReadableVectorMatchisAllFalse in interface ReadableVectorMatchpublic boolean isValid(@Nullable ReadableVectorMatch mask)
ReadableVectorMatchisValid in interface ReadableVectorMatchmask - if provided, checks if this match is a subset of the mask.public VectorMatch removeAll(ReadableVectorMatch other)
public VectorMatch addAll(ReadableVectorMatch other, VectorMatch scratch)
public VectorMatch copyFrom(ReadableVectorMatch other)
public int[] getSelection()
ReadableVectorMatchgetSelection in interface ReadableVectorMatchpublic int getSelectionSize()
ReadableVectorMatchgetSelectionSize in interface ReadableVectorMatchpublic VectorMatch setSelectionSize(int newSelectionSize)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.