Interface NeighboursQueryFactory

All Superinterfaces:
com.oracle.labs.mlrg.olcut.config.Configurable, ProtoSerializable<org.tribuo.math.protos.NeighbourFactoryProto>, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, Serializable
All Known Implementing Classes:
KDTreeFactory, NeighboursBruteForceFactory

public interface NeighboursQueryFactory extends com.oracle.labs.mlrg.olcut.config.Configurable, ProtoSerializable<org.tribuo.math.protos.NeighbourFactoryProto>, com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>, 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.
      Parameters:
      data - An array of SGDVector.
      Returns:
      A query object.
    • getDistance

      Distance getDistance()
      Gets the Distance set on this object.
      Returns:
      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.
      Returns:
      The number of threads used to parallelize the query operation.
    • getProvenance

      default com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
      Specified by:
      getProvenance in interface com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
    • deserialize

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