public final class NullRescorer<T> extends Object implements Rescorer<T>, IDRescorer
A simple Rescorer
which always returns the original score.
Modifier and Type | Method and Description |
---|---|
static IDRescorer |
getItemInstance() |
static Rescorer<LongPair> |
getItemItemPairInstance() |
static IDRescorer |
getUserInstance() |
static Rescorer<LongPair> |
getUserUserPairInstance() |
boolean |
isFiltered(long id)
Returns
true to exclude the given thing. |
boolean |
isFiltered(T thing)
Returns
true to exclude the given thing. |
double |
rescore(long id,
double originalScore) |
double |
rescore(T thing,
double originalScore) |
String |
toString() |
public static IDRescorer getItemInstance()
public static IDRescorer getUserInstance()
public double rescore(T thing, double originalScore)
public boolean isFiltered(T thing)
Rescorer
true
to exclude the given thing.isFiltered
in interface Rescorer<T>
thing
- the thing to filtertrue
to exclude, false
otherwisepublic double rescore(long id, double originalScore)
rescore
in interface IDRescorer
id
- ID of thing (user, item, etc.) to rescoreoriginalScore
- original scoreDouble.NaN
to indicate that this should be excluded entirelypublic boolean isFiltered(long id)
IDRescorer
true
to exclude the given thing.isFiltered
in interface IDRescorer
id
- ID of thing (user, item, etc.) to rescoretrue
to exclude, false
otherwiseCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.