RVData

@Serializable
data class RVData(val rvType: RVType, val parameters: Map<String, DoubleArray>) : ToJSONIfc

Represents data necessary to define a KSL random variable. The data class can be serialized and deserialized.

Constructors

Link copied to clipboard
constructor(rvType: RVType, parameters: Map<String, DoubleArray>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A map where keys are parameter names (as Strings) and values are their corresponding data (as DoubleArray). These parameters define the behavior of the random variable.

Link copied to clipboard

The type of the random variable, defined as an instance of the RVType enum, which specifies the random variable's distribution.

Functions

Link copied to clipboard

Converts the current RVData instance into an implementation of the RVariableIfc interface. The method populates the parameters of the random variable type from the parameters map and creates a new random variable instance based on those parameters.

Link copied to clipboard
open override fun toJson(): String
Link copied to clipboard
open override fun toString(): String