org.decisiondeck.xmcda_oo.utils
Class RandomEvaluator

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.utils.RandomEvaluator

public class RandomEvaluator
extends Object


Constructor Summary
RandomEvaluator(IOrderedInterval scale)
          Creates a new object associated with the given scale.
RandomEvaluator(IOrderedInterval scale, Random rand)
          Creates a new object associated with the given scale.
 
Method Summary
 double getRandomEvaluation()
          Computes and returns a random evaluation that belongs to the scale bound to this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomEvaluator

public RandomEvaluator(IOrderedInterval scale)
Creates a new object associated with the given scale.

Parameters:
scale - may be discrete, must have finite minimum and maximum. Direction is not used.

RandomEvaluator

public RandomEvaluator(IOrderedInterval scale,
                       Random rand)
Creates a new object associated with the given scale.

Parameters:
scale - may be discrete, must have finite minimum and maximum. Direction is not used.
rand - the random generator used by this object.
Method Detail

getRandomEvaluation

public double getRandomEvaluation()
Computes and returns a random evaluation that belongs to the scale bound to this object. This is a random number chosen with a uniform distribution on the (possibly discrete) possibilities offered by this scale.

Returns:
a number.


Copyright © 2011. All Rights Reserved.