@DefaultProvider(value=ItemItemBuildContextProvider.class) @Shareable public class ItemItemBuildContext extends Object implements Serializable
This is shareable to make it more usable in the evaluator. Typical built models
will not include it, and any dependencies on it should be Transient
.
ItemItemModelBuilder
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
ItemItemBuildContext.ItemVecPair
A pair of item ids and their corresponding item
vectors, avoiding (un)boxing the ids.
|
Modifier and Type | Method and Description |
---|---|
Iterator<ItemItemBuildContext.ItemVecPair> |
getItemPairIterator()
Deprecated.
This will go away in LensKit 3.0.
|
Iterable<ItemItemBuildContext.ItemVecPair> |
getItemPairs()
Deprecated.
This will go away in LensKit 3.0.
|
LongSortedSet |
getItems()
Get the set of items.
|
LongSortedSet |
getUserItems(long user)
Get the items rated by a particular user.
|
SparseVector |
itemVector(long item)
Get the rating vector for an item.
|
@Nonnull public LongSortedSet getItems()
@Nonnull public SparseVector itemVector(long item)
VectorNormalizer
on the user rating vectors.item
- The item to query.item
.IllegalArgumentException
- if item
is not a valid item.@Nonnull public LongSortedSet getUserItems(long user)
user
- The user to query for.user
.@Deprecated public Iterable<ItemItemBuildContext.ItemVecPair> getItemPairs()
@Deprecated public Iterator<ItemItemBuildContext.ItemVecPair> getItemPairIterator()