ExceedanceEstimator

class ExceedanceEstimator(thresholds: DoubleArray = doubleArrayOf(1.0), name: String? = null) : Collector

Tabulates the proportion and frequency for a random variable X > a(i) where a(i) are thresholds.

Author

rossetti

Parameters

name

the name of the estimator

thresholds

the thresholds

Constructors

Link copied to clipboard
constructor(vararg thresholds: Double)
constructor(thresholds: DoubleArray = doubleArrayOf(1.0), name: String? = null)

Properties

Link copied to clipboard

Gets the count of the number of the observations.

Link copied to clipboard
open override val emitter: Emitter<Double>
Link copied to clipboard

the array of counts for each threshold

Link copied to clipboard
open override val id: Int
Link copied to clipboard
open override var label: String?
Link copied to clipboard
open override var lastValue: Double
Link copied to clipboard
open override val name: String
Link copied to clipboard
Link copied to clipboard

the array of proportions for each threshold

Link copied to clipboard
open override var value: Double
Link copied to clipboard

2-d array with 2 rows and numThreshold columns row0 holds the thresholds row1 holds the frequencies

Link copied to clipboard

2-d array with 2 rows and numThreshold columns row0 holds the thresholds row1 holds the proportions

Functions

Link copied to clipboard
open override fun attachObserver(observer: ObserverIfc<Double>)

Allows the adding (attaching) of an observer to the observable

Link copied to clipboard
open fun collect(obs: Boolean)

Collects on the boolean value true = 1.0, false = 0.0

open fun collect(observations: BooleanArray)
open fun collect(observations: DoubleArray)
open fun collect(observations: IntArray)
open fun collect(observations: LongArray)

Collects on the values in the supplied array.

open fun collect(fn: () -> Double)

Collect on the double value return by the function

open fun collect(obs: Int)

Collects on the Int value

open fun collect(obs: Long)

Collects on the Long value

open fun collect(observations: Collection<Double>)

Collects on all the values in the supplied collection.

open fun collect(v: GetValueIfc)

Collects on the values returned by the supplied GetValueIfc

open override fun collect(obs: Double)

Collect on the supplied value. Double.NaN, Double.NEGATIVE_INFINITY, and Double.POSITIVE_INFINITY values are counted as missing. Null values are not permitted.

Link copied to clipboard
open override fun countObservers(): Int

Returns how many observers are currently attached to the observable

Link copied to clipboard
open override fun detachAllObservers()

Detaches all the observers from the observable

Link copied to clipboard
open override fun detachObserver(observer: ObserverIfc<Double>)

Allows the deletion (removing) of an observer from the observable

Link copied to clipboard
Link copied to clipboard
open override fun isAttached(observer: ObserverIfc<Double>): Boolean

Returns true if the observer is already attached

Link copied to clipboard
fun <T> Observable<T>.observe(block: (T?) -> Unit)
Link copied to clipboard
Link copied to clipboard
open override fun reset()

Resets the collector as if no observations had been collected.

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