Class

com.github.jelmerk.knn.scalalike

ScalaIndexAdapter

Related Doc: package scalalike

Permalink

class ScalaIndexAdapter[TId, TVector, TItem <: Item[TId, TVector], TDistance] extends Index[TId, TVector, TItem, TDistance]

Annotations
@SerialVersionUID()
Linear Supertypes
Index[TId, TVector, TItem, TDistance], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaIndexAdapter
  2. Index
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalaIndexAdapter(delegate: knn.Index[TId, TVector, TItem, TDistance])

    Permalink

Type Members

  1. type ProgressListener = (Int, Int) ⇒ Unit

    Permalink

    Called periodically to report on progress during indexing.

    Called periodically to report on progress during indexing. The first argument is the number of records processed. The second argument is the total number of record to index as part of this operation.

    Definition Classes
    Index

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(item: TItem): Unit

    Permalink

    Add a new item to the index.

    Add a new item to the index.

    item

    the item to add to the index

    Definition Classes
    ScalaIndexAdapterIndex
  5. def addAll(items: Iterable[TItem], numThreads: Int = ..., listener: ProgressListener = (_, _) => (), progressUpdateInterval: Int = ...): Unit

    Permalink

    Add multiple items to the index.

    Add multiple items to the index. Reports progress to the passed in progress listener every progressUpdateInterval elements indexed.

    items

    the items to add to the index

    numThreads

    number of threads to use for parallel indexing

    listener

    listener to report progress to

    progressUpdateInterval

    after indexing this many items progress will be reported

    Definition Classes
    ScalaIndexAdapterIndex
  6. def apply(id: TId): TItem

    Permalink

    Returns an item by its identifier.

    Returns an item by its identifier. If the item does not exist in the index a NoSuchElementException is thrown

    id

    unique identifier of the item to return

    returns

    the item

    Definition Classes
    ScalaIndexAdapterIndex
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findNearest(vector: TVector, k: Int): Seq[SearchResult[TItem, TDistance]]

    Permalink

    Find the items closest to the passed in vector.

    Find the items closest to the passed in vector.

    vector

    the vector

    k

    number of items to return

    returns

    the items closest to the passed in vector

    Definition Classes
    ScalaIndexAdapterIndex
  13. def findNeighbors(id: TId, k: Int): Seq[SearchResult[TItem, TDistance]]

    Permalink

    Find the items closest to the item identified by the passed in id.

    Find the items closest to the item identified by the passed in id. If the id does not match an item an empty list is returned. the element itself is not included in the response.

    id

    of the item to find the neighbors of

    k

    number of neighbors to return

    returns

    the items closest to the item

    Definition Classes
    ScalaIndexAdapterIndex
  14. def get(id: TId): Option[TItem]

    Permalink

    Optionally return an item by its identifier

    Optionally return an item by its identifier

    id

    unique identifier of the item to return

    returns

    the item

    Definition Classes
    ScalaIndexAdapterIndex
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def remove(id: TId): Boolean

    Permalink

    Removes an item from the index.

    Removes an item from the index.

    id

    unique identifier or the item to remove

    returns

    true if this list contained the specified element

    Definition Classes
    ScalaIndexAdapterIndex
  22. def save(path: Path): Unit

    Permalink

    Saves the index to a path.

    Saves the index to a path.

    path

    path to write the index to

    Definition Classes
    ScalaIndexAdapterIndex
  23. def save(file: File): Unit

    Permalink

    Saves the index to a file.

    Saves the index to a file.

    file

    file to write the index to

    Definition Classes
    ScalaIndexAdapterIndex
  24. def save(out: OutputStream): Unit

    Permalink

    Saves the index to an OutputStream.

    Saves the index to an OutputStream.

    out

    the output stream to write the index to

    Definition Classes
    ScalaIndexAdapterIndex
  25. def size: Int

    Permalink

    Returns the size of the index.

    Returns the size of the index.

    returns

    size of the index

    Definition Classes
    ScalaIndexAdapterIndex
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Index[TId, TVector, TItem, TDistance]

Inherited from AnyRef

Inherited from Any

Ungrouped