Evaluation
An Evaluation is a Model which extends scala.math.Ordered. One of the main goal of an evaluation is to be compared with other evaluations of same nature, thus extending Ordered allow to easily compare identical evaluations between each other using comparison operator at the condition to have implemented the only unimplemented method of Ordered, compare.
trait Evaluation[Mem] extends Any with Model[Mem] with Ordered[Mem]
trait DoubleEvaluation extends Any with Evaluation[Double] {
def compare(score: Double): Int = Ordering.Double.compare(memory, score)
}
final case class DoubleEval(memory: Double) extends AnyVal with DoubleEvaluation
val eval1 = DoubleEval(1)
val eval2 = DoubleEval(2)
val bool: Boolean = eval1 <= eval2