T - the type of data objects.public interface Dataset<T>
| Modifier and Type | Method and Description |
|---|---|
default T |
apply(int i)
Returns the element at the specified position in this dataset.
|
default boolean |
distributed()
Returns true if the dataset is distributed over multiple machines.
|
T |
get(int i)
Returns the element at the specified position in this dataset.
|
default boolean |
isEmpty()
Returns true if the dataset is empty.
|
static <T> Dataset<T> |
of(java.util.Collection<T> data)
Returns a default implementation of Dataset from a collection.
|
int |
size()
Returns the number of elements in this collection.
|
java.util.stream.Stream<T> |
stream()
Returns a (possibly parallel) Stream with this collection as its source.
|
static <T> java.util.stream.Collector<T,java.util.List<T>,Dataset<T>> |
toDataset()
Returns a stream collector that accumulates elements into a Dataset.
|
static <T> java.util.stream.Collector<double[],java.util.List<double[]>,smile.math.matrix.Matrix> |
toMatrix()
Returns a stream collector that accumulates elements into a Matrix.
|
default java.lang.String |
toString(int numRows)
Returns the string representation of the row.
|
default boolean distributed()
int size()
default boolean isEmpty()
T get(int i)
i - the index of the element to be returned.default T apply(int i)
i - the index of the element to be returned.java.util.stream.Stream<T> stream()
default java.lang.String toString(int numRows)
numRows - Number of rows to showstatic <T> Dataset<T> of(java.util.Collection<T> data)
static <T> java.util.stream.Collector<T,java.util.List<T>,Dataset<T>> toDataset()
T - the type of input elements to the reduction operationstatic <T> java.util.stream.Collector<double[],java.util.List<double[]>,smile.math.matrix.Matrix> toMatrix()