ScoreTransformOp

Class of transformation operations which can be applied to score values (or more generally doubles).

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard

Clips a score between the specified range.

Link copied to clipboard
data class Scale(val ratio: Double?) : ScoreTransformOp

Scales a score by the specified ratio.

Link copied to clipboard
data class SetIf(val value: Double?, val predicate: (Double?) -> Boolean = { true }) : ScoreTransformOp

Sets the score to a constant value if it matches a predicate.

Link copied to clipboard
data class Transform(val transform: (Double?) -> Double?) : ScoreTransformOp

Transforms a score to another using the specified transform function.

Functions

Link copied to clipboard
open fun <V : Any> andThen(p0: Function<in Double?, out V>): Function<Double?, V>
Link copied to clipboard
open override fun apply(input: Double?): Double?
Link copied to clipboard
open fun <V : Any> compose(p0: Function<in V, out Double?>): Function<V, Double?>
Link copied to clipboard
abstract operator override fun invoke(input: Double?): Double?

Applies this transformation function onto the input.