Class CacheableItemDistanceModel<I>
java.lang.Object
es.uam.eps.ir.relison.links.recommendation.features.CacheableItemDistanceModel<I>
- Type Parameters:
I
- type of the items.
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I>
public class CacheableItemDistanceModel<I>
extends java.lang.Object
implements es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I>
Item distance model which stores the distances in a cache.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<I,java.util.Map<I,java.lang.Double>>
cache
The item distance cache.private es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I>
model
The current item distance model.private boolean
symmetric
True if distances are symmetric (d(a,b)=d(b,a)), false otherwise. -
Constructor Summary
Constructors Constructor Description CacheableItemDistanceModel(es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> model, boolean symmetric)
Constructor. -
Method Summary
-
Field Details
-
Constructor Details
-
CacheableItemDistanceModel
public CacheableItemDistanceModel(es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> model, boolean symmetric)Constructor.- Parameters:
model
- a distance model between items.symmetric
- true if d(a,b)=d(b,a), false otherwise.
-
-
Method Details