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 Dataset> |
createComplexDataset(Class<T> 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 Dataset> |
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(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(Class, double, double, 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) |
public DatasetFactory()
public static DoubleDataset createRange(double stop)
stop
- stop value is not includedpublic static DoubleDataset createRange(double start, double stop, double step)
start
- stop
- stop value is not includedstep
- spacing between items@Deprecated public static Dataset createRange(double stop, int dtype)
createRange(Class, double)
stop
- stop value is not includeddtype
- @Deprecated public static Dataset createRange(double start, double stop, double step, int dtype)
createRange(Class, double, double, double)
start
- stop
- stop value is not includedstep
- spacing between itemsdtype
- @Deprecated public static CompoundDataset createRange(int itemSize, double stop, int dtype)
createRange(Class, double, double, double)
itemSize
- stop
- stop value is not includeddtype
- @Deprecated public static CompoundDataset createRange(int itemSize, double start, double stop, double step, int dtype)
createRange(Class, double, double, double)
itemSize
- start
- stop
- stop value is not includedstep
- spacing between itemsdtype
- public 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 Number@Deprecated public static Dataset createFromObject(int dtype, Object obj)
createFromObject(Class, Object, int...)
dtype
- obj
- 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
- obj
- 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
- dtype
- obj
- can be a Java list, array or Numbershape
- can be nullIllegalArgumentException
- if dataset type is not knownpublic static Dataset createFromList(List<?> objectList)
objectList
- @Deprecated public static Dataset createFromList(int dtype, List<?> objectList)
createFromList(Class, List)
dtype
- objectList
- public static CompoundDataset createCompoundDataset(Object... objects)
objects
- @Deprecated public static CompoundDataset createCompoundDataset(int dtype, Object... objects)
createCompoundDataset(Class, Object...)
dtype
- objects
- @Deprecated public static CompoundDataset createComplexDataset(int dtype, Object real, Object imag)
createComplexDataset(Class, Object, Object)
dtype
- real
- imag
- public static DoubleDataset zeros(int... shape)
shape
- @Deprecated public static Dataset zeros(int[] shape, int dtype)
zeros(Class, int...)
shape
- dtype
- @Deprecated public static Dataset zeros(int itemSize, int[] shape, int dtype)
zeros(int, Class, int...)
itemSize
- if equal to 1, then non-compound dataset is returnedshape
- dtype
- @Deprecated public static CompoundDataset compoundZeros(int itemSize, int[] shape, int dtype)
compoundZeros(int, Class, int...)
itemSize
- shape
- dtype
- public static <T extends Dataset> T zeros(T dataset)
dataset
- @Deprecated public static Dataset zeros(Dataset dataset, int dtype)
zeros(Dataset, Class)
dataset
- dtype
- public static <T extends Dataset> T ones(T dataset)
dataset
- @Deprecated public static Dataset ones(Dataset dataset, int dtype)
ones(Dataset, Class)
dataset
- dtype
- public static DoubleDataset ones(int... shape)
shape
- @Deprecated public static Dataset ones(int[] shape, int dtype)
ones(Class, int...)
shape
- dtype
- @Deprecated public static Dataset ones(int itemSize, int[] shape, int dtype)
ones(Class, int...)
itemSize
- if equal to 1, then non-compound dataset is returnedshape
- dtype
- @Deprecated public static Dataset createLinearSpace(double start, double stop, int length, int dtype)
createLinearSpace(Class, double, double, int)
start
- stop
- stop value is includedlength
- number of pointsdtype
- public static <T extends Dataset> T createLinearSpace(Class<T> clazz, double start, double stop, int length)
clazz
- dataset classstart
- stop
- stop value is includedlength
- number of points@Deprecated public static Dataset createLogSpace(double start, double stop, int length, double base, int dtype)
createLogSpace(Class, double, double, int, double)
start
- stop
- stop value is includedlength
- number of pointsbase
- dtype
- public static <T extends Dataset> T createLogSpace(Class<T> clazz, double start, double stop, int length, double base)
clazz
- dataset classstart
- stop
- stop value is includedlength
- number of pointsbase
- public static <T extends Dataset> T createRange(Class<T> clazz, double stop)
clazz
- dataset classstop
- stop value is not includedpublic static <T extends Dataset> T createRange(Class<T> clazz, double start, double stop, double step)
clazz
- dataset classstart
- stop
- stop value is not includedstep
- spacing between itemspublic static <T extends CompoundDataset> T createRange(int itemSize, Class<T> clazz, double stop)
itemSize
- clazz
- compound dataset classstop
- stop value is not includedpublic static <T extends CompoundDataset> T createRange(int itemSize, Class<T> clazz, double start, double stop, double step)
itemSize
- clazz
- compound dataset classstart
- stop
- stop value is not includedstep
- spacing between itemspublic static <T extends Dataset> T createFromObject(Class<T> clazz, Object obj)
clazz
- dataset classobj
- 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)
clazz
- dataset classobj
- 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)
itemSize
- clazz
- dataset classobj
- can be a Java list, array or Numbershape
- can be nullpublic static <T extends Dataset> T createFromList(Class<T> clazz, List<?> objectList)
clazz
- dataset classobjectList
- public static <T extends Dataset> T createCompoundDataset(Class<T> clazz, Object... objects)
clazz
- dataset classobjects
- public static <T extends Dataset> T createComplexDataset(Class<T> clazz, Object real, Object imag)
clazz
- dataset classreal
- imag
- public static <T extends Dataset> T zeros(Class<T> clazz, int... shape)
clazz
- dataset classshape
- public static <T extends Dataset> T zeros(int itemSize, Class<T> clazz, int... shape)
itemSize
- if equal to 1, then non-compound dataset is returnedclazz
- dataset classshape
- public static <T extends Dataset> T zeros(Dataset dataset, Class<T> clazz)
dataset
- clazz
- dataset classpublic static <T extends CompoundDataset> T compoundZeros(int itemSize, Class<T> clazz, int... shape)
itemSize
- clazz
- compound dataset classshape
- public static <T extends Dataset> T ones(Class<T> clazz, int... shape)
clazz
- dataset classshape
- public static <T extends Dataset> T ones(int itemSize, Class<T> clazz, int... shape)
itemSize
- if equal to 1, then non-compound dataset is returnedclazz
- dataset classshape
- Copyright © 2014–2019 Eclipse Foundation. All rights reserved.