org.gcube.dir.master.selection.rankers
Class RandomRanker

java.lang.Object
  extended by org.gcube.dir.master.selection.rankers.RandomRanker
All Implemented Interfaces:
Prototyped<SelectionParameters>, Ranker<SelectionParameters,CollectionRank>

public class RandomRanker
extends java.lang.Object
implements Ranker<SelectionParameters,CollectionRank>, Prototyped<SelectionParameters>

A Ranker implementation based on a randomisations of the input collections (suitable for testing).

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
RandomRanker()
           
 
Method Summary
 SelectionParameters getPrototype()
          Returns the object's prototypical input.
 java.util.List<CollectionRank> rank(SelectionParameters params, CollectionSet set)
          Ranks the collections in a CollectionSet in accordance with given selection parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomRanker

public RandomRanker()
Method Detail

rank

public java.util.List<CollectionRank> rank(SelectionParameters params,
                                           CollectionSet set)
                                    throws java.lang.Exception
Ranks the collections in a CollectionSet in accordance with given selection parameters.

Specified by:
rank in interface Ranker<SelectionParameters,CollectionRank>
Parameters:
params - the parameters.
Returns:
the ranked collections.
Throws:
java.lang.Exception - if the collections could not be ranked.

getPrototype

public SelectionParameters getPrototype()
Returns the object's prototypical input.

Specified by:
getPrototype in interface Prototyped<SelectionParameters>
Returns:
the prototype.