public class ReceptorManager
extends java.lang.Object
| Constructor and Description |
|---|
ReceptorManager()
Creates an empty set of receptors.
|
ReceptorManager(java.io.FileReader p_file)
Loads a set of receptors from a file.
|
ReceptorManager(ReceptorPattern p_pattern,
int p_number)
Creates a new ReceptorManager with a given receptor pattern and number of receptors.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Receptor p_receptor)
Adds a single receptor to the set.
|
int |
count()
Returns the number of receptors in the set.
|
Receptor[] |
getReceptors()
Returns an array with references to all receptors in the set, ordered by the order in which they were inserted.
|
void |
remove(Receptor p_receptor)
Removes a receptor from the set.
|
void |
repopulate(ReceptorPattern p_pattern,
int p_number)
Regenerates receptors using a set pattern.
|
void |
save(java.io.FileWriter fout)
Saves the Receptor manager to the file provided.
|
public ReceptorManager(ReceptorPattern p_pattern, int p_number) throws ValueOutOfBoundsException
p_pattern - The pattern to generate new receptors using.p_number - The number of receptors to generate, should generally be identical to the number of input neurons provided by the net stackValueOutOfBoundsException - in the event that number is not validpublic ReceptorManager()
public ReceptorManager(java.io.FileReader p_file)
throws java.io.IOException
p_file - The FileReader to read the data fromjava.io.IOException - in the event that any error prevents loading the file.public void repopulate(ReceptorPattern p_pattern, int p_number) throws ValueOutOfBoundsException
p_pattern - The pattern to generate new receptors using.p_number - The number of receptors to generate, should generally be identical to the number of input neurons provided by the net stackValueOutOfBoundsException - in the event that number is not validpublic void save(java.io.FileWriter fout)
throws java.io.IOException
fout - The file to write to.java.io.IOException - in the event that any save aspect fails.public void add(Receptor p_receptor)
p_receptor - The receptor to add.public void remove(Receptor p_receptor) throws ItemNotFoundException
p_receptor - The receptor to attempt removal ofItemNotFoundException - in the event that the given receptor is not presentpublic int count()
public Receptor[] getReceptors()