|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.distr.Culture
public class Culture
Culture is a memory not being bound to a generation, but possibly persistent during the whole history of a genotype (over all generations). See GPConfiguration for current support of culture with Genetic Programming.
Also see http://cs.gmu.edu/~sean/papers/culture-gp96.pdf
| Constructor Summary | |
|---|---|
Culture(int a_size)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the memory. |
int |
compareTo(java.lang.Object a_other)
The compareTo-method. |
boolean |
contains(java.lang.String a_name)
Checks if a memory cell with the given name exists. |
boolean |
equals(java.lang.Object a_other)
The equals-method. |
CultureMemoryCell |
get(int a_index)
Retrieves the memory cell at the given index. |
CultureMemoryCell |
get(java.lang.String a_name)
Retrieves the memory cell at the given index. |
CultureMemoryCell |
getMatrix(int a_x,
int a_y)
Reads a value from the matrix memory that was previously stored with setMatrix(...). |
java.util.List |
getMemoryNames()
|
CultureMemoryCell |
set(int a_index,
double a_value,
int a_historySize,
java.lang.String a_name)
Sets a memory cell with a given value. |
CultureMemoryCell |
set(int a_index,
java.lang.Object a_value,
int a_historySize,
java.lang.String a_infotext)
Sets a memory cell with a given value. |
CultureMemoryCell |
set(java.lang.String a_name,
java.lang.Object a_value,
int a_historySize)
Sets a memory cell with a given value. |
CultureMemoryCell |
setMatrix(int a_x,
int a_y,
java.lang.Object a_value)
Stores a value in the matrix memory. |
void |
setMatrixWidth(int a_width)
Sets the width of the matrix memory. |
int |
size()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Culture(int a_size)
a_size - the size of the memory in cells (CultureMemoryCell instances)| Method Detail |
|---|
public CultureMemoryCell set(int a_index,
double a_value,
int a_historySize,
java.lang.String a_name)
a_index - index of the memory cella_value - value to set in the memorya_historySize - size of history to use, or less than 1 for turning
history offa_name - informative name of the memory cell
public CultureMemoryCell set(int a_index,
java.lang.Object a_value,
int a_historySize,
java.lang.String a_infotext)
a_index - index of the memory cella_value - value to set in the memorya_historySize - size of history to use, or less than 1 for turning
history offa_infotext - informative name of the memory cell
public CultureMemoryCell set(java.lang.String a_name,
java.lang.Object a_value,
int a_historySize)
a_name - named index of the memory cella_value - value to set in the memorya_historySize - size of history to use, or less than 1 for turning
history off
public CultureMemoryCell get(int a_index)
a_index - index of the memory cell to read out
public CultureMemoryCell get(java.lang.String a_name)
a_name - name of the memory cell to read out
public boolean contains(java.lang.String a_name)
a_name - the name of the cell to check
public int size()
public java.lang.String toString()
toString in class java.lang.Objectpublic void clear()
public java.util.List getMemoryNames()
public boolean equals(java.lang.Object a_other)
equals in class java.lang.Objecta_other - the other object to compare
public int compareTo(java.lang.Object a_other)
compareTo in interface java.lang.Comparablea_other - the other object to compare
public void setMatrixWidth(int a_width)
a_width - the width the matrix should have
public CultureMemoryCell setMatrix(int a_x,
int a_y,
java.lang.Object a_value)
a_x - the first coordinate of the matrix (width)a_y - the second coordinate of the matrix (height)a_value - the value to store
public CultureMemoryCell getMatrix(int a_x,
int a_y)
a_x - the first coordinate of the matrix (width)a_y - the second coordinate of the matrix (height)
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||