wodka.ga.geno.lang
Class AbstractProgram
java.lang.Object
wodka.ga.geno.lang.AbstractProgram
- All Implemented Interfaces:
- Genotype, Program, java.io.Serializable, StreamPersistable
- Direct Known Subclasses:
- AssemblerProgram, TurtleProgram
- public abstract class AbstractProgram
- extends java.lang.Object
- implements Program
A sequence of commands.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
globalRanges
protected SodaGlobalsRanges globalRanges
language
protected Language language
AbstractProgram
public AbstractProgram()
AbstractProgram
public AbstractProgram(SodaGlobalsRanges ranges)
getCommands
public java.util.Collection getCommands()
setCommands
public void setCommands(java.util.Collection commands)
getGlobalRanges
public SodaGlobalsRanges getGlobalRanges()
setGlobalRanges
public void setGlobalRanges(SodaGlobalsRanges globalRanges)
getLanguage
public Language getLanguage()
- Specified by:
getLanguage in interface Program
setLanguage
public void setLanguage(Language language)
getGenotypeDesc
public GenotypeDesc getGenotypeDesc()
- Specified by:
getGenotypeDesc in interface Genotype
setGenotypeDesc
public void setGenotypeDesc(GenotypeDesc geno)
- Specified by:
setGenotypeDesc in interface Genotype
getGlobals
public SodaGlobals getGlobals()
- Specified by:
getGlobals in interface Program
setGlobals
public void setGlobals(SodaGlobals globals)
- Specified by:
setGlobals in interface Program
add
public void add(Command cmd)
- Specified by:
add in interface Program
createRandomAttributes
public void createRandomAttributes()
commands
public java.util.Iterator commands()
- Specified by:
commands in interface Program
recombine
public Genotype recombine(Genotype parent,
double mutationRate)
- Specified by:
recombine in interface Genotype
toString
public java.lang.String toString()
toStream
public void toStream(java.io.DataOutputStream outStream)
throws java.io.IOException
- Specified by:
toStream in interface StreamPersistable
- Throws:
java.io.IOException
fromStream
public void fromStream(java.io.DataInputStream inStream,
int version)
throws java.io.IOException
- Specified by:
fromStream in interface StreamPersistable
- Throws:
java.io.IOException
getVersion
public int getVersion()
- Specified by:
getVersion in interface StreamPersistable
eval
public Model eval()
- Specified by:
eval in interface Genotype
evalNoRewise
public Model evalNoRewise()
- Specified by:
evalNoRewise in interface Genotype