public abstract class NDArrayIndexer
extends java.lang.Object
| Constructor and Description |
|---|
NDArrayIndexer() |
| Modifier and Type | Method and Description |
|---|---|
NDArray |
get(NDArray array,
NDIndex index)
Returns a subarray at the given index.
|
abstract NDArray |
get(NDArray array,
NDIndexFullPick fullPick)
Returns a subarray by picking the elements.
|
abstract NDArray |
get(NDArray array,
NDIndexFullSlice fullSlice)
Returns a subarray at the slice.
|
void |
set(NDArray array,
NDIndexBooleans indices,
NDArray value)
Sets the values of the array at the boolean locations with an array.
|
abstract void |
set(NDArray array,
NDIndexFullSlice fullSlice,
NDArray value)
Sets the values of the array at the fullSlice with an array.
|
abstract void |
set(NDArray array,
NDIndexFullSlice fullSlice,
java.lang.Number value)
Sets the values of the array at the fullSlice with a number.
|
void |
set(NDArray array,
NDIndex index,
NDArray value)
Sets the values of the array at the index locations with an array.
|
void |
set(NDArray array,
NDIndex index,
java.lang.Number value)
Sets the values of the array at the index locations with a number.
|
void |
setScalar(NDArray array,
NDIndex index,
java.lang.Number value)
Sets a scalar value in the array at the indexed location.
|
public abstract NDArray get(NDArray array, NDIndexFullPick fullPick)
array - the array to get fromfullPick - the elements to pickpublic abstract NDArray get(NDArray array, NDIndexFullSlice fullSlice)
array - the array to get fromfullSlice - the fullSlice index of the arraypublic NDArray get(NDArray array, NDIndex index)
array - the array to get fromindex - the index to getpublic abstract void set(NDArray array, NDIndexFullSlice fullSlice, NDArray value)
array - the array to setfullSlice - the fullSlice of the index to set in the arrayvalue - the value to set withpublic void set(NDArray array, NDIndexBooleans indices, NDArray value)
array - the array to setindices - a boolean array where true indicates values to updatevalue - the value to set with when condition is truepublic void set(NDArray array, NDIndex index, NDArray value)
array - the array to setindex - the index to set at in the arrayvalue - the value to set withpublic abstract void set(NDArray array, NDIndexFullSlice fullSlice, java.lang.Number value)
array - the array to setfullSlice - the fullSlice of the index to set in the arrayvalue - the value to set withpublic void set(NDArray array, NDIndex index, java.lang.Number value)
array - the array to setindex - the index to set at in the arrayvalue - the value to set withpublic void setScalar(NDArray array, NDIndex index, java.lang.Number value)
array - the array to setindex - the index to set at in the arrayvalue - the value to set withjava.lang.IllegalArgumentException - if the index does not point to a scalar value in the array