|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uchicago.src.sim.util.AgentDistribution
This is a helper class designed to apply random numbers generated using a statistical distribution to a particular variable in your Agent Set. The random numbers are generated from classes contained in the cern.jet.random package. Examples include chi-squared, normal, and pareto. This class can be used in conjunction with the uchicago.src.sim.util.DistributionFactory to quickly apply a distribution to agents.
cern.jet.random,
DistributionFactory| Constructor Summary | |
AgentDistribution(cern.jet.random.AbstractDistribution d,
ArrayList agents,
String var)
Constructs an AgentDistribution usin the distribution, the agent list and variable name. |
|
| Method Summary | |
ArrayList |
distributeAgents()
Sets the chosen variable in the agents to a random number generated using the distribution. |
ArrayList |
getAgents()
|
cern.jet.random.AbstractDistribution |
getDistribution()
|
String |
getVar()
|
void |
setAgents(ArrayList agents)
|
void |
setDistribution(cern.jet.random.AbstractDistribution d)
|
void |
setVar(String var)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AgentDistribution(cern.jet.random.AbstractDistribution d,
ArrayList agents,
String var)
d - The distribution to use when generating random numbers.agents - The agentsvar - The name of the variable you want to set.| Method Detail |
public void setDistribution(cern.jet.random.AbstractDistribution d)
public cern.jet.random.AbstractDistribution getDistribution()
public void setAgents(ArrayList agents)
public ArrayList getAgents()
public void setVar(String var)
public String getVar()
public ArrayList distributeAgents()
throws InvocationTargetException,
IllegalAccessException
InvocationTargetException
IllegalAccessException
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||