org.scalameter.History.scala Maven / Gradle / Ivy
The newest version!
package org.scalameter
import java.util.Date
import scala.collection.Seq
@SerialVersionUID(-2666789428423525667L)
case class History[V](
results: Seq[History.Entry[V]], infomap: Map[Key[_], Any] = Map.empty
) {
def info[T](key: Key[T], fallback: T) =
infomap.getOrElse(key, fallback).asInstanceOf[T]
def curves = results.map(_._3)
def dates = results.map(_._1)
override def toString = s"History(${results.mkString("\n")},\ninfo: $infomap)"
}
object History {
type Entry[V] = (Date, Context, CurveData[V])
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy