public interface FeatureVectors
ALSServingModel
or ALSSpeedModel
.Modifier and Type | Method and Description |
---|---|
void |
addAllIDsTo(Collection<String> allIDs)
Adds all IDs that are mapped to a feature vector to a given collection
|
void |
addAllRecentTo(Collection<String> allRecent)
Add all recently set IDs to the given collection
|
float[] |
getVector(String id) |
double[] |
getVTV(boolean background) |
void |
removeAllIDsFrom(Collection<String> allIDs)
Removes all IDs that are mapped to a feature vector from a given collection
|
void |
retainRecentAndIDs(Collection<String> newModelIDs)
Given IDs that are part of a new model, and whose values are going to be sent later,
retain only IDs that are also in the new model (or have been recently seen -- possibly since
last model was built), and remove the rest.
|
void |
setVector(String id,
float[] vector)
Sets the value of a feature vector for an ID.
|
int |
size() |
int size()
float[] getVector(String id)
id
- ID to get feature vector fornull
if doesn't existvoid setVector(String id, float[] vector)
retainRecentAndIDs(Collection)
call.id
- ID to set feature vector forvector
- new feature vectorvoid addAllIDsTo(Collection<String> allIDs)
allIDs
- collection to add IDs tovoid removeAllIDsFrom(Collection<String> allIDs)
allIDs
- collection to add IDs tovoid addAllRecentTo(Collection<String> allRecent)
allRecent
- collection to add IDs tovoid retainRecentAndIDs(Collection<String> newModelIDs)
newModelIDs
- new model IDsdouble[] getVTV(boolean background)
background
- if true, a hint that this potentially expensive computation may be
deprioritized and need not use all available resources to computeCopyright © 2014–2018. All rights reserved.