Interface UpdateableSimilarity
- All Superinterfaces:
es.uam.eps.ir.ranksys.nn.sim.Similarity
- All Known Implementing Classes:
UpdateableGraphCosineSimilarity
,UpdateableGraphSimilarity
public interface UpdateableSimilarity
extends es.uam.eps.ir.ranksys.nn.sim.Similarity
Generic updateable similarity for fast data. This is the interface that is
under the hood of user and item similarities. It does not need to be
symmetric.
-
Method Summary
Modifier and Type Method Description it.unimi.dsi.fastutil.ints.IntList
updateAdd(int idx1, int idx2, double val)
Updates the similarities between user/items after adding/modifying a rating.void
updateAddElement()
Updates the similarities between users/items after adding a new element.void
updateDel(int idx1, int idx2)
Updates the similarities between users/items after removing a rating.
-
Method Details
-
updateAdd
it.unimi.dsi.fastutil.ints.IntList updateAdd(int idx1, int idx2, double val)Updates the similarities between user/items after adding/modifying a rating.- Parameters:
idx1
- index of useridx2
- index of itemval
- rating value- Returns:
- a pair which contains a) a list of users which have been fully updated b) a list of other updated similarities.
-
updateDel
void updateDel(int idx1, int idx2)Updates the similarities between users/items after removing a rating.- Parameters:
idx1
- index of useridx2
- index of item
-
updateAddElement
void updateAddElement()Updates the similarities between users/items after adding a new element.
-