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
Create item information object.
- Parameters:
-
Member Function Documentation
int GetAlbum |
( |
int |
item_id |
) |
[inline] |
Get the album for a given item.
- Parameters:
-
- Returns:
- the album ID
int GetArtist |
( |
int |
item_id |
) |
[inline] |
Get the artist for a given item.
- Parameters:
-
- Returns:
- the artist ID
IList<int> GetGenres |
( |
int |
item_id |
) |
[inline] |
Get a list of genres for a given item.
- Parameters:
-
- Returns:
- a list of genres
Get the type of a given item.
- Parameters:
-
- Returns:
- the KDDCupItemType of the given item
bool HasAlbum |
( |
int |
item_id |
) |
[inline] |
Check whether the given item is associated with an album.
- Parameters:
-
- 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:
-
- 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:
-
- 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: