U
- user typeI
- item typepublic abstract class AbstractFastPreferenceSampler<U,I> extends Object implements FastPreferenceSampler<U,I>
Constructor and Description |
---|
AbstractFastPreferenceSampler(FastUserIndex<U> users,
FastItemIndex<I> items)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
I |
iidx2item(int iidx)
Returns the item represented with the index.
|
int |
item2iidx(I i)
Returns the index assigned to the item.
|
int |
numItems()
Counts the number of indexed items.
|
int |
numUsers()
Counts the number of indexed users.
|
U |
uidx2user(int uidx)
Returns the user represented with the index.
|
int |
user2uidx(U u)
Returns the index assigned to the user.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fastSample
sample
containsUser, getAllUidx, getAllUsers, uidx2user, uidx2user, user2uidx, user2uidx
containsItem, getAllIidx, getAllItems, iidx2item, iidx2item, item2iidx, item2iidx
public AbstractFastPreferenceSampler(FastUserIndex<U> users, FastItemIndex<I> items)
users
- user indexitems
- item indexpublic int numUsers()
UserIndex
public int numItems()
ItemIndex
public int user2uidx(U u)
FastUserIndex
user2uidx
in interface FastUserIndex<U>
u
- userpublic U uidx2user(int uidx)
FastUserIndex
uidx2user
in interface FastUserIndex<U>
uidx
- user indexpublic int item2iidx(I i)
FastItemIndex
item2iidx
in interface FastItemIndex<I>
i
- itempublic I iidx2item(int iidx)
FastItemIndex
iidx2item
in interface FastItemIndex<I>
iidx
- item indexCopyright © 2016. All rights reserved.