public class RandomBallCoverOneShot<V extends Vec> extends Object implements VectorCollection<V>
Modifier and Type | Class and Description |
---|---|
static class |
RandomBallCoverOneShot.RandomBallCoverOneShotFactory<V extends Vec> |
Constructor and Description |
---|
RandomBallCoverOneShot(List<V> vecs,
DistanceMetric dm)
Creates a new one-shot version of the Random Cover Ball.
|
RandomBallCoverOneShot(List<V> vecs,
DistanceMetric dm,
ExecutorService execServ)
Creates a new one-shot version of the Random Cover Ball.
|
RandomBallCoverOneShot(List<V> vecs,
DistanceMetric dm,
int s)
Creates a new one-shot version of the Random Cover Ball.
|
RandomBallCoverOneShot(List<V> vecs,
DistanceMetric dm,
int s,
ExecutorService execServ)
Creates a new one-shot version of the Random Cover Ball.
|
Modifier and Type | Method and Description |
---|---|
RandomBallCoverOneShot<V> |
clone() |
List<? extends VecPaired<V,Double>> |
search(Vec query,
double range)
Searches the space for all vectors that are within a given range of the query vector.
|
List<? extends VecPaired<V,Double>> |
search(Vec query,
int neighbors)
Searches the space for the k neighbors that are closest to the given query vector
|
int |
size()
Returns the number of vectors stored in the collection
|
public RandomBallCoverOneShot(List<V> vecs, DistanceMetric dm, int s, ExecutorService execServ)
vecs
- the vectors to place into the RBCdm
- the distance metric to uses
- the number of points to be claimed by each representative.execServ
- the source of threads for parallel constructionpublic RandomBallCoverOneShot(List<V> vecs, DistanceMetric dm, ExecutorService execServ)
vecs
- the vectors to place into the RBCdm
- the distance metric to useexecServ
- the source of threads for parallel constructionpublic RandomBallCoverOneShot(List<V> vecs, DistanceMetric dm, int s)
vecs
- the vectors to place into the RBCdm
- the distance metric to uses
- the number of points to be claimed by each representative.public RandomBallCoverOneShot(List<V> vecs, DistanceMetric dm)
vecs
- the vectors to place into the RBCdm
- the distance metric to usepublic List<? extends VecPaired<V,Double>> search(Vec query, double range)
VectorCollection
search
in interface VectorCollection<V extends Vec>
query
- the vector we want to find others nearrange
- the search range around our querypublic List<? extends VecPaired<V,Double>> search(Vec query, int neighbors)
VectorCollection
search
in interface VectorCollection<V extends Vec>
query
- the vector we want to find neighbors ofneighbors
- the maximum number of neighbors to returnpublic int size()
VectorCollection
size
in interface VectorCollection<V extends Vec>
public RandomBallCoverOneShot<V> clone()
Copyright © 2017. All rights reserved.