public class SpecifiedIndex extends Object implements INDArrayIndex
| Modifier and Type | Class and Description |
|---|---|
class |
SpecifiedIndex.SingleGenerator |
class |
SpecifiedIndex.SparseSingleGenerator |
static class |
SpecifiedIndex.SparseSpecifiedIndexesGenerator
A generator for
SpecifiedIndex for
Itertools.product(Generator)
to iterate
over an array given a set of iterators |
static class |
SpecifiedIndex.SpecifiedIndexesGenerator
A generator for
SpecifiedIndex for
Itertools.product(Generator)
to iterate
over an array given a set of iterators |
| Constructor and Description |
|---|
SpecifiedIndex(int... indexes) |
SpecifiedIndex(long... indexes) |
| Modifier and Type | Method and Description |
|---|---|
long |
end()
The ending for this index
|
net.ericaro.neoitertools.Generator<List<Long>> |
generator() |
void |
init(INDArray arr,
int dimension)
Init the index wrt
the dimension and the given nd array
|
void |
init(INDArray arr,
long begin,
int dimension)
Init the index wrt
the dimension and the given nd array
|
void |
init(long begin,
long end)
Initiailize based on the specified begin and end
|
void |
init(long begin,
long end,
long max) |
boolean |
isInterval()
Returns true
if the index is an interval
|
static net.ericaro.neoitertools.Generator<List<List<Long>>> |
iterate(INDArrayIndex... indexes)
Iterate over a cross product of the
coordinates
|
static net.ericaro.neoitertools.Generator<List<List<Long>>> |
iterateOverSparse(INDArrayIndex... indexes)
Iterate over a cross product of the
coordinates
|
long |
length()
The total length of this index (end - start)
|
long |
offset()
The start of this index
|
void |
reverse()
Reverse the indexes
|
net.ericaro.neoitertools.Generator<List<Long>> |
sparseGenerator() |
long |
stride()
The stride for the index (most of the time will be 1)
|
public SpecifiedIndex(int... indexes)
public SpecifiedIndex(long... indexes)
public long end()
INDArrayIndexend in interface INDArrayIndexpublic long offset()
INDArrayIndexoffset in interface INDArrayIndexpublic long length()
INDArrayIndexlength in interface INDArrayIndexpublic long stride()
INDArrayIndexstride in interface INDArrayIndexpublic void reverse()
INDArrayIndexreverse in interface INDArrayIndexpublic boolean isInterval()
INDArrayIndexisInterval in interface INDArrayIndexpublic void init(INDArray arr, long begin, int dimension)
INDArrayIndexinit in interface INDArrayIndexarr - the array to initialize onbegin - the beginning indexdimension - the dimension to initialize onpublic void init(INDArray arr, int dimension)
INDArrayIndexinit in interface INDArrayIndexarr - the array to initialize ondimension - the dimension to initialize onpublic void init(long begin,
long end,
long max)
init in interface INDArrayIndexpublic void init(long begin,
long end)
INDArrayIndexinit in interface INDArrayIndexpublic static net.ericaro.neoitertools.Generator<List<List<Long>>> iterate(INDArrayIndex... indexes)
indexes - the coordinates to iterate over.
Each element of the array should be of opType SpecifiedIndex
otherwise it will end up throwing an exceptionpublic static net.ericaro.neoitertools.Generator<List<List<Long>>> iterateOverSparse(INDArrayIndex... indexes)
indexes - the coordinates to iterate over.
Each element of the array should be of opType SpecifiedIndex
otherwise it will end up throwing an exceptionCopyright © 2021. All rights reserved.