public abstract class BaseNDArrayFactory extends Object implements NDArrayFactory
Modifier and Type | Field and Description |
---|---|
protected Blas |
blas |
protected Lapack |
lapack |
protected Level1 |
level1 |
protected Level2 |
level2 |
protected Level3 |
level3 |
protected char |
order |
C, FORTRAN
Modifier | Constructor and Description |
---|---|
|
BaseNDArrayFactory() |
protected |
BaseNDArrayFactory(DataType dtype,
char order) |
protected |
BaseNDArrayFactory(DataType dtype,
Character order)
Initialize with the given data opType and ordering
The ndarray factory will use this for
|
Modifier and Type | Method and Description |
---|---|
INDArray |
appendBias(INDArray... vectors)
Merge the vectors and append a bias.
|
INDArray |
arange(double begin,
double end,
double step)
Array of evenly spaced values.
|
INDArray |
bilinearProducts(INDArray curr,
INDArray in)
Returns a column vector where each entry is the nth bilinear
product of the nth slices of the two tensors.
|
Blas |
blas()
Return extra blas operations
|
INDArray |
concat(int dimension,
INDArray... toConcat)
concatenate ndarrays along a dimension
|
void |
copy(INDArray a,
INDArray b)
Copy a to b
|
INDArray |
create(DataBuffer buffer,
int[] shape,
int[] stride,
char order,
long offset) |
INDArray |
create(double[] data)
Creates a row vector with the data
|
INDArray |
create(double[] data,
char order) |
INDArray |
create(double[] data,
int[] shape)
Create an ndrray with the specified shape
|
INDArray |
create(double[] data,
int[] shape,
int[] stride,
char order,
long offset) |
abstract INDArray |
create(double[] data,
int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(double[] data,
long[] shape) |
INDArray |
create(double[] data,
long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(float[] data)
Creates a row vector with the data
|
INDArray |
create(float[] data,
char order) |
INDArray |
create(float[] data,
int[] shape)
Create an ndrray with the specified shape
|
INDArray |
create(float[] data,
int[] shape,
char ordering) |
INDArray |
create(float[] data,
int[] shape,
int[] stride,
char order,
long offset) |
abstract INDArray |
create(float[] data,
int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(float[] data,
int[] shape,
long offset) |
INDArray |
create(float[] data,
long[] shape) |
abstract INDArray |
create(float[] data,
long[] shape,
long[] stride,
char order,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(float[] data,
long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
DataType dataType,
MemoryWorkspace workspace) |
INDArray |
create(int[] shape,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] data,
int[] shape,
int[] stride,
char order,
long offset) |
INDArray |
create(int[] ints,
int[] ints1,
int[] stride,
long offset) |
INDArray |
create(int[] shape,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
int[] stride,
long offset,
char ordering) |
abstract INDArray |
create(List<INDArray> list,
int[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
create(long[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(long[] shape,
long[] stride) |
INDArray |
create(long[] shape,
long[] stride,
long offset) |
INDArray |
create(long[] shape,
long[] stride,
long offset,
char ordering) |
INDArray |
create(long rows,
long columns)
Creates an ndarray with the specified shape
|
INDArray |
create(long rows,
long columns,
char ordering) |
INDArray |
create(long rows,
long columns,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(long rows,
long columns,
int[] stride,
long offset)
Creates an ndarray with the specified shape
|
DataType |
dtype()
Returns the data opType for this ndarray
|
INDArray |
eye(long n)
Create the identity ndarray
|
INDArray |
hstack(INDArray... arrs)
Concatenates two matrices horizontally.
|
Lapack |
lapack() |
Level1 |
level1()
Return the level 1 blas operations
|
Level2 |
level2()
Return the level 2 blas operations
|
Level3 |
level3()
Return the level 3 blas operations
|
INDArray |
ones(int[] shape)
Create an ndarray of ones
|
INDArray |
ones(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
ones(long[] shape) |
INDArray |
ones(long rows,
long columns)
Creates a row vector with the specified number of columns
|
char |
order()
Returns the order for this ndarray for internal data storage
|
INDArray |
pullRows(INDArray source,
int sourceDimension,
int[] indexes)
This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes
|
INDArray |
pullRows(INDArray source,
int sourceDimension,
int[] indexes,
char order)
This method produces concatenated array, that consist from tensors, fetched from source array, against some dimension and specified indexes
|
INDArray |
rand(char order,
int[] shape)
Create a random ndarray with the given shape and order
|
INDArray |
rand(char order,
long[] shape)
Create a random ndarray with the given shape
and specified output order
|
INDArray |
rand(char order,
long rows,
long columns)
Create a random (uniform 0-1) NDArray with the specified shape and order
|
INDArray |
rand(int[] shape)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(int[] shape,
Distribution r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(int[] shape,
double min,
double max,
Random rng) |
INDArray |
rand(int[] shape,
float min,
float max,
Random rng)
Generates a random matrix between min and max
|
INDArray |
rand(int[] shape,
long seed)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(int[] shape,
Random r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(long[] shape)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(long[] shape,
double min,
double max,
Random rng) |
INDArray |
rand(long[] shape,
float min,
float max,
Random rng) |
INDArray |
rand(long[] shape,
long seed) |
INDArray |
rand(long[] shape,
Random r) |
INDArray |
rand(long rows,
long columns)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(long rows,
long columns,
double min,
double max,
Random rng) |
INDArray |
rand(long rows,
long columns,
float min,
float max,
Random rng)
Generates a random matrix between min and max
|
INDArray |
rand(long rows,
long columns,
long seed)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(long rows,
long columns,
Random r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
randn(char order,
int[] shape)
Random normal using the current time stamp
as the seed
|
INDArray |
randn(char order,
long[] shape)
Random normal N(0,1) with the specified shape and order
|
INDArray |
randn(char order,
long rows,
long columns)
Generate a random normal N(0,1) with the specified order and shape
|
INDArray |
randn(int[] shape)
Random normal N(0,1) with the specified shape and
|
INDArray |
randn(int[] shape,
long seed)
Random normal using the specified seed
|
INDArray |
randn(int[] shape,
Random r)
Random normal using the given rng
|
INDArray |
randn(long[] shape)
Random normal N(0,1) using the current time stamp
as the seed
|
INDArray |
randn(long[] shape,
long seed)
Random normal using the specified seed
|
INDArray |
randn(long[] shape,
Random r) |
INDArray |
randn(long rows,
long columns)
Random normal using the current time stamp
as the seed
|
INDArray |
randn(long rows,
long columns,
long seed)
Random normal using the specified seed
|
INDArray |
randn(long rows,
long columns,
Random r)
Random normal using the given rng
|
INDArray |
reverse(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
INDArray |
rot(INDArray reverse)
Reverses the passed in matrix such that m[0] becomes m[m.length - 1] etc
|
void |
rot90(INDArray toRotate)
Rotate a matrix 90 degrees
|
INDArray |
scalar(double value)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(double value,
long offset)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(float value)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(float value,
long offset)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(int value,
long offset)
Create a scalar nd array with the specified value and offset
|
INDArray |
scalar(Number value)
Create a scalar ndarray with the specified offset
|
INDArray |
scalar(Number value,
long offset)
Create a scalar ndarray with the specified offset
|
void |
setDType(DataType dtype)
Sets the data opType
|
void |
setOrder(char order)
Sets the order.
|
INDArray |
toFlattened(char order,
INDArray... matrices)
Flatten all of the ndarrays in to one long vector
|
INDArray |
toFlattened(Collection<INDArray> matrices)
Returns a vector with all of the elements in every nd array
equal to the sum of the lengths of the ndarrays
|
INDArray |
toFlattened(INDArray... matrices)
Flatten all of the ndarrays in to one long vector
|
INDArray |
toFlattened(int length,
Iterator<? extends INDArray>... matrices)
Returns a flattened ndarray with all of the elements in each ndarray
regardless of dimension
|
INDArray |
trueScalar(DataType dataType,
Number value) |
INDArray |
trueScalar(Number value) |
INDArray |
trueVector(boolean[] data) |
INDArray |
trueVector(byte[] data) |
INDArray |
trueVector(double[] data) |
INDArray |
trueVector(float[] data) |
INDArray |
trueVector(int[] data) |
INDArray |
trueVector(long[] data) |
INDArray |
trueVector(short[] data) |
INDArray |
valueArrayOf(int[] shape,
double value)
Creates an ndarray with the specified value
as the only value in the ndarray
|
INDArray |
valueArrayOf(long[] shape,
double value) |
INDArray |
valueArrayOf(long rows,
long columns,
double value)
Creates a row vector with the specified number of columns
|
INDArray |
vstack(INDArray... arrs)
Concatenates two matrices vertically.
|
INDArray |
zeros(int[] shape)
Create an ndarray of zeros
|
INDArray |
zeros(long columns)
Creates a row vector with the specified number of columns
|
INDArray |
zeros(long[] shape) |
INDArray |
zeros(long rows,
long columns)
Creates a row vector with the specified number of columns
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accumulate, average, average, average, average, convertDataEx, convertDataEx, convertDataEx, convertDataEx, convertDataEx, convertToNumpy, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createBlas, createFromNpyFile, createFromNpyHeaderPointer, createFromNpyPointer, createFromNpzFile, createLapack, createLevel1, createLevel2, createLevel3, createSparseCOO, createSparseCOO, createSparseCOO, createSparseCOO, createSparseCOO, createSparseCOO, createSparseCOO, createSparseCSR, createSparseCSR, createSparseCSR, createUninitialized, createUninitialized, createUninitialized, createUninitializedDetached, createUninitializedDetached, empty, pullRows, pullRows, shuffle, shuffle, shuffle, sort, sort, sortCooIndices, specialConcat, tear, toFlattened
protected char order
protected Blas blas
protected Level1 level1
protected Level2 level2
protected Level3 level3
protected Lapack lapack
public BaseNDArrayFactory()
protected BaseNDArrayFactory(DataType dtype, Character order)
dtype
- the data opTypeorder
- the ordering in memprotected BaseNDArrayFactory(DataType dtype, char order)
dtype
- the data opTypeorder
- the orderingpublic Lapack lapack()
lapack
in interface NDArrayFactory
public Blas blas()
NDArrayFactory
blas
in interface NDArrayFactory
public Level1 level1()
NDArrayFactory
level1
in interface NDArrayFactory
public Level2 level2()
NDArrayFactory
level2
in interface NDArrayFactory
public Level3 level3()
NDArrayFactory
level3
in interface NDArrayFactory
public void setOrder(char order)
setOrder
in interface NDArrayFactory
order
- public INDArray rand(long[] shape, double min, double max, Random rng)
rand
in interface NDArrayFactory
public INDArray rand(int[] shape, double min, double max, Random rng)
rand
in interface NDArrayFactory
public INDArray rand(long rows, long columns, double min, double max, Random rng)
rand
in interface NDArrayFactory
public void setDType(DataType dtype)
setDType
in interface NDArrayFactory
dtype
- public INDArray create(int[] shape, DataType dataType, MemoryWorkspace workspace)
create
in interface NDArrayFactory
public char order()
order
in interface NDArrayFactory
public DataType dtype()
dtype
in interface NDArrayFactory
public INDArray create(int[] ints, int[] ints1, int[] stride, long offset)
create
in interface NDArrayFactory
public INDArray create(long rows, long columns, char ordering)
create
in interface NDArrayFactory
public INDArray toFlattened(Collection<INDArray> matrices)
toFlattened
in interface NDArrayFactory
matrices
- the ndarrays to getFloat a flattened representation ofpublic INDArray toFlattened(int length, Iterator<? extends INDArray>... matrices)
NDArrayFactory
toFlattened
in interface NDArrayFactory
matrices
- the ndarrays to usepublic INDArray bilinearProducts(INDArray curr, INDArray in)
bilinearProducts
in interface NDArrayFactory
public INDArray toFlattened(INDArray... matrices)
NDArrayFactory
toFlattened
in interface NDArrayFactory
matrices
- the matrices to flattenpublic INDArray toFlattened(char order, INDArray... matrices)
NDArrayFactory
toFlattened
in interface NDArrayFactory
matrices
- the matrices to flattenpublic INDArray eye(long n)
eye
in interface NDArrayFactory
n
- the number for the identitypublic void rot90(INDArray toRotate)
rot90
in interface NDArrayFactory
toRotate
- the matrix to rotatepublic INDArray rot(INDArray reverse)
rot
in interface NDArrayFactory
reverse
- the matrix to reversepublic INDArray reverse(INDArray reverse)
reverse
in interface NDArrayFactory
reverse
- the matrix to reversepublic INDArray arange(double begin, double end, double step)
arange
in interface NDArrayFactory
begin
- the begin of the rangeend
- the end of the rangepublic void copy(INDArray a, INDArray b)
copy
in interface NDArrayFactory
a
- the origin matrixb
- the destination matrixpublic INDArray rand(int[] shape, float min, float max, Random rng)
rand
in interface NDArrayFactory
shape
- the number of rows of the matrixmin
- the minimum numbermax
- the maximum numberrng
- the rng to usepublic INDArray rand(long[] shape, float min, float max, Random rng)
rand
in interface NDArrayFactory
public INDArray rand(long rows, long columns, float min, float max, Random rng)
rand
in interface NDArrayFactory
rows
- the number of rows of the matrixcolumns
- the number of columns in the matrixmin
- the minimum numbermax
- the maximum numberrng
- the rng to usepublic INDArray appendBias(INDArray... vectors)
appendBias
in interface NDArrayFactory
vectors
- the vectors to mergepublic INDArray rand(long rows, long columns, Random r)
rand
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixr
- the random generator to usepublic INDArray rand(long rows, long columns, long seed)
rand
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the columns of the ndarrayseed
- the seed to usepublic INDArray rand(long rows, long columns)
rand
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray rand(char order, long rows, long columns)
rand
in interface NDArrayFactory
order
- Order ('c' or 'f') of the output arrayrows
- Number of rows of the output arraycolumns
- Number of columns of the output arraypublic INDArray randn(long rows, long columns, Random r)
randn
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixr
- the random generator to usepublic INDArray randn(long rows, long columns)
randn
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray randn(char order, long rows, long columns)
randn
in interface NDArrayFactory
order
- Order of the output arrayrows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray randn(long rows, long columns, long seed)
randn
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray rand(int[] shape, Distribution r)
rand
in interface NDArrayFactory
shape
- the shape of the ndarrayr
- the random generator to usepublic INDArray rand(int[] shape, Random r)
rand
in interface NDArrayFactory
shape
- the shape of the ndarrayr
- the random generator to usepublic INDArray rand(long[] shape, Random r)
rand
in interface NDArrayFactory
public INDArray rand(int[] shape, long seed)
rand
in interface NDArrayFactory
shape
- the shape of the ndarrayseed
- the seed to usepublic INDArray rand(long[] shape, long seed)
rand
in interface NDArrayFactory
public INDArray rand(int[] shape)
rand
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray rand(long[] shape)
NDArrayFactory
rand
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray rand(char order, int[] shape)
rand
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray rand(char order, long[] shape)
NDArrayFactory
rand
in interface NDArrayFactory
order
- the order of the arrayshape
- the shape of the arraypublic INDArray randn(int[] shape, Random r)
randn
in interface NDArrayFactory
shape
- the shape of the ndarrayr
- the random generator to usepublic INDArray randn(long[] shape, Random r)
randn
in interface NDArrayFactory
public INDArray randn(char order, int[] shape)
randn
in interface NDArrayFactory
shape
- the shape of the ndarrayorder
- the order ('c' or 'f') of the output arraypublic INDArray randn(char order, long[] shape)
NDArrayFactory
randn
in interface NDArrayFactory
order
- the order ('c' or 'f') of the output arrayshape
- the shape of the ndarraypublic INDArray randn(int[] shape)
randn
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray randn(long[] shape)
NDArrayFactory
randn
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray randn(int[] shape, long seed)
randn
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray randn(long[] shape, long seed)
NDArrayFactory
randn
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray create(double[] data)
create
in interface NDArrayFactory
data
- the columns of the ndarraypublic INDArray create(float[] data)
create
in interface NDArrayFactory
data
- the columns of the ndarraypublic INDArray create(long columns)
create
in interface NDArrayFactory
columns
- the columns of the ndarraypublic INDArray zeros(long rows, long columns)
zeros
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic INDArray pullRows(INDArray source, int sourceDimension, int[] indexes, char order)
pullRows
in interface NDArrayFactory
source
- source tensorsourceDimension
- dimension of source tensorindexes
- indexes from source arrayorder
- order for result arraypublic INDArray pullRows(INDArray source, int sourceDimension, int[] indexes)
pullRows
in interface NDArrayFactory
source
- source tensorsourceDimension
- dimension of source tensorindexes
- indexes from source arraypublic INDArray zeros(long columns)
zeros
in interface NDArrayFactory
columns
- the columns of the ndarraypublic INDArray valueArrayOf(int[] shape, double value)
valueArrayOf
in interface NDArrayFactory
shape
- the shape of the ndarrayvalue
- the value to assignpublic INDArray valueArrayOf(long[] shape, double value)
valueArrayOf
in interface NDArrayFactory
public INDArray create(int[] shape, int[] stride, long offset, char ordering)
create
in interface NDArrayFactory
public INDArray valueArrayOf(long rows, long columns, double value)
valueArrayOf
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the columns of the ndarrayvalue
- the value to assignpublic INDArray ones(long rows, long columns)
ones
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the columns of the ndarraypublic INDArray ones(long columns)
ones
in interface NDArrayFactory
columns
- the columns of the ndarraypublic INDArray create(float[] data, int[] shape, char ordering)
create
in interface NDArrayFactory
public INDArray concat(int dimension, INDArray... toConcat)
concat
in interface NDArrayFactory
dimension
- the dimension to concatenate alongtoConcat
- the ndarrays to concatenatepublic INDArray hstack(INDArray... arrs)
hstack
in interface NDArrayFactory
arrs
- public INDArray vstack(INDArray... arrs)
vstack
in interface NDArrayFactory
arrs
- public INDArray zeros(int[] shape)
zeros
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray zeros(long[] shape)
zeros
in interface NDArrayFactory
public INDArray ones(int[] shape)
ones
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray ones(long[] shape)
ones
in interface NDArrayFactory
public INDArray create(float[] data, long rows, long columns, int[] stride, long offset)
create
in interface NDArrayFactory
data
- the data to use with the ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic abstract INDArray create(float[] data, int[] shape, int[] stride, long offset)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic INDArray create(double[] data, int[] shape)
create
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic INDArray create(float[] data, int[] shape)
create
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic INDArray create(float[] data, long[] shape)
create
in interface NDArrayFactory
public INDArray create(double[] data, long[] shape)
create
in interface NDArrayFactory
public INDArray create(double[] data, long rows, long columns, int[] stride, long offset)
create
in interface NDArrayFactory
data
- the data to use with tne ndarrayrows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic abstract INDArray create(double[] data, int[] shape, int[] stride, long offset)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic abstract INDArray create(List<INDArray> list, int[] shape)
create
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray create(long rows, long columns, int[] stride, long offset)
create
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic INDArray create(int[] shape, int[] stride, long offset)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic INDArray create(long[] shape, long[] stride, long offset)
create
in interface NDArrayFactory
public INDArray create(long rows, long columns, int[] stride)
create
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic INDArray create(long[] shape, long[] stride)
create
in interface NDArrayFactory
public INDArray create(long[] shape, long[] stride, long offset, char ordering)
create
in interface NDArrayFactory
public INDArray create(int[] shape, int[] stride)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic INDArray create(long rows, long columns)
create
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic INDArray create(long[] shape)
create
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray create(int[] shape)
create
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray scalar(Number value, long offset)
scalar
in interface NDArrayFactory
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic INDArray scalar(float value, long offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic INDArray scalar(double value, long offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic INDArray trueScalar(DataType dataType, Number value)
trueScalar
in interface NDArrayFactory
public INDArray trueScalar(Number value)
trueScalar
in interface NDArrayFactory
public INDArray trueVector(boolean[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(byte[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(short[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(int[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(long[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(float[] data)
trueVector
in interface NDArrayFactory
public INDArray trueVector(double[] data)
trueVector
in interface NDArrayFactory
public INDArray scalar(int value, long offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic INDArray scalar(Number value)
scalar
in interface NDArrayFactory
value
- the value to initialize the scalar withpublic INDArray scalar(float value)
scalar
in interface NDArrayFactory
value
- the value of the scalar
= * @return the scalar nd arraypublic INDArray scalar(double value)
scalar
in interface NDArrayFactory
value
- the value of the scalarpublic INDArray create(float[] data, int[] shape, long offset)
create
in interface NDArrayFactory
public abstract INDArray create(float[] data, long[] shape, long[] stride, char order, DataType dataType, MemoryWorkspace workspace)
create
in interface NDArrayFactory
public INDArray create(float[] data, char order)
create
in interface NDArrayFactory
public INDArray create(float[] data, int[] shape, int[] stride, char order, long offset)
create
in interface NDArrayFactory
public INDArray create(double[] data, char order)
create
in interface NDArrayFactory
public INDArray create(double[] data, int[] shape, int[] stride, char order, long offset)
create
in interface NDArrayFactory
public INDArray create(DataBuffer buffer, int[] shape, int[] stride, char order, long offset)
create
in interface NDArrayFactory
public INDArray create(int[] data, int[] shape, int[] stride, char order, long offset)
create
in interface NDArrayFactory
Copyright © 2019. All rights reserved.