Use IndexMinPQ with Scala.