jsynoptic.builtin
Class UniformRandomSource

java.lang.Object
  extended by simtools.data.ValueProvider
      extended by simtools.data.DataSource
          extended by jsynoptic.builtin.RandomSource
              extended by jsynoptic.builtin.UniformRandomSource

public class UniformRandomSource
extends RandomSource

Generate numbers using a uniform distribution, bounds included


Nested Class Summary
static class UniformRandomSource.OptionPanel
           
 
Field Summary
static java.lang.String ID_PREFIX
           
 
Fields inherited from class jsynoptic.builtin.RandomSource
generator, info, maxIndex, maxValue, minValue, param1, param2, resources, seed, values
 
Fields inherited from class simtools.data.DataSource
endNotificationListeners, listeners, sortedOrder
 
Fields inherited from class simtools.data.ValueProvider
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider
 
Constructor Summary
UniformRandomSource(java.lang.String name, double lowerBound, double higherBound)
           
UniformRandomSource(java.lang.String name, double lowerBound, double higherBound, long nSamples)
           
UniformRandomSource(java.lang.String name, long seed, double lowerBound, double higherBound)
           
UniformRandomSource(java.lang.String name, long seed, double lowerBound, double higherBound, long nSamples)
           
 
Method Summary
 double getHigherBound()
           
 double getLowerBound()
           
protected  double nextRandomValue()
          For subclasses to implement according to their distribution
protected  void setInfo()
           
 
Methods inherited from class jsynoptic.builtin.RandomSource
computeLastIndex, computeMax, computeMin, computeStartIndex, fillValues, getDoubleMax, getDoubleMin, getDoubleValue, getInformation, getLastIndex, getMax, getMaxIndex, getMin, getStartIndex, getValue
 
Methods inherited from class simtools.data.DataSource
addEndNotificationListener, addListener, computeSortedOrder, createEmptyDataSource, equals, getAuxiliarySources, getByteMax, getByteMin, getChoiceFormat, getDataSourceInformationClass, getFloatMax, getFloatMin, getIntegerMax, getIntegerMin, getLongMax, getLongMin, getShortMax, getShortMin, getSortedOrder, getSourceDependencies, isAuxiliary, isComparable, isCompound, notifyEndNotificationListeners, notifyListenersForDataReplaced, notifyListenersForDataReplaced, notifyListenersForIndexRangeChange, notifyListenersForInfoChange, notifyListenersForOrderChange, notifyListenersForValueChange, notifyListenersForValueRangeChange, removeEndNotificationListener, removeListener, setSlice, sortedOrder, updateSortedOrder
 
Methods inherited from class simtools.data.ValueProvider
getByteValue, getFloatValue, getIntegerValue, getKind, getLongValue, getObjectValue, getShortValue, valueClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_PREFIX

public static final java.lang.String ID_PREFIX
See Also:
Constant Field Values
Constructor Detail

UniformRandomSource

public UniformRandomSource(java.lang.String name,
                           double lowerBound,
                           double higherBound)
Parameters:
lowerBound -
higherBound -

UniformRandomSource

public UniformRandomSource(java.lang.String name,
                           double lowerBound,
                           double higherBound,
                           long nSamples)
Parameters:
lowerBound -
higherBound -
nSamples -

UniformRandomSource

public UniformRandomSource(java.lang.String name,
                           long seed,
                           double lowerBound,
                           double higherBound)
Parameters:
seed -
lowerBound -
higherBound -

UniformRandomSource

public UniformRandomSource(java.lang.String name,
                           long seed,
                           double lowerBound,
                           double higherBound,
                           long nSamples)
Parameters:
seed -
lowerBound -
higherBound -
nSamples -
Method Detail

setInfo

protected void setInfo()

nextRandomValue

protected double nextRandomValue()
Description copied from class: RandomSource
For subclasses to implement according to their distribution

Specified by:
nextRandomValue in class RandomSource

getLowerBound

public double getLowerBound()
Returns:
Returns the Lower Bound.

getHigherBound

public double getHigherBound()
Returns:
Returns Higher Bound.