Class Generate


  • public class Generate
    extends PrimitiveTensorFunction
    An indexed tensor whose values are generated by a function
    Author:
    bratseth
    • Constructor Detail

      • Generate

        public Generate​(TensorType type,
                        java.util.function.Function<java.util.List<java.lang.Long>,​java.lang.Double> generator)
        Creates a generated tensor
        Parameters:
        type - the type of the tensor
        generator - the function generating values from a list of numbers specifying the indexes of the tensor cell which will receive the value
        Throws:
        java.lang.IllegalArgumentException - if any of the tensor dimensions are not indexed bound