Class Long2LongArray
- java.lang.Object
-
- org.apache.commons.rng.simple.internal.Long2LongArray
-
- All Implemented Interfaces:
Seed2ArrayConverter<Long,long[]>,SeedConverter<Long,long[]>
public class Long2LongArray extends Object implements Seed2ArrayConverter<Long,long[]>
Uses aLongvalue to seed aSplitMix64RNG and create along[]with the requested number of random values.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description Long2LongArray(int size)Create an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long[]convert(Long seed)Converts seed from input type to output type.long[]convert(Long seed, int outputSize)Converts seed from input type to output type.
-
-
-
Constructor Detail
-
Long2LongArray
public Long2LongArray(int size)
Create an instance.- Parameters:
size- Size of the output array.
-
-
Method Detail
-
convert
public long[] convert(Long seed)
Converts seed from input type to output type.- Specified by:
convertin interfaceSeedConverter<Long,long[]>- Parameters:
seed- Original seed value.- Returns:
- the converted seed value.
-
convert
public long[] convert(Long seed, int outputSize)
Converts seed from input type to output type. The output type is expected to be an array.- Specified by:
convertin interfaceSeed2ArrayConverter<Long,long[]>- Parameters:
seed- Original seed value.outputSize- Output size.- Returns:
- the converted seed value.
- Since:
- 1.3
-
-