|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.gp.GPType
ec.gp.GPSetType
A GPSetType is a GPType which contains GPAtomicTypes in a set, and is used as a generic GP type. For more information, see GPType GPSetTypes implement their set using both a hash table and an array. if the size of the set is "significantly big", then the hash table is used to look up membership in the set (O(1), but with a big constant). If the size is small, then the array is used (O(n)). The dividing line is determined by the constant START_USING_HASH_BEYOND, which you might play with to optimize for your system.
GPType
,
Serialized FormField Summary | |
static java.lang.String |
P_MEMBER
|
static java.lang.String |
P_SIZE
|
java.util.Hashtable |
types_h
The hashtable of types in the set |
int[] |
types_packed
A packed, sorted array of atomic types in the set |
boolean[] |
types_sparse
A sparse array of atomic types in the set |
Fields inherited from class ec.gp.GPType |
name, P_NAME, type |
Constructor Summary | |
GPSetType()
You should not construct new types. |
Method Summary | |
boolean |
compatibleWith(GPInitializer initializer,
GPType t)
Am I compatible with ("fit" with) t? For two atomic types, this is done by direct pointer equality. |
void |
postProcessSetType(int totalAtomicTypes)
Sets up the packed and sparse arrays based on the hashtable |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
Methods inherited from class ec.gp.GPType |
toString, typeFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String P_MEMBER
public static final java.lang.String P_SIZE
public int[] types_packed
public boolean[] types_sparse
public java.util.Hashtable types_h
Constructor Detail |
public GPSetType()
Method Detail |
public void postProcessSetType(int totalAtomicTypes)
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class GPType
public final boolean compatibleWith(GPInitializer initializer, GPType t)
GPType
compatibleWith
in class GPType
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |