Iterable<Boolean>, CategoricalColumn, BooleanFillers<BooleanColumn>, BooleanMapUtils, Columnpublic class BooleanColumn extends AbstractColumn<Boolean,BooleanColumn> implements BooleanMapUtils, CategoricalColumn, BooleanFillers<BooleanColumn>, Iterable<Boolean>
| Modifier and Type | Field | Description |
|---|---|---|
static byte |
BYTE_FALSE |
|
static byte |
BYTE_TRUE |
|
static byte |
MISSING_VALUE |
DEFAULT_ARRAY_SIZE| Modifier and Type | Method | Description |
|---|---|---|
boolean |
all() |
Returns true if the column contains only true values, and false otherwise.
|
boolean |
any() |
Returns true if the column contains any true values, and false otherwise
|
BooleanColumn |
append(boolean b) |
|
BooleanColumn |
append(byte b) |
|
BooleanColumn |
append(Boolean b) |
|
void |
append(Column column) |
|
BooleanColumn |
appendCell(String object) |
|
BooleanColumn |
appendCell(String object,
StringParser parser) |
|
BooleanColumn |
appendMissing() |
Appends a missing value appropriate to the column
|
byte[] |
asBytes(int row) |
Returns the contents of the cell at rowNumber as a byte[].
|
double[] |
asDoubleArray() |
|
int[] |
asIntArray() |
|
NumberColumn |
asNumberColumn() |
|
Object[] |
asObjectArray() |
|
Selection |
asSelection() |
|
it.unimi.dsi.fastutil.booleans.BooleanSet |
asSet() |
|
it.unimi.dsi.fastutil.bytes.ByteIterator |
byteIterator() |
|
int |
byteSize() |
Returns the width of a cell in this column, in bytes.
|
void |
clear() |
|
boolean |
contains(boolean aBoolean) |
|
BooleanColumn |
copy() |
Returns a deep copy of the receiver
|
int |
countFalse() |
|
int |
countMissing() |
Returns the count of missing values in this column
|
int |
countTrue() |
|
int |
countUnique() |
Returns the count of unique values in this column.
|
static BooleanColumn |
create(String name) |
|
static BooleanColumn |
create(String name,
boolean[] values) |
|
static BooleanColumn |
create(String name,
int initialSize) |
|
static BooleanColumn |
create(String name,
Boolean[] objects) |
|
static BooleanColumn |
create(String name,
List<Boolean> values) |
|
static BooleanColumn |
create(String name,
Selection hits,
int columnSize) |
|
it.unimi.dsi.fastutil.bytes.ByteArrayList |
data() |
Returns a ByteArrayList containing 0 (false), 1 (true) or Byte.MIN_VALUE (missing)
|
BooleanColumn |
emptyCopy() |
Returns a copy of the receiver with no data.
|
BooleanColumn |
emptyCopy(int rowSize) |
Returns an empty copy of the receiver, with its internal storage initialized to the given row size.
|
boolean |
equals(Object o) |
|
Selection |
eval(BiPredicate<Boolean,Boolean> predicate,
Boolean valueToCompare) |
|
Selection |
eval(Predicate<Boolean> predicate) |
|
Selection |
eval(BytePredicate predicate) |
|
BooleanColumn |
fillWith(it.unimi.dsi.fastutil.booleans.BooleanIterable iterable) |
|
BooleanColumn |
fillWith(it.unimi.dsi.fastutil.booleans.BooleanIterator iterator) |
|
BooleanColumn |
fillWith(Supplier<Boolean> supplier) |
|
Boolean |
get(int i) |
Returns the value in row i as a Boolean
|
byte |
getByte(int i) |
Returns the value in row i as a byte (0, 1, or Byte.MIN_VALUE representing missing data)
|
double |
getDouble(int row) |
Returns a double representation of the value at the given row.
|
Boolean |
getObject(int index) |
|
BooleanFormatter |
getPrintFormatter() |
|
String |
getString(int row) |
Returns a string representation of the value at the given row.
|
String |
getUnformattedString(int row) |
|
int |
hashCode() |
|
boolean |
isEmpty() |
Returns true if the column has no data
|
Selection |
isEqualTo(BooleanColumn other) |
|
Selection |
isFalse() |
|
Selection |
isMissing() |
|
boolean |
isMissing(int rowNumber) |
|
Selection |
isNotMissing() |
|
Selection |
isTrue() |
|
Iterator<Boolean> |
iterator() |
|
BooleanColumn |
lag(int n) |
Returns a column of the same type and size as the receiver, containing the receivers values offset by n.
|
BooleanColumn |
lead(int n) |
Returns a column of the same type as the receiver, containing the receivers values offset -n
For example if you lead a column containing 2, 3, 4 by 1, you get a column containing 3, 4, NA.
|
boolean |
none() |
Returns true if the column contains no true values, and false otherwise
|
double |
proportionFalse() |
Returns the proportion of non-missing row elements that contain true
|
double |
proportionTrue() |
Returns the proportion of non-missing row elements that contain true
|
BooleanColumn |
removeMissing() |
|
it.unimi.dsi.fastutil.ints.IntComparator |
rowComparator() |
|
BooleanColumn |
set(int i,
boolean b) |
|
BooleanColumn |
set(int i,
Boolean val) |
|
BooleanColumn |
set(Selection rowSelection,
boolean newValue) |
Conditionally update this column, replacing current values with newValue for all rows where the current value
matches the selection criteria
|
void |
setPrintFormatter(BooleanFormatter formatter) |
|
int |
size() |
|
void |
sortAscending() |
|
void |
sortDescending() |
|
Table |
summary() |
|
BooleanColumn |
unique() |
Returns a column of the same type as the receiver, containing only the unique values of the receiver.
|
static boolean |
valueIsMissing(byte b) |
|
BooleanColumn |
where(Selection selection) |
columnWidth, doWithEach, fillMissing, fillMissing, name, print, setName, toString, typeand, andNot, orasIntegerSet, countByCategorycolumnWidth, create, first, inRange, last, name, print, rolling, rows, sampleN, sampleX, setName, subset, title, typeforEach, spliteratorpublic static final byte MISSING_VALUE
public static final byte BYTE_TRUE
public static final byte BYTE_FALSE
public static boolean valueIsMissing(byte b)
public static BooleanColumn create(String name, Selection hits, int columnSize)
public static BooleanColumn create(String name)
public static BooleanColumn create(String name, int initialSize)
public static BooleanColumn create(String name, boolean[] values)
public static BooleanColumn create(String name, List<Boolean> values)
public static BooleanColumn create(String name, Boolean[] objects)
public void setPrintFormatter(BooleanFormatter formatter)
public BooleanFormatter getPrintFormatter()
public int countMissing()
countMissing in interface Columnpublic int countUnique()
ColumncountUnique in interface Columnpublic BooleanColumn unique()
Columnpublic BooleanColumn append(boolean b)
public BooleanColumn append(Boolean b)
append in class AbstractColumn<Boolean,BooleanColumn>public BooleanColumn append(byte b)
public BooleanColumn appendMissing()
ColumnappendMissing in interface Columnpublic String getString(int row)
Columnpublic String getUnformattedString(int row)
getUnformattedString in interface Columnpublic BooleanColumn emptyCopy()
ColumnemptyCopy in interface ColumnemptyCopy in class AbstractColumn<Boolean,BooleanColumn>Columnpublic BooleanColumn emptyCopy(int rowSize)
Columnpublic BooleanColumn copy()
Columnpublic void sortAscending()
sortAscending in interface Columnpublic void sortDescending()
sortDescending in interface Columnpublic BooleanColumn appendCell(String object)
appendCell in interface Columnpublic BooleanColumn appendCell(String object, StringParser parser)
appendCell in interface Columnpublic Boolean get(int i)
i - the row numberpublic byte getByte(int i)
i - the row numberpublic boolean isEmpty()
Columnpublic int countTrue()
public int countFalse()
public double proportionTrue()
public double proportionFalse()
public boolean any()
public boolean all()
public boolean none()
public Selection isFalse()
public Selection isTrue()
public Selection isEqualTo(BooleanColumn other)
public it.unimi.dsi.fastutil.bytes.ByteArrayList data()
public BooleanColumn set(int i, boolean b)
public BooleanColumn set(int i, Boolean val)
set in class AbstractColumn<Boolean,BooleanColumn>public BooleanColumn lead(int n)
Columnpublic BooleanColumn lag(int n)
ColumnFor example if you lag a column containing 2, 3, 4 by 1, you get a column containing NA, 2, 3
public BooleanColumn set(Selection rowSelection, boolean newValue)
public double getDouble(int row)
Columnpublic double[] asDoubleArray()
asDoubleArray in interface Columnpublic it.unimi.dsi.fastutil.ints.IntComparator rowComparator()
rowComparator in interface Columnpublic Selection asSelection()
asSelection in interface BooleanMapUtilspublic Selection isNotMissing()
isNotMissing in interface Columnpublic it.unimi.dsi.fastutil.bytes.ByteIterator byteIterator()
public it.unimi.dsi.fastutil.booleans.BooleanSet asSet()
public boolean contains(boolean aBoolean)
public int byteSize()
Columnpublic byte[] asBytes(int row)
Columnpublic BooleanColumn where(Selection selection)
public BooleanColumn removeMissing()
removeMissing in interface Columnpublic Selection eval(BytePredicate predicate)
public Selection eval(BiPredicate<Boolean,Boolean> predicate, Boolean valueToCompare)
public int[] asIntArray()
asIntArray in interface CategoricalColumnpublic NumberColumn asNumberColumn()
public BooleanColumn fillWith(it.unimi.dsi.fastutil.booleans.BooleanIterator iterator)
fillWith in interface BooleanFillers<BooleanColumn>public BooleanColumn fillWith(it.unimi.dsi.fastutil.booleans.BooleanIterable iterable)
fillWith in interface BooleanFillers<BooleanColumn>public BooleanColumn fillWith(Supplier<Boolean> supplier)
fillWith in interface BooleanFillers<BooleanColumn>public Object[] asObjectArray()
asObjectArray in interface Columnpublic Boolean getObject(int index)
getObject in interface ColumngetObject in class AbstractColumn<Boolean,BooleanColumn>Copyright © 2018. All rights reserved.