RMap

class RMap<K, V>(map: Map<K, V>, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider) : Map<K, V> , RElementIfc<V> , RElementInstanceIfc<V> (source)

Permits random sampling of the elements from the map. Elements are randomly sampled with equal probability based on the number of elements in the map. There must be at least one element to permit random sampling.

Constructors

Link copied to clipboard
constructor(map: Map<K, V>, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider)

Properties

Link copied to clipboard

If true, the stream will automatically participate in having its stream advanced to the next sub-stream via stream managers

Link copied to clipboard
open override var antithetic: Boolean

Tells the stream to start producing antithetic variates

Link copied to clipboard
open override val randomElement: V

Selected a value equally likely from the map

Link copied to clipboard
open override var resetStartStreamOption: Boolean

If true, the stream will automatically participate in having its stream reset to its start stream via stream managers

Link copied to clipboard
open override val streamNumber: Int

Functions

Link copied to clipboard
open override fun advanceToNextSubStream()

Positions the RNG at the beginning of its next substream

Link copied to clipboard
open override fun instance(streamNum: Int, rnStreamProvider: RNStreamProviderIfc): RElementIfc<V>
Link copied to clipboard
open override fun resetStartStream()

The resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.

Link copied to clipboard
open override fun resetStartSubStream()

Resets the position of the RNG at the start of the current substream