public abstract class BaseNDArrayFactory extends Object implements NDArrayFactory
Modifier and Type | Field and Description |
---|---|
protected DataBuffer.Type |
dtype |
protected Level1 |
level1 |
protected Level2 |
level2 |
protected Level3 |
level3 |
protected char |
order |
C, FORTRAN
Modifier | Constructor and Description |
---|---|
|
BaseNDArrayFactory() |
protected |
BaseNDArrayFactory(DataBuffer.Type dtype,
char order) |
protected |
BaseNDArrayFactory(DataBuffer.Type dtype,
Character order)
Initialize with the given data type 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)
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.
|
IComplexNDArray |
complexFlatten(IComplexNDArray[] flatten) |
IComplexNDArray |
complexFlatten(List<IComplexNDArray> flatten) |
IComplexNDArray |
complexOnes(int columns)
Creates an ndarray
|
IComplexNDArray |
complexOnes(int[] shape)
Create an ndarray of ones
|
IComplexNDArray |
complexOnes(int rows,
int columns)
Creates an ndarray
|
IComplexNDArray |
complexScalar(Number value)
Create a scalar ndarray with the specified offset
|
IComplexNDArray |
complexScalar(Number value,
int offset)
Create a scalar ndarray with the specified offset
|
IComplexNDArray |
complexValueOf(int[] shape,
double value)
Creates an shape ndarray with the specified value
|
IComplexNDArray |
complexValueOf(int[] shape,
IComplexNumber value)
Creates an shape ndarray with the specified value
|
IComplexNDArray |
complexValueOf(int num,
double value)
Creates an 1 x num ndarray with the specified value
|
IComplexNDArray |
complexValueOf(int num,
IComplexNumber value)
Creates an 1 x num ndarray with the specified value
|
IComplexNDArray |
complexZeros(int columns)
Creates an ndarray
|
IComplexNDArray |
complexZeros(int[] shape)
Create an ndarray of ones
|
IComplexNDArray |
complexZeros(int rows,
int columns)
Creates a matrix of zeros
|
IComplexNDArray |
concat(int dimension,
IComplexNDArray... toConcat)
concatenate ndarrays along a dimension
|
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,
int 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,
int offset) |
abstract INDArray |
create(double[] data,
int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
INDArray |
create(double[] data,
int rows,
int columns,
int[] stride,
int 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 offset) |
INDArray |
create(float[] data,
int[] shape,
int[] stride,
char order,
int offset) |
abstract INDArray |
create(float[] data,
int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
INDArray |
create(float[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
INDArray |
create(int columns)
Creates a row vector with the specified number of columns
|
INDArray |
create(int[] shape)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
DataBuffer.Type dataType) |
INDArray |
create(int[] shape,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] shape,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
INDArray |
create(int[] data,
int[] shape,
int[] stride,
char order,
int offset) |
INDArray |
create(int[] ints,
int[] ints1,
int[] stride,
int offset) |
INDArray |
create(int[] shape,
int[] stride,
int offset,
char ordering) |
INDArray |
create(int rows,
int columns)
Creates an ndarray with the specified shape
|
INDArray |
create(int rows,
int columns,
char ordering) |
INDArray |
create(int rows,
int columns,
int[] stride)
Creates an ndarray with the specified shape
|
INDArray |
create(int rows,
int columns,
int[] stride,
int offset)
Creates an ndarray with the specified shape
|
abstract INDArray |
create(List<INDArray> list,
int[] shape)
Creates an ndarray with the specified shape
|
IComplexNDArray |
createComplex(double[] data)
Creates an ndarray with the specified data
|
IComplexNDArray |
createComplex(double[] data,
int[] shape)
Create an ndrray with the specified shape
|
IComplexNDArray |
createComplex(double[] data,
int[] shape,
int offset) |
IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride)
Create an ndrray with the specified shape
|
abstract IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
abstract IComplexNDArray |
createComplex(double[] data,
int[] shape,
int[] stride,
int offset,
char ordering)
Create a complex ndarray with the given data
|
IComplexNDArray |
createComplex(double[] data,
int[] shape,
int offset,
char ordering) |
IComplexNDArray |
createComplex(double[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(float[] data,
int[] shape)
Create an ndrray with the specified shape
|
IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride)
Create an ndrray with the specified shape
|
IComplexNDArray |
createComplex(float[] data,
int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(float[] data,
int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
abstract IComplexNDArray |
createComplex(IComplexNumber[] data,
int[] shape)
Create a complex ndarray from the passed in indarray
|
abstract IComplexNDArray |
createComplex(INDArray arr)
Create a complex ndarray from the passed in indarray
|
IComplexNDArray |
createComplex(int columns)
Creates an ndarray
|
IComplexNDArray |
createComplex(int[] shape)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(int[] shape,
int[] stride)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(int[] shape,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(int[] ints,
int[] ints1,
int[] stride,
int offset) |
IComplexNDArray |
createComplex(int[] shape,
int[] complexStrides,
int offset,
char ordering) |
IComplexNDArray |
createComplex(int rows,
int columns)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride)
Creates a complex ndarray with the specified shape
|
IComplexNDArray |
createComplex(int rows,
int columns,
int[] stride,
int offset)
Creates a complex ndarray with the specified shape
|
abstract IComplexNDArray |
createComplex(List<IComplexNDArray> arrs,
int[] shape)
Create a complex ndarray from the passed in indarray
|
abstract IComplexDouble |
createDouble(double real,
double imag)
Create an instance of a complex double
|
abstract IComplexFloat |
createFloat(float real,
float imag)
Create float
|
DataBuffer.Type |
dtype()
Returns the data type for this ndarray
|
INDArray |
eye(int n)
Create the identity ndarray
|
INDArray |
hstack(INDArray... arrs)
Concatenates two matrices horizontally.
|
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 |
linspace(int lower,
int upper,
int num)
Generate a linearly spaced vector
|
INDArray |
ones(int columns)
Creates a row vector with the specified number of columns
|
INDArray |
ones(int[] shape)
Create an ndarray of ones
|
INDArray |
ones(int rows,
int columns)
Creates a row vector with the specified number of columns
|
char |
order()
Returns the order for this ndarray for internal data storage
|
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(int rows,
int columns)
Create a random ndarray with the given shape using
the current time as the seed
|
INDArray |
rand(int rows,
int columns,
double min,
double max,
Random rng) |
INDArray |
rand(int rows,
int columns,
float min,
float max,
Random rng)
Generates a random matrix between min and max
|
INDArray |
rand(int rows,
int columns,
long seed)
Create a random ndarray with the given shape using the given rng
|
INDArray |
rand(int rows,
int columns,
Random r)
Create a random ndarray with the given shape using the given rng
|
INDArray |
randn(int[] shape)
Random normal using the current time stamp
as the seed
|
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(int rows,
int columns)
Random normal using the current time stamp
as the seed
|
INDArray |
randn(int rows,
int columns,
long seed)
Random normal using the specified seed
|
INDArray |
randn(int rows,
int 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,
int 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,
int offset)
Create a scalar nd array with the specified value and offset
|
IComplexNDArray |
scalar(IComplexDouble value)
Create a scalar nd array with the specified value and offset
|
IComplexNDArray |
scalar(IComplexDouble value,
int offset)
Create a scalar nd array with the specified value and offset
|
IComplexNDArray |
scalar(IComplexFloat value)
Create a scalar nd array with the specified value and offset
|
IComplexNDArray |
scalar(IComplexFloat value,
int offset)
Create a scalar nd array with the specified value and offset
|
IComplexNDArray |
scalar(IComplexNumber value)
Create a scalar ndarray with the specified offset
|
IComplexNDArray |
scalar(IComplexNumber value,
int offset)
Create a scalar ndarray with the specified offset
|
INDArray |
scalar(int value,
int 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,
int offset)
Create a scalar ndarray with the specified offset
|
void |
setDType(DataBuffer.Type dtype)
Sets the data type
|
void |
setOrder(char order)
Sets the order.
|
INDArray |
toFlattened(char order,
Collection<INDArray> matrices)
Returns a flattened ndarray with all elements in each ndarray
regardless of dimension.
|
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
|
protected static void |
validateConcat(int dimension,
INDArray... arrs) |
INDArray |
valueArrayOf(int[] shape,
double value)
Creates an ndarray with the specified value
as the only value in the ndarray
|
INDArray |
valueArrayOf(int rows,
int columns,
double value)
Creates a row vector with the specified number of columns
|
INDArray |
vstack(INDArray... arrs)
Concatenates two matrices vertically.
|
INDArray |
zeros(int columns)
Creates a row vector with the specified number of columns
|
INDArray |
zeros(int[] shape)
Create an ndarray of zeros
|
INDArray |
zeros(int rows,
int columns)
Creates a row vector with the specified number of columns
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createComplex, createLevel1, createLevel2, createLevel3
protected DataBuffer.Type dtype
protected char order
protected Level1 level1
protected Level2 level2
protected Level3 level3
public BaseNDArrayFactory()
protected BaseNDArrayFactory(DataBuffer.Type dtype, Character order)
dtype
- the data typeorder
- the ordering in memprotected BaseNDArrayFactory(DataBuffer.Type dtype, char order)
dtype
- the data typeorder
- the orderingpublic Level1 level1()
NDArrayFactory
level1
in interface NDArrayFactory
public Level2 level2()
NDArrayFactory
level2
in interface NDArrayFactory
public Level3 level3()
NDArrayFactory
level3
in interface NDArrayFactory
protected static void validateConcat(int dimension, INDArray... arrs)
public void setOrder(char order)
setOrder
in interface NDArrayFactory
order
- public INDArray rand(int[] shape, double min, double max, Random rng)
rand
in interface NDArrayFactory
public INDArray rand(int rows, int columns, double min, double max, Random rng)
rand
in interface NDArrayFactory
public void setDType(DataBuffer.Type dtype)
setDType
in interface NDArrayFactory
dtype
- public INDArray create(int[] shape, DataBuffer.Type dataType)
create
in interface NDArrayFactory
public char order()
order
in interface NDArrayFactory
public DataBuffer.Type dtype()
dtype
in interface NDArrayFactory
public INDArray linspace(int lower, int upper, int num)
linspace
in interface NDArrayFactory
lower
- upper boundupper
- lower boundnum
- the step sizepublic IComplexNDArray createComplex(int[] ints, int[] ints1, int[] stride, int offset)
createComplex
in interface NDArrayFactory
public INDArray create(int[] ints, int[] ints1, int[] stride, int offset)
create
in interface NDArrayFactory
public INDArray create(int rows, int 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, Collection<INDArray> matrices)
NDArrayFactory
toFlattened
in interface NDArrayFactory
order
- the order in which the ndarray values should be flattenedmatrices
- the ndarrays to flattenpublic INDArray toFlattened(char order, INDArray... matrices)
NDArrayFactory
toFlattened
in interface NDArrayFactory
matrices
- the matrices to flattenpublic INDArray eye(int 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)
arange
in interface NDArrayFactory
begin
- the begin of the rangeend
- the end of the rangepublic abstract IComplexFloat createFloat(float real, float imag)
createFloat
in interface NDArrayFactory
real
- real componentimag
- imag componentpublic abstract IComplexDouble createDouble(double real, double imag)
createDouble
in interface NDArrayFactory
real
- the real componentimag
- the imaginary componentpublic 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(int rows, int 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 abstract IComplexNDArray createComplex(INDArray arr)
createComplex
in interface NDArrayFactory
arr
- the arr to wrappublic abstract IComplexNDArray createComplex(IComplexNumber[] data, int[] shape)
createComplex
in interface NDArrayFactory
data
- the data to wrappublic abstract IComplexNDArray createComplex(List<IComplexNDArray> arrs, int[] shape)
createComplex
in interface NDArrayFactory
arrs
- the arr to wrappublic INDArray rand(int rows, int 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(int rows, int 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(int rows, int columns)
rand
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray randn(int rows, int 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(int rows, int columns)
randn
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the matrixpublic INDArray randn(int rows, int 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(int[] shape, long seed)
rand
in interface NDArrayFactory
shape
- the shape of the ndarrayseed
- the seed to usepublic INDArray rand(int[] shape)
rand
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray randn(int[] shape, Random r)
randn
in interface NDArrayFactory
shape
- the shape of the ndarrayr
- the random generator to usepublic INDArray randn(int[] shape)
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 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 IComplexNDArray createComplex(double[] data)
createComplex
in interface NDArrayFactory
data
- the number of columns in the row vectorpublic INDArray create(int columns)
create
in interface NDArrayFactory
columns
- the columns of the ndarraypublic IComplexNDArray createComplex(int columns)
createComplex
in interface NDArrayFactory
columns
- the number of columns in the row vectorpublic INDArray zeros(int rows, int columns)
zeros
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic IComplexNDArray complexZeros(int rows, int columns)
complexZeros
in interface NDArrayFactory
rows
- te number of rows in the matrixcolumns
- the number of columns in the row vectorpublic INDArray zeros(int columns)
zeros
in interface NDArrayFactory
columns
- the columns of the ndarraypublic IComplexNDArray complexZeros(int columns)
complexZeros
in interface NDArrayFactory
columns
- the number of columns in the row vectorpublic IComplexNDArray complexValueOf(int[] shape, IComplexNumber value)
complexValueOf
in interface NDArrayFactory
shape
- the shape of the ndarrayvalue
- the value to assignpublic IComplexNDArray complexValueOf(int num, double value)
complexValueOf
in interface NDArrayFactory
num
- the number of columnsvalue
- the value to assignpublic IComplexNDArray complexValueOf(int[] shape, double value)
complexValueOf
in interface NDArrayFactory
shape
- the shape of the ndarrayvalue
- the value to assignpublic IComplexNDArray complexValueOf(int num, IComplexNumber value)
complexValueOf
in interface NDArrayFactory
num
- the number of columnsvalue
- the value to assignpublic IComplexNDArray createComplex(int[] shape, int[] complexStrides, int offset, char ordering)
createComplex
in interface NDArrayFactory
public INDArray valueArrayOf(int[] shape, double value)
valueArrayOf
in interface NDArrayFactory
shape
- the shape of the ndarrayvalue
- the value to assignpublic INDArray create(int[] shape, int[] stride, int offset, char ordering)
create
in interface NDArrayFactory
public INDArray valueArrayOf(int rows, int 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(int rows, int columns)
ones
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the columns of the ndarraypublic IComplexNDArray complexOnes(int rows, int columns)
complexOnes
in interface NDArrayFactory
rows
- the number of rows in the matrixcolumns
- the number of columns in the row vectorpublic INDArray ones(int columns)
ones
in interface NDArrayFactory
columns
- the columns of the ndarraypublic IComplexNDArray complexOnes(int columns)
complexOnes
in interface NDArrayFactory
columns
- the number of columns in the row vectorpublic 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 IComplexNDArray concat(int dimension, IComplexNDArray... toConcat)
concat
in interface NDArrayFactory
dimension
- the dimension to concatenate alongtoConcat
- the ndarrays to concatenatepublic IComplexNDArray complexFlatten(IComplexNDArray[] flatten)
complexFlatten
in interface NDArrayFactory
public IComplexNDArray complexFlatten(List<IComplexNDArray> flatten)
complexFlatten
in interface NDArrayFactory
public 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 IComplexNDArray complexZeros(int[] shape)
complexZeros
in interface NDArrayFactory
shape
- the shape of the ndarraypublic INDArray ones(int[] shape)
ones
in interface NDArrayFactory
shape
- the shape of the ndarraypublic IComplexNDArray complexOnes(int[] shape)
complexOnes
in interface NDArrayFactory
shape
- the shape of the ndarraypublic IComplexNDArray createComplex(float[] data, int rows, int columns, int[] stride, int offset)
createComplex
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 INDArray create(float[] data, int rows, int columns, int[] stride, int 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 IComplexNDArray createComplex(float[] data, int[] shape, int[] stride, int offset)
createComplex
in interface NDArrayFactory
data
- the data to use with the ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic abstract INDArray create(float[] data, int[] shape, int[] stride, int 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 IComplexNDArray createComplex(double[] data, int[] shape)
createComplex
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic IComplexNDArray createComplex(float[] data, int[] shape)
createComplex
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraypublic IComplexNDArray createComplex(double[] data, int[] shape, int[] stride)
createComplex
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic IComplexNDArray createComplex(float[] data, int[] shape, int[] stride)
createComplex
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarraypublic IComplexNDArray createComplex(double[] data, int rows, int columns, int[] stride, int offset)
createComplex
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(double[] data, int rows, int columns, int[] stride, int 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 IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset)
createComplex
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic abstract INDArray create(double[] data, int[] shape, int[] stride, int 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 IComplexNDArray createComplex(int rows, int columns, int[] stride, int offset)
createComplex
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 rows, int columns, int[] stride, int 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 IComplexNDArray createComplex(int[] shape, int[] stride, int offset)
createComplex
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic INDArray create(int[] shape, int[] stride, int offset)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarraypublic IComplexNDArray createComplex(int rows, int columns, int[] stride)
createComplex
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic INDArray create(int rows, int columns, int[] stride)
create
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraystride
- the stride for the ndarraypublic IComplexNDArray createComplex(int[] shape, int[] stride)
createComplex
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic INDArray create(int[] shape, int[] stride)
create
in interface NDArrayFactory
shape
- the shape of the ndarraystride
- the stride for the ndarraypublic IComplexNDArray createComplex(int rows, int columns)
createComplex
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic INDArray create(int rows, int columns)
create
in interface NDArrayFactory
rows
- the rows of the ndarraycolumns
- the columns of the ndarraypublic IComplexNDArray createComplex(int[] shape)
createComplex
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, int offset)
scalar
in interface NDArrayFactory
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic IComplexNDArray complexScalar(Number value, int offset)
complexScalar
in interface NDArrayFactory
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic IComplexNDArray complexScalar(Number value)
complexScalar
in interface NDArrayFactory
value
- the value to initialize the scalar withpublic INDArray scalar(float value, int offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic INDArray scalar(double value, int offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic INDArray scalar(int value, int 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 IComplexNDArray scalar(IComplexNumber value, int offset)
scalar
in interface NDArrayFactory
value
- the value to initialize the scalar withoffset
- the offset of the ndarraypublic IComplexNDArray scalar(IComplexFloat value)
scalar
in interface NDArrayFactory
value
- the value of the scalarpublic IComplexNDArray scalar(IComplexDouble value)
scalar
in interface NDArrayFactory
value
- the value of the scalarpublic IComplexNDArray scalar(IComplexNumber value)
scalar
in interface NDArrayFactory
value
- the value to initialize the scalar withpublic IComplexNDArray scalar(IComplexFloat value, int offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic IComplexNDArray scalar(IComplexDouble value, int offset)
scalar
in interface NDArrayFactory
value
- the value of the scalaroffset
- the offset of the ndarraypublic abstract IComplexNDArray createComplex(double[] data, int[] shape, int[] stride, int offset, char ordering)
createComplex
in interface NDArrayFactory
data
- the data to use with tne ndarrayshape
- the shape of the ndarraystride
- the stride for the ndarrayoffset
- the offset of the ndarrayordering
- the ordering for the ndarraypublic IComplexNDArray createComplex(double[] data, int[] shape, int offset, char ordering)
createComplex
in interface NDArrayFactory
data
- shape
- offset
- ordering
- public IComplexNDArray createComplex(double[] data, int[] shape, int offset)
createComplex
in interface NDArrayFactory
data
- shape
- offset
- public INDArray create(float[] data, int[] shape, int offset)
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, int 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, int offset)
create
in interface NDArrayFactory
public INDArray create(DataBuffer buffer, int[] shape, int[] stride, char order, int offset)
create
in interface NDArrayFactory
public INDArray create(int[] data, int[] shape, int[] stride, char order, int offset)
create
in interface NDArrayFactory
Copyright © 2015. All Rights Reserved.