public static class RandomProjectionLSH.RandomProjectionLSHFactory<V extends Vec> extends Object implements VectorCollectionFactory<V>
Modifier | Constructor and Description |
---|---|
|
RandomProjectionLSHFactory(int intsToUse,
boolean inMemory)
Creates a new Random Projection LSH factory that uses a full matrix of
normally distributed values.
|
|
RandomProjectionLSHFactory(int intsToUse,
int poolSize)
Creates a new Random Projection LSH factory that uses a pool of
normally distributed values to approximate a full matrix with
considerably less memory storage.
|
protected |
RandomProjectionLSHFactory(RandomProjectionLSH.RandomProjectionLSHFactory<V> toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
VectorCollectionFactory<V> |
clone() |
VectorCollection<V> |
getVectorCollection(List<V> source,
DistanceMetric distanceMetric)
Creates a new Vector Collection from the given source using the provided metric.
|
VectorCollection<V> |
getVectorCollection(List<V> source,
DistanceMetric distanceMetric,
ExecutorService threadpool)
Creates a new Vector Collection from the given source using the provided metric.
|
public RandomProjectionLSHFactory(int intsToUse, boolean inMemory)
intsToUse
- the number of integers to use for the encodinginMemory
- true
to construct the full matrix in memory, or
false
to construct the needed values on demand. This reducespublic RandomProjectionLSHFactory(int intsToUse, int poolSize)
intsToUse
- the number of integers to use for the encodingpoolSize
- the number of normally distributed random variables to
store. Matrix values will be pulled on demand from an index in the pool
of values.protected RandomProjectionLSHFactory(RandomProjectionLSH.RandomProjectionLSHFactory<V> toCopy)
toCopy
- the object to copypublic VectorCollection<V> getVectorCollection(List<V> source, DistanceMetric distanceMetric)
VectorCollectionFactory
getVectorCollection
in interface VectorCollectionFactory<V extends Vec>
source
- the list of vectors to put into the collection.distanceMetric
- the distance measure to use for the spacepublic VectorCollection<V> getVectorCollection(List<V> source, DistanceMetric distanceMetric, ExecutorService threadpool)
VectorCollectionFactory
getVectorCollection
in interface VectorCollectionFactory<V extends Vec>
source
- the list of vectors to put into the collection.distanceMetric
- the distance measure to use for the spacethreadpool
- the source for threads for multi threaded executionpublic VectorCollectionFactory<V> clone()
Copyright © 2017. All rights reserved.