public abstract class AbstractItemVectorNormalizer extends Object implements ItemVectorNormalizer
Abstract item vector normalizer implementation.
Constructor and Description |
---|
AbstractItemVectorNormalizer() |
Modifier and Type | Method and Description |
---|---|
MutableSparseVector |
normalize(long item,
SparseVector vector,
MutableSparseVector target)
Normalize a vector with respect to an item vector.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
makeTransformation, makeTransformation
public MutableSparseVector normalize(long item, @Nonnull SparseVector vector, @Nullable MutableSparseVector target)
Normalize a vector with respect to an item vector.
Delegates to ItemVectorNormalizer.makeTransformation(long, SparseVector)
and the resulting VectorTransformation
.
normalize
in interface ItemVectorNormalizer
item
- 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.