Metric

open class Metric(val name: String, val domain: Interval = Interval(0.0, Double.MAX_VALUE), val allowLowerLimitAdjustment: Boolean = true, val allowUpperLimitAdjustment: Boolean = true) : MetricIfc

This class serves as a base class for classes that implement the MetricIfc interface. A metric is figure of merit that characterizes the performance of a device, system, method, or entity, relative to its alternatives.

A metric has a required name to help identify it and an optional description to provide context for the metric. The domain of the metric represents the natural set of possible (real) legal values for its values. The default interval for the domain is 0.0 to Double.MAX_VALUE. The direction provides the context for evaluation based on the metric value, with two cases:

  1. bigger values are considered better or 2) smaller values are considered better. The default direction is smaller is better. The metric can have a description of its units of measure unitsOfMeasure.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, domain: Interval = Interval(0.0, Double.MAX_VALUE), allowLowerLimitAdjustment: Boolean = true, allowUpperLimitAdjustment: Boolean = true)

Properties

Link copied to clipboard
open override val allowLowerLimitAdjustment: Boolean = true

Indicates if the lower limit of the domain may be adjusted during scaling processes

Link copied to clipboard
open override val allowUpperLimitAdjustment: Boolean = true

Indicates if the upper limit of the domain may be adjusted during scaling processes

Link copied to clipboard
open override var description: String?
Link copied to clipboard
open override var direction: MetricIfc.Direction
Link copied to clipboard
override val domain: Interval
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override var unitsOfMeasure: String?

Functions

Link copied to clipboard
open fun badScore(): Score

Returns a valid score that has the worst possible value according to the direction of the meaning of better.

Link copied to clipboard
open fun metricData(modaName: String, weight: Double): MetricData

Returns an instance of MetricData based on (modaName, weight)

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