public class DatasetFactory extends Object
| Constructor and Description |
|---|
DatasetFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends CompoundDataset> |
compoundZeros(int itemSize,
Class<T> clazz,
int... shape) |
static CompoundDataset |
compoundZeros(int itemSize,
int[] shape,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
compoundZeros(int, Class, int...) |
static <T extends CompoundDataset> |
createComplexDataset(Class<? extends Dataset> clazz,
Object real,
Object imag)
Create complex dataset of given class from real and imaginary parts
|
static CompoundDataset |
createComplexDataset(int dtype,
Object real,
Object imag)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createComplexDataset(Class, Object, Object) |
static <T extends CompoundDataset> |
createCompoundDataset(Class<T> clazz,
Object... objects)
Create compound dataset of given class from given parts
|
static CompoundDataset |
createCompoundDataset(int dtype,
Object... objects)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createCompoundDataset(Class, Object...) |
static CompoundDataset |
createCompoundDataset(Object... objects)
Create compound dataset of given type from given parts
|
static <T extends Dataset> |
createFromList(Class<T> clazz,
List<?> objectList)
Create dataset of given class from list
|
static Dataset |
createFromList(int dtype,
List<?> objectList)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createFromList(Class, List) |
static Dataset |
createFromList(List<?> objectList)
Create dataset of appropriate type from list
|
static Dataset |
createFromObject(boolean isUnsigned,
Object obj)
Create a dataset from object (automatically detect dataset type)
|
static <T extends Dataset> |
createFromObject(Class<T> clazz,
Object obj)
Create a dataset from object
|
static <T extends Dataset> |
createFromObject(Class<T> clazz,
Object obj,
int... shape)
Create a dataset from object
|
static <T extends Dataset> |
createFromObject(int itemSize,
Class<T> clazz,
Object obj,
int... shape)
Create a compound dataset from object
|
static Dataset |
createFromObject(int itemSize,
int dtype,
Object obj,
int... shape)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createFromObject(int, Class, Object, int...) |
static Dataset |
createFromObject(int dtype,
Object obj)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createFromObject(Class, Object, int...) |
static Dataset |
createFromObject(int dtype,
Object obj,
int... shape)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createFromObject(Class, Object, int...) |
static Dataset |
createFromObject(Object obj)
Create a dataset from object (automatically detect dataset type)
|
static Dataset |
createFromObject(Object obj,
int... shape)
Create a dataset from object (automatically detect dataset type)
|
static <T extends Dataset> |
createLinearSpace(Class<T> clazz,
double start,
double stop,
int length)
Create a 1D dataset of linearly spaced values in closed interval
|
static Dataset |
createLinearSpace(double start,
double stop,
int length,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createLinearSpace(Class, double, double, int) |
static <T extends Dataset> |
createLogSpace(Class<T> clazz,
double start,
double stop,
int length,
double base)
Create a 1D dataset of logarithmically spaced values in closed interval.
|
static Dataset |
createLogSpace(double start,
double stop,
int length,
double base,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createLogSpace(Class, double, double, int, double) |
static <T extends Dataset> |
createRange(Class<T> clazz,
double stop)
Create dataset with items ranging from 0 up to given stop in steps of 1
|
static <T extends Dataset> |
createRange(Class<T> clazz,
double start,
double stop,
double step)
Create dataset with items ranging from given start up to given stop in given steps
|
static DoubleDataset |
createRange(double stop)
Create dataset with items ranging from 0 up to given stop in steps of 1
|
static DoubleDataset |
createRange(double start,
double stop,
double step)
Create dataset with items ranging from given start up to given stop in given steps
|
static Dataset |
createRange(double start,
double stop,
double step,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createRange(Class, double, double, double) |
static Dataset |
createRange(double stop,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createRange(Class, double) |
static <T extends CompoundDataset> |
createRange(int itemSize,
Class<T> clazz,
double stop)
Create compound dataset with items ranging from 0 up to given stop in steps of 1
|
static <T extends CompoundDataset> |
createRange(int itemSize,
Class<T> clazz,
double start,
double stop,
double step)
Create compound dataset with items ranging from given start up to given stop in given steps
|
static CompoundDataset |
createRange(int itemSize,
double start,
double stop,
double step,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createRange(int, Class, double, double, double) |
static CompoundDataset |
createRange(int itemSize,
double stop,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
createRange(int, Class, double) |
static <T extends Dataset> |
ones(Class<T> clazz,
int... shape) |
static <T extends Dataset> |
ones(Dataset dataset,
Class<T> clazz) |
static Dataset |
ones(Dataset dataset,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
ones(Dataset, Class) |
static DoubleDataset |
ones(int... shape) |
static Dataset |
ones(int[] shape,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
ones(Class, int...) |
static <T extends Dataset> |
ones(int itemSize,
Class<T> clazz,
int... shape) |
static Dataset |
ones(int itemSize,
int[] shape,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
ones(Class, int...) |
static <T extends Dataset> |
ones(T dataset) |
static <T extends Dataset> |
zeros(Class<T> clazz,
int... shape) |
static <T extends Dataset> |
zeros(Dataset dataset,
Class<T> clazz) |
static Dataset |
zeros(Dataset dataset,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
zeros(Dataset, Class) |
static DoubleDataset |
zeros(int... shape) |
static Dataset |
zeros(int[] shape,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
zeros(Class, int...) |
static <T extends Dataset> |
zeros(int itemSize,
Class<T> clazz,
int... shape) |
static Dataset |
zeros(int itemSize,
int[] shape,
int dtype)
Deprecated.
Please use the class-based methods in DatasetFactory,
such as
zeros(int, Class, int...) |
static <T extends Dataset> |
zeros(T dataset) |
static <T extends Dataset> |
zeros(T dataset,
int... shape) |
public DatasetFactory()
@Deprecated public static Dataset createRange(double stop, int dtype)
createRange(Class, double)stop - stop value is not includeddtype - dataset type@Deprecated public static Dataset createRange(double start, double stop, double step, int dtype)
createRange(Class, double, double, double)start - start value start valuestop - stop value is not includedstep - spacing between itemsdtype - dataset type@Deprecated public static CompoundDataset createRange(int itemSize, double stop, int dtype)
createRange(int, Class, double)itemSize - item sizestop - stop value is not includeddtype - dataset type@Deprecated public static CompoundDataset createRange(int itemSize, double start, double stop, double step, int dtype)
createRange(int, Class, double, double, double)itemSize - item sizestart - start valuestop - stop value is not includedstep - spacing between itemsdtype - dataset type@Deprecated public static Dataset createFromObject(int dtype, Object obj)
createFromObject(Class, Object, int...)dtype - dataset typeobj - can be a Java list, array or NumberIllegalArgumentException - if dataset type is not known@Deprecated public static Dataset createFromObject(int dtype, Object obj, int... shape)
createFromObject(Class, Object, int...)dtype - dataset typeobj - can be a Java list, array or Numbershape - can be nullIllegalArgumentException - if dataset type is not known@Deprecated public static Dataset createFromObject(int itemSize, int dtype, Object obj, int... shape)
createFromObject(int, Class, Object, int...)itemSize - item sizedtype - dataset typeobj - can be a Java list, array or Numbershape - can be nullIllegalArgumentException - if dataset type is not known@Deprecated public static Dataset createFromList(int dtype, List<?> objectList)
createFromList(Class, List)dtype - dataset typeobjectList - inputs@Deprecated public static CompoundDataset createCompoundDataset(int dtype, Object... objects)
createCompoundDataset(Class, Object...)dtype - dataset typeobjects - inputs@Deprecated public static CompoundDataset createComplexDataset(int dtype, Object real, Object imag)
createComplexDataset(Class, Object, Object)dtype - dataset typereal - real partimag - imaginary part@Deprecated public static Dataset zeros(int[] shape, int dtype)
zeros(Class, int...)shape - output shapedtype - dataset type@Deprecated public static Dataset zeros(int itemSize, int[] shape, int dtype)
zeros(int, Class, int...)itemSize - item size
if equal to 1, then non-compound dataset is returnedshape - output shapedtype - dataset type@Deprecated public static CompoundDataset compoundZeros(int itemSize, int[] shape, int dtype)
compoundZeros(int, Class, int...)itemSize - item sizeshape - output shapedtype - dataset type@Deprecated public static Dataset zeros(Dataset dataset, int dtype)
zeros(Dataset, Class)dataset - inputdtype - dataset type@Deprecated public static Dataset ones(Dataset dataset, int dtype)
ones(Dataset, Class)dataset - inputdtype - dataset type@Deprecated public static Dataset ones(int[] shape, int dtype)
ones(Class, int...)shape - output shapedtype - dataset type@Deprecated public static Dataset ones(int itemSize, int[] shape, int dtype)
ones(Class, int...)itemSize - item size
if equal to 1, then non-compound dataset is returnedshape - output shapedtype - dataset type@Deprecated public static Dataset createLinearSpace(double start, double stop, int length, int dtype)
createLinearSpace(Class, double, double, int)start - start valuestop - stop value is includedlength - number of pointsdtype - dataset type@Deprecated public static Dataset createLogSpace(double start, double stop, int length, double base, int dtype)
createLogSpace(Class, double, double, int, double)start - start valuestop - stop value is includedlength - number of pointsbase - for exponentiationdtype - dataset typepublic static <T extends Dataset> T createLinearSpace(Class<T> clazz, double start, double stop, int length)
T - dataset sub-interfaceclazz - dataset sub-interfacestart - start valuestop - stop value is includedlength - number of pointspublic static <T extends Dataset> T createLogSpace(Class<T> clazz, double start, double stop, int length, double base)
T - dataset sub-interfaceclazz - dataset sub-interfacestart - start valuestop - stop value is includedlength - number of pointsbase - for exponentiationpublic static DoubleDataset createRange(double stop)
stop - stop value is not includedpublic static DoubleDataset createRange(double start, double stop, double step)
start - start valuestop - stop value is not includedstep - spacing between itemspublic static <T extends Dataset> T createRange(Class<T> clazz, double stop)
T - dataset sub-interfaceclazz - dataset sub-interfacestop - stop value is not includedpublic static <T extends Dataset> T createRange(Class<T> clazz, double start, double stop, double step)
T - dataset sub-interfaceclazz - dataset sub-interfacestart - start valuestop - stop value is not includedstep - spacing between itemspublic static <T extends CompoundDataset> T createRange(int itemSize, Class<T> clazz, double stop)
T - compound dataset sub-interfaceitemSize - item sizeclazz - compound dataset sub-interfacestop - stop value is not includedpublic static <T extends CompoundDataset> T createRange(int itemSize, Class<T> clazz, double start, double stop, double step)
T - compound dataset sub-interfaceitemSize - item sizeclazz - compound dataset sub-interfacestart - start valuestop - stop value is not includedstep - spacing between itemspublic static Dataset createFromObject(Object obj)
obj - can be Java list, array or Numberpublic static Dataset createFromObject(Object obj, int... shape)
obj - can be Java list, array or Numbershape - can be nullpublic static Dataset createFromObject(boolean isUnsigned, Object obj)
isUnsigned - if true, interpret integer values as unsigned by increasing element bit width if requiredobj - can be a Java list, array or Numberpublic static Dataset createFromList(List<?> objectList)
objectList - inputs for each itempublic static CompoundDataset createCompoundDataset(Object... objects)
objects - inputs across dataset for each elementpublic static <T extends Dataset> T createFromObject(Class<T> clazz, Object obj)
T - dataset sub-interfaceclazz - dataset sub-interfaceobj - can be a Java list, array or NumberIllegalArgumentException - if dataset class is not knownpublic static <T extends Dataset> T createFromObject(Class<T> clazz, Object obj, int... shape)
T - dataset sub-interfaceclazz - dataset sub-interfaceobj - can be a Java list, array or Numbershape - can be nullpublic static <T extends Dataset> T createFromObject(int itemSize, Class<T> clazz, Object obj, int... shape)
T - compound dataset sub-interfaceitemSize - item sizeclazz - compound dataset sub-interfaceobj - can be a Java list, array or Numbershape - can be nullpublic static <T extends Dataset> T createFromList(Class<T> clazz, List<?> objectList)
T - dataset sub-interfaceclazz - dataset sub-interfaceobjectList - inputs for each itempublic static <T extends CompoundDataset> T createCompoundDataset(Class<T> clazz, Object... objects)
T - compound dataset sub-interfaceclazz - compound dataset sub-interfaceobjects - inputs across dataset for each elementpublic static <T extends CompoundDataset> T createComplexDataset(Class<? extends Dataset> clazz, Object real, Object imag)
T - complex dataset sub-interfaceclazz - complex dataset sub-interfacereal - real partimag - imaginary partpublic static DoubleDataset zeros(int... shape)
shape - output shapepublic static <T extends Dataset> T zeros(T dataset)
T - dataset subclassdataset - inputpublic static <T extends Dataset> T zeros(T dataset, int... shape)
T - dataset subclassdataset - inputshape - output shapepublic static <T extends Dataset> T zeros(Class<T> clazz, int... shape)
T - dataset sub-interfaceclazz - dataset sub-interfaceshape - output shapepublic static <T extends Dataset> T zeros(int itemSize, Class<T> clazz, int... shape)
T - dataset sub-interfaceitemSize - item size. If equal to 1, then non-compound dataset is returnedclazz - dataset sub-interfaceshape - output shapepublic static <T extends Dataset> T zeros(Dataset dataset, Class<T> clazz)
T - dataset subclassdataset - inputclazz - dataset classpublic static <T extends CompoundDataset> T compoundZeros(int itemSize, Class<T> clazz, int... shape)
T - compound dataset sub-interfaceitemSize - item sizeclazz - compound dataset sub-interfaceshape - output shapepublic static DoubleDataset ones(int... shape)
shape - output shapepublic static <T extends Dataset> T ones(T dataset)
T - dataset subclassdataset - inputpublic static <T extends Dataset> T ones(Class<T> clazz, int... shape)
T - dataset sub-interfaceclazz - dataset sub-interfaceshape - output shapepublic static <T extends Dataset> T ones(int itemSize, Class<T> clazz, int... shape)
T - dataset sub-interfaceitemSize - item size. If equal to 1, then non-compound dataset is returnedclazz - dataset sub-interfaceshape - output shapeCopyright © 2014–2022 Eclipse Foundation. All rights reserved.