|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the concept of a group of Authors all having the same Topic. The AuthorsTopicBucket stores a Topic that represents the common Topic of all the Authors. An Author is added only if his/her Topic is the same as the Topic of the AuthorsTopicBucket.
AuthorGroup,
Topic| Method Summary | |
void |
addAuthor(Author author)
Adds an Author only if his/her Topic is the same as that of the Bucket |
AuthorGroup |
getAuthors()
Returns the AuthorGroup that the AuthorsTopicBucket stores |
Topic |
getTopic()
Returns the common Topic of the AuthorGroup |
void |
initialize(java.util.Collection collection)
Initializes the Bucket with Authors from the collection. |
java.util.Collection |
partitionBucket(int numElements)
Returns a Collection of AuthorsTopicBuckets of randomly chosen Authors such that the individual buckets are mutually exclusive and exhaustive (they cover all the authors). |
| Method Detail |
public void initialize(java.util.Collection collection)
Authors from the collection. It can assume that the collection contains AuthorInterfaces
collection - Specifies the collection of authorspublic void addAuthor(Author author)
Author only if his/her Topic is the same as that of the Bucket
author - the author to be added to the bucketpublic Topic getTopic()
Topic of the AuthorGroup
public AuthorGroup getAuthors()
AuthorGroup that the AuthorsTopicBucket stores
public java.util.Collection partitionBucket(int numElements)
Collection of AuthorsTopicBuckets of randomly chosen Authors such that the individual buckets are mutually exclusive and exhaustive (they cover all the authors). All the buckets are of the fixed specified size except a very few which could hold less number of Authors.
numElements - the number of elements in most of the individual buckets
AuthorsTopicBuckets
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||