KDDCupItems Class Reference

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

List of all members.

Public Member Functions

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

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:
size the number of items

Member Function Documentation

int GetAlbum ( int  item_id  )  [inline]

Get the album for a given item.

Parameters:
item_id the item ID
Returns:
the album ID
int GetArtist ( int  item_id  )  [inline]

Get the artist for a given item.

Parameters:
item_id the item ID
Returns:
the artist ID
IList<int> GetGenres ( int  item_id  )  [inline]

Get a list of genres for a given item.

Parameters:
item_id the item ID
Returns:
a list of genres
KDDCupItemType GetType ( int  item_id  )  [inline]

Get the type of a given item.

Parameters:
item_id the 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_id the 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_id the 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_id the 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_id the item ID
type the KDDCupItemType of the item
album the album ID if the item is a track or album, -1 otherwise
artist the artist ID if the item is a track, an album, or an artist, -1 otherwise
genres a (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:
Generated on Fri Mar 2 21:19:31 2012 for MyMediaLite by  doxygen 1.6.3