Package org.nd4j.linalg.factory
Class RandomFactory
- java.lang.Object
-
- org.nd4j.linalg.factory.RandomFactory
-
public class RandomFactory extends Object
-
-
Constructor Summary
Constructors Constructor Description RandomFactory(Class randomClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Random
getNewRandomInstance()
This method returns new onject implementing Random interface, initialized with System.currentTimeMillis() as seedRandom
getNewRandomInstance(long seed)
This method returns new onject implementing Random interface, initialized with seed valueRandom
getNewRandomInstance(long seed, long size)
This method returns a new object implementingRandom
interface, initialized with seed value, with size of elements in bufferRandom
getRandom()
This method returns Random implementation instance associated with calling thread
-
-
-
Constructor Detail
-
RandomFactory
public RandomFactory(Class randomClass)
-
-
Method Detail
-
getRandom
public Random getRandom()
This method returns Random implementation instance associated with calling thread- Returns:
- object implementing Random interface
-
getNewRandomInstance
public Random getNewRandomInstance()
This method returns new onject implementing Random interface, initialized with System.currentTimeMillis() as seed- Returns:
- object implementing Random interface
-
getNewRandomInstance
public Random getNewRandomInstance(long seed)
This method returns new onject implementing Random interface, initialized with seed value- Parameters:
seed
- seed for this rng object- Returns:
- object implementing Random interface
-
getNewRandomInstance
public Random getNewRandomInstance(long seed, long size)
This method returns a new object implementingRandom
interface, initialized with seed value, with size of elements in buffer- Parameters:
seed
- rng seedsize
- size of underlying buffer- Returns:
- object implementing Random interface
-
-