@DefaultImplementation(value=DefaultItemVectorNormalizer.class) public interface ItemVectorNormalizer
| Modifier and Type | Method and Description |
|---|---|
VectorTransformation |
makeTransformation(long itemId,
SparseVector vector)
Make a vector transformation for an item.
|
MutableSparseVector |
normalize(long itemId,
SparseVector vector,
MutableSparseVector target)
Normalize a vector with respect to an item vector.
|
MutableSparseVector normalize(long itemId, @Nonnull SparseVector vector, @Nullable MutableSparseVector target)
itemId - The item id to normalize a vector for.vector - The item's vector for reference.target - The vector to normalize. If null, the item vector is normalized.target vector, if specified. Otherwise, a fresh mutable vector
containing a normalized copy of the item vector is returned.VectorTransformation makeTransformation(long itemId, SparseVector vector)
itemId - The item id to normalize for.vector - The item's vector to use as the reference vector.