org.ascape.util
Interface RandomFunctions

All Known Subinterfaces:
Space
All Known Implementing Classes:
Agent, Array, Array1D, Array2D, Array2DBase, Array2DEuclidian, Array2DMoore, Array2DSmallWorld, Array2DVonNeumann, AscapeObject, BasicCell, BasicModel, BasicMovementAgent, BasicMovementModel, BasicMovementStateAgent, Block, Bug, Bug, Bug, Bug, Cell, CellOccupant, City, City3D, CollectionSpace, CollectStats, ComplexLocation, ComplexMovementAgent, Continuous1D, Continuous2D, DemographicPrisonersDilemma, DemographicPrisonersDilemma3D, Diffusion, Discrete, Epidemic, Epidemic, Epidemic, Epidemic3D, Epidemic3D, Epidemic3D, Epidemic3DTiles, EpidemicPeriods, ExecuteThenUpdate, Firm, Flea, GAS_Base, Graph, GraphSmallWorld, Habitat, Habitat, Habitat, Habitat, HeatBug, Heatbugs, Heatbugs3D, Heatbugs3DCustom, HeatCell, HostCell, Individual, Individual, Individual, Individual, Individual, Instrument, ListBase, ListSpace, LocatedAgent, Markets, Markets3D, MethodsAgent, MomentumAgent, MoveRandomWithin, NotifyViews, NotifyViewsEvent, OperationsAgent, ParameterizedDiffusion, Place, Place, PlayCell, Player, Propogate, PropogateScapeOnly, Rat, Region, Region3D, RegionalLocation, Rule, Scape, SearchRule, SetValues, Singleton, SpatialModel, StateAgent, StupidModel1, StupidModel13D, StupidModel2, StupidModel23D, StupidModel3, StupidModel33D, StupidModel5, StupidModel53D, SubCollection, SubContinuous, SubContinuous1D, SubContinuous2D, SubGraph, SubListSpace, SugarAgent, SugarCell, Trader, WikiExample, WikiExample3D

public interface RandomFunctions


Method Summary
 java.util.Random getRandom()
           
 double randomInRange(double low, double high)
          Generate a double uniformly distributed across some range.
 int randomInRange(int low, int high)
           
 boolean randomIs()
          Returns a random boolean value.
 int randomToLimit(int limit)
          Generate an integer uniformly distributed across 0...limit - 1.
 void setRandom(java.util.Random random)
           
 

Method Detail

randomInRange

int randomInRange(int low,
                  int high)

randomInRange

double randomInRange(double low,
                     double high)
Generate a double uniformly distributed across some range.

Parameters:
low - the lowest number (inclusive) that the resulting double might be
high - the hignest number (exclusive) that the resulting double might be
Returns:
uniformly distributed pseudorandom double

randomToLimit

int randomToLimit(int limit)
Generate an integer uniformly distributed across 0...limit - 1.

Parameters:
limit - the maximum limit (exclusive) of the resulting int
Returns:
uniformly distributed pseudorandom int

randomIs

boolean randomIs()
Returns a random boolean value.


getRandom

java.util.Random getRandom()

setRandom

void setRandom(java.util.Random random)