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

org.clulab.wm.eidoscommon.utils.EqualityHashBag.scala Maven / Gradle / Ivy

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