org.grouplens.lenskit.scored

Interface ScoredId

• All Known Implementing Classes:
AbstractScoredId

Deprecated.
Scored IDs are going away in LensKit 3.0.

@Deprecated
public interface ScoredId

A numerical ID associated with a score and optional side channels. A ScoredId object is intended to be immutable. Scored IDs can be created by using the builder or accumulated in a PackedScoredIdList.

In addition to the score, a scored id associates channels with the id. Channels are identified by TypedSymbols. As an optimization, channels of type double can be accessed in unboxed fashion using an untyped Symbol.

A channel, if it is present, cannot contain null.

Since:
1.1
Compatibility
Public
• Method Summary

All Methods
Modifier and Type Method and Description
Collection<SymbolValue<?>> getChannels()
Deprecated.
Get the channels associated with a scored ID.
Set<TypedSymbol<?>> getChannelSymbols()
Deprecated.
Determine the typed symbols associated with all side channels of a ScoredId.
<T> T getChannelValue(TypedSymbol<T> sym)
Deprecated.
Get the value for a channel.
long getId()
Deprecated.
Retrieve the numerical identifier of this ScoredId.
double getScore()
Deprecated.
Retrieve the score of this ScoredId.
Collection<DoubleSymbolValue> getUnboxedChannels()
Deprecated.
Get the unboxed channels associated with a scored ID.
Set<Symbol> getUnboxedChannelSymbols()
Deprecated.
Determine the symbols associated with all unboxed double side channels of a ScoredId.
double getUnboxedChannelValue(Symbol sym)
Deprecated.
Get the unboxed value for a channel.
boolean hasChannel(TypedSymbol<?> s)
Deprecated.
Determine if a ScoredId has a specific typed channel.
boolean hasUnboxedChannel(Symbol s)
Deprecated.
Determine if a ScoredId has a specific channel.
• Method Detail

• getId

long getId()
Deprecated.

Retrieve the numerical identifier of this ScoredId.

Returns:
An identifier.
• getScore

double getScore()
Deprecated.

Retrieve the score of this ScoredId.

Returns:
The ID’s score.
• getUnboxedChannelSymbols

@Nonnull
Set<Symbol> getUnboxedChannelSymbols()
Deprecated.

Determine the symbols associated with all unboxed double side channels of a ScoredId.

Returns:
A set of Symbol objects, each of which maps to a value in one of the ScoredId’s unboxed double side channels.
• getChannelSymbols

@Nonnull
Set<TypedSymbol<?>> getChannelSymbols()
Deprecated.

Determine the typed symbols associated with all side channels of a ScoredId.

Returns:
A set of TypedSymbol objects, each of which maps to a value in one of the ScoredId’s side channels.
• getChannels

@Nonnull
Collection<SymbolValue<?>> getChannels()
Deprecated.

Get the channels associated with a scored ID.

Returns:
The channels associated with this ID and their values.
• getUnboxedChannels

@Nonnull
Collection<DoubleSymbolValue> getUnboxedChannels()
Deprecated.

Get the unboxed channels associated with a scored ID.

Returns:
The unboxed channels associated with this ID and their values.
• getChannelValue

@Nullable
<T> T getChannelValue(@Nonnull
TypedSymbol<T> sym)
Deprecated.

Get the value for a channel.

Parameters:
sym - The channel symbol.
T - The type contained.
Returns:
The channel’s value, or null if no such channel is present.
• getUnboxedChannelValue

double getUnboxedChannelValue(Symbol sym)
Deprecated.

Get the unboxed value for a channel. The channel must exist.

Parameters:
sym - The channel symbol.
Returns:
The channel’s value.
Throws:
NullPointerException - if the symbol names a nonexistent channel.
• hasUnboxedChannel

boolean hasUnboxedChannel(Symbol s)
Deprecated.

Determine if a ScoredId has a specific channel.

Parameters:
s - The side channel’s symbol.
Returns:
true if the ScoredId has a channel associated with this symbol, false otherwise.
• hasChannel

boolean hasChannel(TypedSymbol<?> s)
Deprecated.

Determine if a ScoredId has a specific typed channel.

Parameters:
s - The typed side channel’s symbol.
Returns:
true if the ScoredId has a channel associated with this symbol, false otherwise.