|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.network.AbstractProbabilityRule
uchicago.src.sim.network.UniformReinforcement
public class UniformReinforcement
A ProbabiltyRule that implements uniform reinforcement. The idea here is that this UniformReinforcement contains a vector of weights associated with a list of Objects. update(Object o) adds a specified amount to the weight of the specified object. The probablity of each object is that objects weight divided by the sum of all the weights.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.network.AbstractProbabilityRule |
|---|
sum, weightMap, weights |
| Constructor Summary | |
|---|---|
UniformReinforcement(java.util.List objs,
float startWeight)
Create this UniformReinforcement using the specified list of objects and the specified startWeight. |
|
UniformReinforcement(java.util.List objs,
float startWeight,
float amtToUpdate)
Create this UniformReinforcement using the specified list of nodes and the specified startWeight, and the specified amtToUpdate. |
|
UniformReinforcement(java.util.List objs,
float startWeight,
java.lang.Object exclude)
Create this UniformReinforcement using the specified list of objects and the specified startWeight, excluding the specified object. |
|
UniformReinforcement(java.util.List objs,
float startWeight,
java.lang.Object exclude,
float amtToUpdate)
Create this UniformReinforcement using the specified list of nodes, excluding the specified object, the specified startWeight, and the specified amtToUpdate. |
|
| Method Summary | |
|---|---|
double |
getProbability(java.lang.Object o)
Gets the probability for the specified object. |
RangeMap |
makeProbabilityMap(RangeMap map)
Recreate the probability map for the list of Objects contained by this AbstractProbabilityRule using the specified RangeMap. |
void |
setPastDiscount(float val)
|
void |
update(java.lang.Object o)
Adds the amount to update (either 1 or specified in the constructor) to the weight of the specified object. |
void |
update(java.lang.Object o,
float amt)
Performs an update using the specified object and specified amount. |
| Methods inherited from class uchicago.src.sim.network.AbstractProbabilityRule |
|---|
addNode, addToNodeWeight, calcSum, getWeight, getWeightListIndex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniformReinforcement(java.util.List objs,
float startWeight)
objs - the objects to calculate probabilities for.startWeight - the initial weight for each object in the weight
vector
public UniformReinforcement(java.util.List objs,
float startWeight,
float amtToUpdate)
objs - the objects to calculate probabilities for.startWeight - the initial weight for each object in the weight
vector
public UniformReinforcement(java.util.List objs,
float startWeight,
java.lang.Object exclude)
objs - the objects to calculate probabilities for.startWeight - the initial weight for each object in the weight
vectorexclude - the object to exclude from the list of objects
public UniformReinforcement(java.util.List objs,
float startWeight,
java.lang.Object exclude,
float amtToUpdate)
objs - the objects to calculate probabilities for.startWeight - the initial weight for each object in the weight
vectorexclude - the object to exclude from the list of objects| Method Detail |
|---|
public void setPastDiscount(float val)
public RangeMap makeProbabilityMap(RangeMap map)
AbstractProbabilityRule
makeProbabilityMap in interface ProbabilityRulemakeProbabilityMap in class AbstractProbabilityRulepublic double getProbability(java.lang.Object o)
getProbability in interface ProbabilityRulegetProbability in class AbstractProbabilityRulepublic void update(java.lang.Object o)
update in interface ProbabilityRuleupdate in class AbstractProbabilityRule
public void update(java.lang.Object o,
float amt)
ProbabilityRule
update in interface ProbabilityRuleupdate in class AbstractProbabilityRule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||