Package org.tribuo.math.neighbour
Enum Class NeighboursQueryFactoryType
- All Implemented Interfaces:
Serializable
,Comparable<NeighboursQueryFactoryType>
,Constable
These are the supported neighbour query implementations. A factory object is used to emit instances of its
implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA factory which emits nearest neighbour query objects using a brute-force search.A factory which emits nearest neighbour query objects using a k-d tree search. -
Method Summary
Modifier and TypeMethodDescriptionstatic NeighboursQueryFactory
getNeighboursQueryFactory
(NeighboursQueryFactoryType nqFactoryType, Distance distance, int numThreads) Returns the appropriateNeighboursQueryFactory
implementation.static NeighboursQueryFactoryType
Returns the enum constant of this class with the specified name.static NeighboursQueryFactoryType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BRUTE_FORCE
A factory which emits nearest neighbour query objects using a brute-force search.NeighboursBruteForceFactory
-
KD_TREE
A factory which emits nearest neighbour query objects using a k-d tree search.KDTreeFactory
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getNeighboursQueryFactory
public static NeighboursQueryFactory getNeighboursQueryFactory(NeighboursQueryFactoryType nqFactoryType, Distance distance, int numThreads) Returns the appropriateNeighboursQueryFactory
implementation.- Parameters:
nqFactoryType
- The query factory type.distance
- The distance function.numThreads
- The number of threads to be used to parallelize the computation.- Returns:
- The query factory.
-