org.encog.util.obj
T - The type of object to choose from.public class ChooseObject<T> extends Object implements Serializable
| Constructor and Description |
|---|
ChooseObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(double probability,
T opp)
Add an object.
|
void |
clear()
CLear all objects from the collection.
|
void |
finalizeStructure()
Finalize the structure and set the probabilities.
|
List<ObjectHolder<T>> |
getList() |
T |
pick(Random theGenerator)
Choose a random object.
|
T |
pickFirst() |
int |
size() |
public void finalizeStructure()
public void add(double probability,
T opp)
probability - The probability to choose this object.opp - The object to add.public int size()
public T pick(Random theGenerator)
theGenerator - public List<ObjectHolder<T>> getList()
public void clear()
public T pickFirst()
Copyright © 2014. All Rights Reserved.