implicit final class LumAICommonRandomWrapper extends AnyVal
- Alphabetic
- By Inheritance
- LumAICommonRandomWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LumAICommonRandomWrapper(random: Random)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def choice[A](xs: TraversableOnce[A]): A
- def choice[A](xs: Array[A]): A
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
nextBytes(count: Int): Array[Byte]
Creates an array of random bytes.
-
def
nextDouble(startInclusive: Double, endInclusive: Double): Double
Returns a random double within the specified range.
-
def
nextExponential(lambda: Double): Double
Exponential distribution.
Exponential distribution. lambda is 1.0 divided by the desired mean. It should be nonzero. Returned values range from 0 to positive infinity if lambda is positive, and from negative infinity to 0 if lambda is negative.
-
def
nextFloat(startInclusive: Float, endInclusive: Float): Float
Returns a random float within the specified range.
-
def
nextGaussian(mu: Double, sigma: Double): Double
Gaussian distribution.
Gaussian distribution. mu is the mean, and sigma is the standard deviation.
-
def
nextInt(startInclusive: Int, endExclusive: Int): Int
Returns a random integer within the specified range.
-
def
nextLogNormal(mu: Double, sigma: Double): Double
Log normal distribution.
Log normal distribution. If you take the natural logarithm of this distribution, you’ll get a normal distribution with mean mu and standard deviation sigma. mu can have any value, and sigma must be greater than zero.
-
def
nextLong(startInclusive: Long, endExclusive: Long): Long
Returns a random long within the specified range.
- def nextNormal(mu: Double, sigma: Double): Double
-
def
nextPareto(alpha: Double): Double
Pareto distribution.
Pareto distribution. alpha is the shape parameter.
-
def
nextTriangular(low: Double, high: Double, mode: Double): Double
Triangular distribution.
Triangular distribution. Continuous distribution bounded by given lower and upper limits, and having a given mode value in-between.
-
def
nextWeibull(alpha: Double, beta: Double): Double
Weibull distribution.
Weibull distribution. alpha is the scale parameter and beta is the shape parameter.
- val random: Random
- def randomAlphabetic(count: Int): String
- def randomAlphanumeric(count: Int): String
- def randomAscii(count: Int): String
- def randomNumeric(count: Int): String
- def randomString(count: Int, chars: String): String
- def randomString(count: Int, chars: Array[Char]): String
- def randomString(count: Int): String
- def sample[A, CC[X] <: TraversableOnce[X]](xs: CC[A], k: Int, withReplacement: Boolean = false)(implicit cbf: CanBuildFrom[CC[A], A, CC[A]]): CC[A]
- def sample[A](xs: Array[A], k: Int, withReplacement: Boolean)(implicit arg0: ClassTag[A]): Array[A]
- def sample[A](xs: Array[A], k: Int)(implicit arg0: ClassTag[A]): Array[A]
- def shuffleArray[A](xs: Array[A])(implicit arg0: ClassTag[A]): Array[A]
-
def
toString(): String
- Definition Classes
- Any