public abstract class NativeRandom extends Object implements Random
| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
currentPosition |
protected boolean |
generated |
protected double |
mean |
protected NativeOps |
nativeOps |
protected long |
seed |
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() |
abstract org.bytedeco.javacpp.PointerPointer |
getExtraPointers() |
long |
getPosition() |
org.bytedeco.javacpp.Pointer |
getStatePointer()
This method returns pointer to RNG state structure.
|
abstract void |
init() |
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
abstract double |
nextDouble() |
INDArray |
nextDouble(char order,
int[] shape) |
INDArray |
nextDouble(char order,
long[] shape) |
INDArray |
nextDouble(int[] shape) |
INDArray |
nextDouble(long[] shape) |
abstract float |
nextFloat() |
INDArray |
nextFloat(char order,
int[] shape) |
INDArray |
nextFloat(char order,
long[] shape) |
INDArray |
nextFloat(int[] shape) |
INDArray |
nextFloat(long[] shape) |
double |
nextGaussian() |
INDArray |
nextGaussian(char order,
int[] shape) |
INDArray |
nextGaussian(char order,
long[] shape) |
INDArray |
nextGaussian(int[] shape) |
INDArray |
nextGaussian(long[] shape) |
int |
nextInt(int to) |
INDArray |
nextInt(int[] shape) |
int |
nextInt(int a,
int n) |
INDArray |
nextInt(int n,
int[] shape) |
INDArray |
nextInt(int n,
long[] shape) |
INDArray |
nextInt(long[] shape) |
void |
reSeed() |
void |
reSeed(long amplifier) |
void |
setSeed(int seed) |
void |
setSeed(int[] seed) |
protected NativeOps nativeOps
protected org.bytedeco.javacpp.Pointer statePointer
protected AtomicLong currentPosition
protected double z0
protected double z1
protected double u0
protected double u1
protected boolean generated
protected double mean
protected double stdDev
protected long seed
public NativeRandom()
public NativeRandom(long seed)
public NativeRandom(long seed,
long numberOfElements)
public abstract void init()
public abstract org.bytedeco.javacpp.PointerPointer getExtraPointers()
public boolean nextBoolean()
nextBoolean in interface Randompublic abstract double nextDouble()
nextDouble in interface Randompublic double nextGaussian()
nextGaussian in interface Randompublic INDArray nextGaussian(int[] shape)
nextGaussian in interface Randompublic INDArray nextGaussian(long[] shape)
nextGaussian in interface Randompublic INDArray nextGaussian(char order, int[] shape)
nextGaussian in interface Randompublic INDArray nextGaussian(char order, long[] shape)
nextGaussian in interface Randompublic INDArray nextDouble(int[] shape)
nextDouble in interface Randompublic INDArray nextDouble(long[] shape)
nextDouble in interface Randompublic INDArray nextDouble(char order, int[] shape)
nextDouble in interface Randompublic INDArray nextDouble(char order, long[] shape)
nextDouble in interface Randompublic INDArray nextFloat(char order, int[] shape)
public INDArray nextFloat(char order, long[] shape)
public org.bytedeco.javacpp.Pointer getStatePointer()
getStatePointer in interface Randompublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic long getPosition()
getPosition in interface RandomCopyright © 2022. All rights reserved.