|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.server.CFSynchronize | +--org.recommender.server.ItemInfo
This class implements a item's records, including its ratings list, mean rating and Standard deviation. The class also provides some flags that are used by the cache replacement algorithm.
Constructor Summary | |
ItemInfo(int ID)
Constructor with param of only itemID. |
|
ItemInfo(int ID,
IntHashMap ratings,
float mean,
float SD,
float sum,
float squaredSum,
int num)
Constructor with params of itemID, ratings, mean, standard deviation, sum, squaredSum, and total num. |
Method Summary | |
void |
addRating(ItemRating rating)
Adds rating and updates the necessary stats |
float |
getItemMean()
|
IntHashMap |
getItemRatingsHash()
|
float |
getItemSD()
|
void |
removeRating(int userID)
Removes rating and updates the necessary stats |
void |
setItemMean(float itemMean)
|
void |
setItemRatingsHash(IntHashMap itemRatingsHash)
|
void |
setItemSD(float itemSD)
|
Methods inherited from class org.recommender.server.CFSynchronize |
delete, getReadersLock, getWritersLock, releaseReadersLock, releaseWritersLock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ItemInfo(int ID)
ID
- public ItemInfo(int ID, IntHashMap ratings, float mean, float SD, float sum, float squaredSum, int num)
ID
- ratings
- mean
- SD
- sum
- squaredSum
- num
- Method Detail |
public void addRating(ItemRating rating)
rating
- public void removeRating(int userID)
userID
- public IntHashMap getItemRatingsHash()
public void setItemRatingsHash(IntHashMap itemRatingsHash)
public float getItemMean()
public void setItemMean(float itemMean)
public float getItemSD()
public void setItemSD(float itemSD)
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |