public class NDArrayMath extends Object
Modifier and Type | Method and Description |
---|---|
static int |
lengthPerSlice(INDArray arr)
Return the length of a slice
|
static int |
lengthPerSlice(INDArray arr,
int... dimension)
The number of elements in a slice
along a set of dimensions
|
static int |
mapIndexOntoTensor(int index,
INDArray arr,
int... rank)
This maps an index of a vector
on to a vector in the matrix that can be used
for indexing in to a tensor
|
static int |
mapIndexOntoVector(int index,
INDArray arr)
This maps an index of a vector
on to a vector in the matrix that can be used
for indexing in to a tensor
|
static int |
matricesPerSlice(INDArray arr)
The number of vectors
in each slice of an ndarray.
|
static int |
numVectors(INDArray arr)
Return the number of vectors for an array
the number of vectors for an array
|
static int |
offsetForSlice(INDArray arr,
int slice)
Compute the offset for a given slice
|
static int |
sliceOffsetForTensor(int index,
INDArray arr,
int[] tensorShape)
calculates the offset for a tensor
|
static int |
tensorsPerSlice(INDArray arr,
int[] tensorShape)
Computes the tensors per slice
given a tensor shape and array
|
static int |
vectorsPerSlice(INDArray arr)
The number of vectors
in each slice of an ndarray.
|
static int |
vectorsPerSlice(INDArray arr,
int... rank)
The number of vectors
in each slice of an ndarray.
|
public static int offsetForSlice(INDArray arr, int slice)
arr
- the array to compute
the offset frmslice
- the slice to compute the offset forpublic static int lengthPerSlice(INDArray arr, int... dimension)
arr
- the array
to calculate the length per slice fordimension
- the dimensions to do the calculations alongpublic static int lengthPerSlice(INDArray arr)
arr
- the array to get the length of a slice forpublic static int numVectors(INDArray arr)
arr
- the array to calculate the number of vectors forpublic static int vectorsPerSlice(INDArray arr)
arr
- the array to
get the number
of vectors per slice forpublic static int tensorsPerSlice(INDArray arr, int[] tensorShape)
arr
- the array to get the tensors per slice fortensorShape
- the desired tensor shapepublic static int matricesPerSlice(INDArray arr)
arr
- the array to
get the number
of vectors per slice forpublic static int vectorsPerSlice(INDArray arr, int... rank)
arr
- the array to
get the number
of vectors per slice forrank
- the dimensions to get the number of vectors per slice forpublic static int sliceOffsetForTensor(int index, INDArray arr, int[] tensorShape)
index
- arr
- tensorShape
- public static int mapIndexOntoTensor(int index, INDArray arr, int... rank)
index
- the index to maparr
- the array to use
for indexingrank
- the dimensions to compute a slice forpublic static int mapIndexOntoVector(int index, INDArray arr)
index
- the index to maparr
- the array to use
for indexingCopyright © 2016. All Rights Reserved.