InvalidParameterException

Thrown when a parameter value is outside the valid range for the requested operation.

This covers cases such as a negative standard deviation for a distribution, a probability outside 0, 1, or mismatched array sizes. The message describes which parameter was invalid and what value was received.

Example:

try {
NormalDistribution(mu = 0.0, sigma = -1.0) // sigma must be positive
} catch (e: InvalidParameterException) {
println(e.message) // "sigma must be positive, got -1.0"
}

Parameters

message

a description of the parameter constraint that was violated.

Constructors

Link copied to clipboard
constructor(message: String)