org.clulab.wm.eidoscommon.utils.EqualityHashBag.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eidos-eidoscommon_2.12 Show documentation
Show all versions of eidos-eidoscommon_2.12 Show documentation
Code to be shared by other Eidos subprojects and clients
The newest version!
package org.clulab.wm.eidoscommon.utils
import org.clulab.wm.eidoscommon.utils.EqualityHashMap.EqualityHashMap
class EqualityHashBag[T](map: EqualityHashMap[T, Int]) extends HashBag[T](map) {
def this() = this(new EqualityHashMap[T, Int]())
}
object EqualityHashBag {
def apply[T](): EqualityHashBag[T] = new EqualityHashBag[T]()
def apply[T](values: Seq[T]): EqualityHashBag[T] = apply[T]() ++ values
def apply[T](values: Seq[T], getNeighbors: T => Iterable[T]): EqualityHashBag[T] =
apply[T]() ++ (values, getNeighbors)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy