org.eclipse.january.dataset

## Class DatasetFactory

- java.lang.Object
- - org.eclipse.january.dataset.DatasetFactory

-     public class DatasetFactory
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DatasetFactory()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T extends CompoundDataset> T` | `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> T` | `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> T` | `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> T` | `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> T` | `createFromObject(Class<T> clazz, Object obj)` Create a dataset from object
    `static <T extends Dataset> T` | `createFromObject(Class<T> clazz, Object obj, int... shape)` Create a dataset from object
    `static <T extends Dataset> T` | `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> T` | `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> T` | `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> T` | `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> T` | `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> T` | `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> T` | `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> T` | `ones(Class<T> clazz, int... shape)`
    `static <T extends Dataset> T` | `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> T` | `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> T` | `ones(T dataset)`
    `static <T extends Dataset> T` | `zeros(Class<T> clazz, int... shape)`
    `static <T extends Dataset> T` | `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> T` | `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> T` | `zeros(T dataset)`
    `static <T extends Dataset> T` | `zeros(T dataset, int... shape)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DatasetFactory

          public DatasetFactory()

  - ### Method Detail

    - #### createRange

          @Deprecated
          public static Dataset createRange(double stop,
                                                        int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createRange(Class, double)`
      Create dataset with items ranging from 0 up to given stop in steps of 1
      Parameters:
        `stop` - stop value is not included
        `dtype` - dataset type
      Returns:
        a new dataset of given shape and type, filled with values determined by parameters

    - #### createRange

          @Deprecated
          public 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)`
      Create dataset with items ranging from given start up to given stop in given steps
      Parameters:
        `start` - start value start value
        `stop` - stop value is not included
        `step` - spacing between items
        `dtype` - dataset type
      Returns:
        a new 1D dataset of given type, filled with values determined by parameters

    - #### createRange

          @Deprecated
          public static CompoundDataset createRange(int itemSize,
                                                                double stop,
                                                                int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createRange(int, Class, double)`
      Create compound dataset with items of given size ranging from 0 up to given stop in steps of 1
      Parameters:
        `itemSize` - item size
        `stop` - stop value is not included
        `dtype` - dataset type
      Returns:
        a new dataset of given shape and type, filled with values determined by parameters

    - #### createRange

          @Deprecated
          public 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)`
      Create compound dataset with items of given size ranging from given start up to given stop in given steps
      Parameters:
        `itemSize` - item size
        `start` - start value
        `stop` - stop value is not included
        `step` - spacing between items
        `dtype` - dataset type
      Returns:
        a new 1D dataset of given type, filled with values determined by parameters

    - #### createFromObject

          @Deprecated
          public static Dataset createFromObject(int dtype,
                                                             Object obj)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createFromObject(Class, Object, int...)`
      Create a dataset from object
      Parameters:
        `dtype` - dataset type
        `obj` - can be a Java list, array or Number
      Returns:
        dataset
      Throws:
        `IllegalArgumentException` - if dataset type is not known

    - #### createFromObject

          @Deprecated
          public static Dataset createFromObject(int dtype,
                                                             Object obj,
                                                             int... shape)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createFromObject(Class, Object, int...)`
      Create a dataset from object
      Parameters:
        `dtype` - dataset type
        `obj` - can be a Java list, array or Number
        `shape` - can be null
      Returns:
        dataset
      Throws:
        `IllegalArgumentException` - if dataset type is not known

    - #### createFromObject

          @Deprecated
          public 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...)`
      Create a dataset from object
      Parameters:
        `itemSize` - item size
        `dtype` - dataset type
        `obj` - can be a Java list, array or Number
        `shape` - can be null
      Returns:
        dataset
      Throws:
        `IllegalArgumentException` - if dataset type is not known

    - #### createFromList

          @Deprecated
          public static Dataset createFromList(int dtype,
                                                           List<?> objectList)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createFromList(Class, List)`
      Create dataset of given type from list
      Parameters:
        `dtype` - dataset type
        `objectList` - inputs
      Returns:
        dataset filled with values from list

    - #### createCompoundDataset

          @Deprecated
          public static CompoundDataset createCompoundDataset(int dtype,
                                                                          Object... objects)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createCompoundDataset(Class, Object...)`
      Create compound dataset of given type from given parts
      Parameters:
        `dtype` - dataset type
        `objects` - inputs
      Returns:
        compound dataset

    - #### createComplexDataset

          @Deprecated
          public static CompoundDataset createComplexDataset(int dtype,
                                                                         Object real,
                                                                         Object imag)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `createComplexDataset(Class, Object, Object)`
      Create complex dataset of given type from real and imaginary parts
      Parameters:
        `dtype` - dataset type
        `real` - real part
        `imag` - imaginary part
      Returns:
        complex dataset

    - #### zeros

          @Deprecated
          public static Dataset zeros(int[] shape,
                                                  int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `zeros(Class, int...)`
      Parameters:
        `shape` - output shape
        `dtype` - dataset type
      Returns:
        a new dataset of given shape and type, filled with zeros

    - #### zeros

          @Deprecated
          public static Dataset zeros(int itemSize,
                                                  int[] shape,
                                                  int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `zeros(int, Class, int...)`
      Parameters:
        `itemSize` - item size if equal to 1, then non-compound dataset is returned
        `shape` - output shape
        `dtype` - dataset type
      Returns:
        a new dataset of given item size, shape and type, filled with zeros

    - #### compoundZeros

          @Deprecated
          public static CompoundDataset compoundZeros(int itemSize,
                                                                  int[] shape,
                                                                  int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `compoundZeros(int, Class, int...)`
      Parameters:
        `itemSize` - item size
        `shape` - output shape
        `dtype` - dataset type
      Returns:
        a new dataset of given item size, shape and type, filled with zeros
      Since:
        2.0

    - #### zeros

          @Deprecated
          public static Dataset zeros(Dataset dataset,
                                                  int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `zeros(Dataset, Class)`
      Create a new dataset of same shape as input dataset, filled with zeros. If dtype is not explicitly compound then an elemental dataset is created
      Parameters:
        `dataset` - input
        `dtype` - dataset type
      Returns:
        a new dataset

    - #### ones

          @Deprecated
          public static Dataset ones(Dataset dataset,
                                                 int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `ones(Dataset, Class)`
      Create a new dataset of same shape as input dataset, filled with ones. If dtype is not explicitly compound then an elemental dataset is created
      Parameters:
        `dataset` - input
        `dtype` - dataset type
      Returns:
        a new dataset

    - #### ones

          @Deprecated
          public static Dataset ones(int[] shape,
                                                 int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `ones(Class, int...)`
      Parameters:
        `shape` - output shape
        `dtype` - dataset type
      Returns:
        a new dataset of given shape and type, filled with ones

    - #### ones

          @Deprecated
          public static Dataset ones(int itemSize,
                                                 int[] shape,
                                                 int dtype)

      Deprecated. Please use the class-based methods in DatasetFactory, such as `ones(Class, int...)`
      Parameters:
        `itemSize` - item size if equal to 1, then non-compound dataset is returned
        `shape` - output shape
        `dtype` - dataset type
      Returns:
        a new dataset of given item size, shape and type, filled with ones

    - #### createLinearSpace

          @Deprecated
          public 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)`
      Create a 1D dataset of linearly spaced values in closed interval
      Parameters:
        `start` - start value
        `stop` - stop value is included
        `length` - number of points
        `dtype` - dataset type
      Returns:
        dataset with linearly spaced values

    - #### createLogSpace

          @Deprecated
          public 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)`
      Create a 1D dataset of logarithmically spaced values in closed interval. The base value is used to determine the factor between values: factor = base ** step, where step is the interval between linearly spaced sequence of points
      Parameters:
        `start` - start value
        `stop` - stop value is included
        `length` - number of points
        `base` - for exponentiation
        `dtype` - dataset type
      Returns:
        dataset with logarithmically spaced values

    - #### createLinearSpace

          public static <T extends Dataset> T createLinearSpace(Class<T> clazz,
                                                                double start,
                                                                double stop,
                                                                int length)

      Create a 1D dataset of linearly spaced values in closed interval
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `start` - start value
        `stop` - stop value is included
        `length` - number of points
      Returns:
        dataset with linearly spaced values

    - #### createLogSpace

          public static <T extends Dataset> T createLogSpace(Class<T> clazz,
                                                             double start,
                                                             double stop,
                                                             int length,
                                                             double base)

      Create a 1D dataset of logarithmically spaced values in closed interval. The base value is used to determine the factor between values: factor = base ** step, where step is the interval between linearly spaced sequence of points
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `start` - start value
        `stop` - stop value is included
        `length` - number of points
        `base` - for exponentiation
      Returns:
        dataset with logarithmically spaced values

    - #### createRange

          public static DoubleDataset createRange(double stop)

      Create dataset with items ranging from 0 up to given stop in steps of 1
      Parameters:
        `stop` - stop value is not included
      Returns:
        a new double dataset of given shape and type, filled with values determined by parameters

    - #### createRange

          public static DoubleDataset createRange(double start,
                                                  double stop,
                                                  double step)

      Create dataset with items ranging from given start up to given stop in given steps
      Parameters:
        `start` - start value
        `stop` - stop value is not included
        `step` - spacing between items
      Returns:
        a new 1D dataset of given type, filled with values determined by parameters
      Since:
        2.1

    - #### createRange

          public static <T extends Dataset> T createRange(Class<T> clazz,
                                                          double stop)

      Create dataset with items ranging from 0 up to given stop in steps of 1
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `stop` - stop value is not included
      Returns:
        a new dataset of given shape and class, filled with values determined by parameters

    - #### createRange

          public static <T extends Dataset> T 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
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `start` - start value
        `stop` - stop value is not included
        `step` - spacing between items
      Returns:
        a new 1D dataset of given class, filled with values determined by parameters

    - #### createRange

          public static <T extends CompoundDataset> T createRange(int itemSize,
                                                                  Class<T> clazz,
                                                                  double stop)

      Create compound dataset with items ranging from 0 up to given stop in steps of 1
      Type Parameters:
        `T` - compound dataset sub-interface
      Parameters:
        `itemSize` - item size
        `clazz` - compound dataset sub-interface
        `stop` - stop value is not included
      Returns:
        a new 1D dataset of given class, filled with values determined by parameters
      Since:
        2.1

    - #### createRange

          public static <T extends CompoundDataset> T 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
      Type Parameters:
        `T` - compound dataset sub-interface
      Parameters:
        `itemSize` - item size
        `clazz` - compound dataset sub-interface
        `start` - start value
        `stop` - stop value is not included
        `step` - spacing between items
      Returns:
        a new 1D dataset of given class, filled with values determined by parameters
      Since:
        2.1

    - #### createFromObject

          public static Dataset createFromObject(Object obj)

      Create a dataset from object (automatically detect dataset type)
      Parameters:
        `obj` - can be Java list, array or Number
      Returns:
        dataset

    - #### createFromObject

          public static Dataset createFromObject(Object obj,
                                                 int... shape)

      Create a dataset from object (automatically detect dataset type)
      Parameters:
        `obj` - can be Java list, array or Number
        `shape` - can be null
      Returns:
        dataset

    - #### createFromObject

          public static Dataset createFromObject(boolean isUnsigned,
                                                 Object obj)

      Create a dataset from object (automatically detect dataset type)
      Parameters:
        `isUnsigned` - if true, interpret integer values as unsigned by increasing element bit width if required
        `obj` - can be a Java list, array or Number
      Returns:
        dataset

    - #### createFromList

          public static Dataset createFromList(List<?> objectList)

      Create dataset of appropriate type from list
      Parameters:
        `objectList` - inputs for each item
      Returns:
        dataset filled with values from list

    - #### createCompoundDataset

          public static CompoundDataset createCompoundDataset(Object... objects)

      Create compound dataset of given type from given parts
      Parameters:
        `objects` - inputs across dataset for each element
      Returns:
        compound dataset

    - #### createFromObject

          public static <T extends Dataset> T createFromObject(Class<T> clazz,
                                                               Object obj)

      Create a dataset from object
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `obj` - can be a Java list, array or Number
      Returns:
        dataset
      Throws:
        `IllegalArgumentException` - if dataset class is not known
      Since:
        2.1

    - #### createFromObject

          public static <T extends Dataset> T createFromObject(Class<T> clazz,
                                                               Object obj,
                                                               int... shape)

      Create a dataset from object
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `obj` - can be a Java list, array or Number
        `shape` - can be null
      Returns:
        dataset

    - #### createFromObject

          public static <T extends Dataset> T createFromObject(int itemSize,
                                                               Class<T> clazz,
                                                               Object obj,
                                                               int... shape)

      Create a compound dataset from object
      Type Parameters:
        `T` - compound dataset sub-interface
      Parameters:
        `itemSize` - item size
        `clazz` - compound dataset sub-interface
        `obj` - can be a Java list, array or Number
        `shape` - can be null
      Returns:
        dataset

    - #### createFromList

          public static <T extends Dataset> T createFromList(Class<T> clazz,
                                                             List<?> objectList)

      Create dataset of given class from list
      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `objectList` - inputs for each item
      Returns:
        dataset filled with values from list

    - #### createCompoundDataset

          public static <T extends CompoundDataset> T createCompoundDataset(Class<T> clazz,
                                                                            Object... objects)

      Create compound dataset of given class from given parts
      Type Parameters:
        `T` - compound dataset sub-interface
      Parameters:
        `clazz` - compound dataset sub-interface
        `objects` - inputs across dataset for each element
      Returns:
        compound dataset
      Since:
        2.3

    - #### createComplexDataset

          public static <T extends CompoundDataset> T createComplexDataset(Class<? extends Dataset> clazz,
                                                                           Object real,
                                                                           Object imag)

      Create complex dataset of given class from real and imaginary parts
      Type Parameters:
        `T` - complex dataset sub-interface
      Parameters:
        `clazz` - complex dataset sub-interface
        `real` - real part
        `imag` - imaginary part
      Returns:
        complex dataset
      Since:
        2.3

    - #### zeros

          public static DoubleDataset zeros(int... shape)

      Parameters:
        `shape` - output shape
      Returns:
        a new double dataset of given shape, filled with zeros

    - #### zeros

          public static <T extends Dataset> T zeros(T dataset)

      Type Parameters:
        `T` - dataset subclass
      Parameters:
        `dataset` - input
      Returns:
        a new dataset of same shape and class as input dataset, filled with zeros

    - #### zeros

          public static <T extends Dataset> T zeros(T dataset,
                                                    int... shape)

      Type Parameters:
        `T` - dataset subclass
      Parameters:
        `dataset` - input
        `shape` - output shape
      Returns:
        a new dataset of same class as input dataset and given shape, filled with zeros
      Since:
        2.3

    - #### zeros

          public static <T extends Dataset> T zeros(Class<T> clazz,
                                                    int... shape)

      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `shape` - output shape
      Returns:
        a new dataset of given shape and class, filled with zeros

    - #### zeros

          public static <T extends Dataset> T zeros(int itemSize,
                                                    Class<T> clazz,
                                                    int... shape)

      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `itemSize` - item size. If equal to 1, then non-compound dataset is returned
        `clazz` - dataset sub-interface
        `shape` - output shape
      Returns:
        a new dataset of given item size, shape and class, filled with zeros

    - #### zeros

          public static <T extends Dataset> T zeros(Dataset dataset,
                                                    Class<T> clazz)

      Type Parameters:
        `T` - dataset subclass
      Parameters:
        `dataset` - input
        `clazz` - dataset class
      Returns:
        a new dataset of given class with same shape as input dataset, filled with zeros

    - #### compoundZeros

          public static <T extends CompoundDataset> T compoundZeros(int itemSize,
                                                                    Class<T> clazz,
                                                                    int... shape)

      Type Parameters:
        `T` - compound dataset sub-interface
      Parameters:
        `itemSize` - item size
        `clazz` - compound dataset sub-interface
        `shape` - output shape
      Returns:
        a new compound dataset of given item size, shape and class, filled with zeros
      Since:
        2.0

    - #### ones

          public static DoubleDataset ones(int... shape)

      Parameters:
        `shape` - output shape
      Returns:
        a new double dataset of given shape, filled with ones

    - #### ones

          public static <T extends Dataset> T ones(T dataset)

      Type Parameters:
        `T` - dataset subclass
      Parameters:
        `dataset` - input
      Returns:
        a new dataset of same shape and class as input dataset, filled with ones

    - #### ones

          public static <T extends Dataset> T ones(Class<T> clazz,
                                                   int... shape)

      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `clazz` - dataset sub-interface
        `shape` - output shape
      Returns:
        a new dataset of given shape and class, filled with ones

    - #### ones

          public static <T extends Dataset> T ones(int itemSize,
                                                   Class<T> clazz,
                                                   int... shape)

      Type Parameters:
        `T` - dataset sub-interface
      Parameters:
        `itemSize` - item size. If equal to 1, then non-compound dataset is returned
        `clazz` - dataset sub-interface
        `shape` - output shape
      Returns:
        a new dataset of given item size, shape and class, filled with ones

    - #### ones

          public static <T extends Dataset> T ones(Dataset dataset,
                                                   Class<T> clazz)

      Type Parameters:
        `T` - dataset subclass
      Parameters:
        `dataset` - input
        `clazz` - dataset class
      Returns:
        a new dataset of given class with same shape as input dataset, filled with ones

Copyright © 2014–2022 Eclipse Foundation. All rights reserved.