MyMediaLite  3.11
Public Member Functions | List of all members
KDDCupItems Class Reference

Represents KDD Cup 2011 items like album, track, artist, or genre More...

Public Member Functions

int GetAlbum (int item_id)
 Get the album for a given item More...
 
int GetArtist (int item_id)
 Get the artist for a given item More...
 
IList< int > GetGenres (int item_id)
 Get a list of genres for a given item More...
 
KDDCupItemType GetType (int item_id)
 Get the type of a given item More...
 
bool HasAlbum (int item_id)
 Check whether the given item is associated with an album More...
 
bool HasArtist (int item_id)
 Check whether the given item is associated with an artist More...
 
bool HasGenres (int item_id)
 Check whether the given item is associated with one or more genres More...
 
void Insert (int item_id, KDDCupItemType type, int album, int artist, IList< int > genres)
 Insert information about an entry to the data structure More...
 
 KDDCupItems (int size)
 Create item information object More...
 
override string ToString ()
 Gives a textual summary of the item data More...
 

Detailed Description

Represents KDD Cup 2011 items like album, track, artist, or genre

Constructor & Destructor Documentation

KDDCupItems ( int  size)
inline

Create item information object

Parameters
sizethe number of items

Member Function Documentation

int GetAlbum ( int  item_id)
inline

Get the album for a given item

Parameters
item_idthe item ID
Returns
the album ID
int GetArtist ( int  item_id)
inline

Get the artist for a given item

Parameters
item_idthe item ID
Returns
the artist ID
IList<int> GetGenres ( int  item_id)
inline

Get a list of genres for a given item

Parameters
item_idthe item ID
Returns
a list of genres
KDDCupItemType GetType ( int  item_id)
inline

Get the type of a given item

Parameters
item_idthe item ID
Returns
the KDDCupItemType of the given item
bool HasAlbum ( int  item_id)
inline

Check whether the given item is associated with an album

Parameters
item_idthe item ID
Returns
true if it is associated with an album, false otherwise
bool HasArtist ( int  item_id)
inline

Check whether the given item is associated with an artist

Parameters
item_idthe item ID
Returns
true if it is associated with an artist, false otherwise
bool HasGenres ( int  item_id)
inline

Check whether the given item is associated with one or more genres

Parameters
item_idthe item ID
Returns
true if it is associated with at least one genre, false otherwise
void Insert ( int  item_id,
KDDCupItemType  type,
int  album,
int  artist,
IList< int >  genres 
)
inline

Insert information about an entry to the data structure

Parameters
item_idthe item ID
typethe KDDCupItemType of the item
albumthe album ID if the item is a track or album, -1 otherwise
artistthe artist ID if the item is a track, an album, or an artist, -1 otherwise
genresa (possibly empty or null) list of genre IDs
override string ToString ( )
inline

Gives a textual summary of the item data


The documentation for this class was generated from the following file: