All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scray.querying.queries.CostEstimationInfo.scala Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
package scray.querying.queries

import scala.collection.mutable.MutableList

object CostEstimationInfo {
    val estimatedCosts: MutableList[Long => Long] = new MutableList[Long => Long]()
    
    def addNewCosts(costs: Long => Long) {
      estimatedCosts += costs
    }
    
    def getCosts(): Double = {
      println(estimatedCosts.size)
      estimatedCosts.reverse.foldLeft(0L)((b, a) => a.apply(b))
    }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy