C# Класс NReco.CF.Taste.Impl.Model.GenericDataModel

Наследование: NReco.CF.Taste.Impl.Model.AbstractDataModel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GenericDataModel ( FastByIDMap userData ) : System

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.

GenericDataModel ( FastByIDMap userData, FastByIDMap timestamps ) : System

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.

GenericDataModel ( IDataModel dataModel ) : System

Creates a new GenericDataModel containing an immutable copy of the data from another given IDataModel.

GetItemIDs ( ) : IEnumerator
GetItemIDsFromUser ( long userID ) : FastIDSet
GetNumItems ( ) : int
GetNumUsers ( ) : int
GetNumUsersWithPreferenceFor ( long itemID ) : int
GetNumUsersWithPreferenceFor ( long itemID1, long itemID2 ) : int
GetPreferenceTime ( long userID, long itemID ) : DateTime?
GetPreferenceValue ( long userID, long itemID ) : float?
GetPreferencesForItem ( long itemID ) : IPreferenceArray
GetPreferencesFromUser ( long userID ) : IPreferenceArray
GetRawItemData ( ) : FastByIDMap

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.

GetRawUserData ( ) : FastByIDMap

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.

GetUserIDs ( ) : IEnumerator
HasPreferenceValues ( ) : bool
Refresh ( IList alreadyRefreshed ) : void
RemovePreference ( long userID, long itemID ) : void
SetPreference ( long userID, long itemID, float value ) : void
ToDataMap ( FastByIDMap data, bool byUser ) : FastByIDMap

Swaps, in-place, ILists for arrays in map values.

ToDataMap ( IDataModel dataModel ) : FastByIDMap

Exports the simple user IDs and preferences in the data model.

ToString ( ) : string

Описание методов

GenericDataModel() публичный Метод

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.
public GenericDataModel ( FastByIDMap userData ) : System
userData FastByIDMap userData users to include; (see also )
Результат System

GenericDataModel() публичный Метод

Creates a new GenericDataModel from the given users (and their preferences). This IDataModel retains all this information in memory and is effectively immutable.
public GenericDataModel ( FastByIDMap userData, FastByIDMap timestamps ) : System
userData FastByIDMap users to include; (see also )
timestamps FastByIDMap timestamps optionally, provided timestamps of preferences as milliseconds since the epoch. User IDs are mapped to maps of item IDs to long timestamps.
Результат System

GenericDataModel() публичный Метод

Creates a new GenericDataModel containing an immutable copy of the data from another given IDataModel.
public GenericDataModel ( IDataModel dataModel ) : System
dataModel IDataModel dataModel to copy
Результат System

GetItemIDs() публичный Метод

public GetItemIDs ( ) : IEnumerator
Результат IEnumerator

GetItemIDsFromUser() публичный Метод

public GetItemIDsFromUser ( long userID ) : FastIDSet
userID long
Результат FastIDSet

GetNumItems() публичный Метод

public GetNumItems ( ) : int
Результат int

GetNumUsers() публичный Метод

public GetNumUsers ( ) : int
Результат int

GetNumUsersWithPreferenceFor() публичный Метод

public GetNumUsersWithPreferenceFor ( long itemID ) : int
itemID long
Результат int

GetNumUsersWithPreferenceFor() публичный Метод

public GetNumUsersWithPreferenceFor ( long itemID1, long itemID2 ) : int
itemID1 long
itemID2 long
Результат int

GetPreferenceTime() публичный Метод

public GetPreferenceTime ( long userID, long itemID ) : DateTime?
userID long
itemID long
Результат DateTime?

GetPreferenceValue() публичный Метод

public GetPreferenceValue ( long userID, long itemID ) : float?
userID long
itemID long
Результат float?

GetPreferencesForItem() публичный Метод

public GetPreferencesForItem ( long itemID ) : IPreferenceArray
itemID long
Результат IPreferenceArray

GetPreferencesFromUser() публичный Метод

public GetPreferencesFromUser ( long userID ) : IPreferenceArray
userID long
Результат IPreferenceArray

GetRawItemData() публичный Метод

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.
public GetRawItemData ( ) : FastByIDMap
Результат FastByIDMap

GetRawUserData() публичный Метод

This is used mostly internally to the framework, and shouldn't be relied upon otherwise.
public GetRawUserData ( ) : FastByIDMap
Результат FastByIDMap

GetUserIDs() публичный Метод

public GetUserIDs ( ) : IEnumerator
Результат IEnumerator

HasPreferenceValues() публичный Метод

public HasPreferenceValues ( ) : bool
Результат bool

Refresh() публичный Метод

public Refresh ( IList alreadyRefreshed ) : void
alreadyRefreshed IList
Результат void

RemovePreference() публичный Метод

public RemovePreference ( long userID, long itemID ) : void
userID long
itemID long
Результат void

SetPreference() публичный Метод

public SetPreference ( long userID, long itemID, float value ) : void
userID long
itemID long
value float
Результат void

ToDataMap() публичный статический Метод

Swaps, in-place, ILists for arrays in map values.
public static ToDataMap ( FastByIDMap data, bool byUser ) : FastByIDMap
data FastByIDMap
byUser bool
Результат FastByIDMap

ToDataMap() публичный статический Метод

Exports the simple user IDs and preferences in the data model.
public static ToDataMap ( IDataModel dataModel ) : FastByIDMap
dataModel IDataModel
Результат FastByIDMap

ToString() публичный Метод

public ToString ( ) : string
Результат string