public abstract class NativeRandom extends Object implements Random
| Modifier and Type | Field and Description |
|---|---|
protected long |
amplifier |
protected NativeRandomDeallocator |
deallocator |
protected boolean |
generated |
protected long |
generation |
protected org.bytedeco.javacpp.LongPointer |
hostPointer |
protected boolean |
isDestroyed |
protected double |
mean |
protected NativeOps |
nativeOps |
protected long |
numberOfElements |
protected NativePack |
pack |
protected AtomicInteger |
position |
protected long |
seed |
protected DataBuffer |
stateBuffer |
protected org.bytedeco.javacpp.Pointer |
statePointer |
protected double |
stdDev |
protected double |
u0 |
protected double |
u1 |
protected double |
z0 |
protected double |
z1 |
| Constructor and Description |
|---|
NativeRandom() |
NativeRandom(long seed) |
NativeRandom(long seed,
long numberOfElements) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBufferSize() |
abstract org.bytedeco.javacpp.PointerPointer |
getExtraPointers() |
long |
getGeneration() |
int |
getPosition() |
long |
getSeed() |
DataBuffer |
getStateBuffer()
This method returns pointer to RNG buffer
|
org.bytedeco.javacpp.Pointer |
getStatePointer()
This method returns pointer to RNG state structure.
|
abstract void |
init() |
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
double |
nextDouble() |
INDArray |
nextDouble(char order,
int[] shape) |
INDArray |
nextDouble(int[] shape) |
float |
nextFloat() |
INDArray |
nextFloat(char order,
int[] shape) |
INDArray |
nextFloat(int[] shape) |
double |
nextGaussian() |
INDArray |
nextGaussian(char order,
int[] shape) |
INDArray |
nextGaussian(int[] shape) |
int |
nextInt() |
int |
nextInt(int to) |
INDArray |
nextInt(int[] shape) |
INDArray |
nextInt(int n,
int[] shape) |
long |
nextLong() |
void |
reSeed() |
void |
reSeed(long amplifier) |
void |
setSeed(int seed) |
void |
setSeed(int[] seed) |
void |
setSeed(long seed) |
protected NativeOps nativeOps
protected DataBuffer stateBuffer
protected org.bytedeco.javacpp.Pointer statePointer
protected long seed
protected long amplifier
protected long generation
protected long numberOfElements
protected AtomicInteger position
protected org.bytedeco.javacpp.LongPointer hostPointer
protected boolean isDestroyed
protected NativeRandomDeallocator deallocator
protected double z0
protected double z1
protected double u0
protected double u1
protected boolean generated
protected double mean
protected double stdDev
protected NativePack pack
public NativeRandom()
public NativeRandom(long seed)
public NativeRandom(long seed,
long numberOfElements)
public long getBufferSize()
public int getPosition()
public long getGeneration()
public abstract void init()
public abstract org.bytedeco.javacpp.PointerPointer getExtraPointers()
public boolean nextBoolean()
nextBoolean in interface Randompublic double nextDouble()
nextDouble in interface Randompublic double nextGaussian()
nextGaussian in interface Randompublic INDArray nextGaussian(int[] shape)
nextGaussian in interface Randompublic INDArray nextGaussian(char order, int[] shape)
nextGaussian in interface Randompublic INDArray nextDouble(int[] shape)
nextDouble in interface Randompublic INDArray nextDouble(char order, int[] shape)
nextDouble in interface Randompublic INDArray nextFloat(char order, int[] shape)
public org.bytedeco.javacpp.Pointer getStatePointer()
getStatePointer in interface Randompublic DataBuffer getStateBuffer()
getStateBuffer in interface Randompublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2017. All Rights Reserved.