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.
-
Field Summary
Fields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptioncreateNeighboursQuery(SGDVector[] data) Constructs a nearest neighbour query object using the supplied array ofSGDVector.static NeighboursQueryFactorydeserialize(org.tribuo.math.protos.NeighbourFactoryProto proto) Deserialization helper for NeighboursQueryFactories.Gets theDistanceset on this object.intGet the number of threads set on this object.default com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenanceMethods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfigMethods inherited from interface org.tribuo.protos.ProtoSerializable
serialize
-
Method Details
-
createNeighboursQuery
-
getDistance
-
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:
getProvenancein interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-
deserialize
Deserialization helper for NeighboursQueryFactories.- Parameters:
proto- The proto to deserialize.- Returns:
- The query factory.
-