Interface NeighboursQueryFactory

All Superinterfaces:, ProtoSerializable<org.tribuo.math.protos.NeighbourFactoryProto>,<>, Serializable
All Known Implementing Classes:
KDTreeFactory, NeighboursBruteForceFactory

public interface NeighboursQueryFactory extends, ProtoSerializable<org.tribuo.math.protos.NeighbourFactoryProto>,<>, Serializable
An interface for factories which create nearest neighbour query objects.
  • Method Details

    • createNeighboursQuery

      NeighboursQuery createNeighboursQuery(SGDVector[] data)
      Constructs a nearest neighbour query object using the supplied array of SGDVector.
      data - An array of SGDVector.
      A query object.
    • getDistance

      Distance getDistance()
      Gets the Distance set on this object.
      The distance function.
    • getNumThreads

      int getNumThreads()
      Get the number of threads set on this object. There could be factory implementations that are sequential, meaning they are single threaded.
      The number of threads used to parallelize the query operation.
    • getProvenance

      default getProvenance()
      Specified by:
      getProvenance in interface<>
    • deserialize

      static NeighboursQueryFactory deserialize(org.tribuo.math.protos.NeighbourFactoryProto proto)
      Deserialization helper for NeighboursQueryFactories.
      proto - The proto to deserialize.
      The query factory.