public class NewAxis extends Object implements INDArrayIndex
| Constructor and Description |
|---|
NewAxis() |
| Modifier and Type | Method and Description |
|---|---|
long |
current()
Return the current index
without incrementing the counter
|
long |
end()
The ending for this index
|
boolean |
hasNext()
Returns true if there is another element
in the index to iterate over
otherwise false
|
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
|
long |
length()
The total length of this index (end - start)
|
long |
next()
Returns the next index
|
long |
offset()
The start of this index
|
void |
reset() |
void |
reverse()
Reverse the indexes
|
void |
setInterval(boolean isInterval) |
long |
stride()
The stride for the index (most of the time will be 1)
|
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 long current()
INDArrayIndexcurrent in interface INDArrayIndexpublic boolean hasNext()
INDArrayIndexhasNext in interface INDArrayIndexpublic long next()
INDArrayIndexnext in interface INDArrayIndexpublic void reverse()
INDArrayIndexreverse in interface INDArrayIndexpublic boolean isInterval()
INDArrayIndexisInterval in interface INDArrayIndexpublic void setInterval(boolean isInterval)
setInterval 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 void reset()
reset in interface INDArrayIndexCopyright © 2018. All rights reserved.