public class ThreadSafeArrayHolder extends Object implements ArrayHolder
| Constructor and Description |
|---|
ThreadSafeArrayHolder(boolean lazyInit) |
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
arrayNames() |
INDArray |
getArray(@NonNull String name) |
boolean |
hasArray(@NonNull String name) |
void |
initFrom(ArrayHolder arrayHolder)
Initialize from the specified array holder.
|
INDArray |
removeArray(@NonNull String name)
Remove the array from the ArrayHolder, returning it (if it exists)
|
void |
rename(@NonNull String from,
@NonNull String to)
Rename the entry with the specified name
|
void |
setArray(@NonNull String name,
@NonNull INDArray array)
Set the array for the specified name (new array, or replace if it already exists)
|
int |
size() |
public ThreadSafeArrayHolder(boolean lazyInit)
lazyInit - If true: use lazy initialization for DeviceLocalNDArraypublic boolean hasArray(@NonNull
@NonNull String name)
hasArray in interface ArrayHolderpublic INDArray getArray(@NonNull @NonNull String name)
getArray in interface ArrayHoldername - Name of the array to getpublic void setArray(@NonNull
@NonNull String name,
@NonNull
@NonNull INDArray array)
ArrayHoldersetArray in interface ArrayHoldername - Name of the arrayarray - Array to setpublic INDArray removeArray(@NonNull @NonNull String name)
ArrayHolderremoveArray in interface ArrayHoldername - Name of the array to returnpublic int size()
size in interface ArrayHolderpublic void initFrom(ArrayHolder arrayHolder)
ArrayHolderinitFrom in interface ArrayHolderarrayHolder - Array holder to initialize this based onpublic Collection<String> arrayNames()
arrayNames in interface ArrayHolderpublic void rename(@NonNull
@NonNull String from,
@NonNull
@NonNull String to)
ArrayHolderrename in interface ArrayHolderfrom - Original nameto - New nameCopyright © 2021. All rights reserved.