Class AbstractELExpression

java.lang.Object
  |
  +--AbstractELExpression
All Implemented Interfaces:
java.lang.Cloneable, ELExpression
Direct Known Subclasses:
ELCall, ELMorphInterpolator, ELScalar, ELVector

public abstract class AbstractELExpression
extends java.lang.Object
implements ELExpression

Some common implementation code for ELExpressions.


Constructor Summary
AbstractELExpression()
           
 
Method Summary
abstract  java.lang.Object clone()
           
protected  ELExpression cloneSiblingMutation(ELCall parent, GeneticParameters gp)
          Returns the genetic clone of one of this expression's siblings.
protected  ELExpression cloneWithChildMutations(GeneticParameters gp)
          Clone, genetically cloning children but perfectly cloning this expression itself.
 ELExpression cloneWithReplacement(ELExpression e, int p)
          default is only appropriate when cloneWithChildMutations has no children.
protected  ELExpression encloseInNewCallMutation(GeneticParameters gp)
          Returns a clone of this expression with the children genetically cloned, surrounded by another randomly generated expression.
 ELExpression getNestedSubexpression(int targetNumber)
          returns this.
 boolean hasExternalInfluences()
          Returns true if the output is influenced by the environment.
 int numNestedSubexpressions()
          Returns 1.
 ELExpression randomNestedSubexpression()
          Returns this.
 boolean sameExpression(ELExpression other)
          Return true if this and other are equivalent expressions (unparse to the same value).
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ELExpression
evaluate, geneticClone, unparse
 

Constructor Detail

AbstractELExpression

public AbstractELExpression()
Method Detail

numNestedSubexpressions

public int numNestedSubexpressions()
Returns 1.
Specified by:
numNestedSubexpressions in interface ELExpression

randomNestedSubexpression

public ELExpression randomNestedSubexpression()
Returns this.
Specified by:
randomNestedSubexpression in interface ELExpression

hasExternalInfluences

public boolean hasExternalInfluences()
Description copied from interface: ELExpression
Returns true if the output is influenced by the environment.
Specified by:
hasExternalInfluences in interface ELExpression

getNestedSubexpression

public ELExpression getNestedSubexpression(int targetNumber)
returns this.
Specified by:
getNestedSubexpression in interface ELExpression

cloneWithReplacement

public ELExpression cloneWithReplacement(ELExpression e,
                                         int p)
default is only appropriate when cloneWithChildMutations has no children.
Specified by:
cloneWithReplacement in interface ELExpression
Following copied from interface: ELExpression
Parameters:
expression - Is not cloned.

cloneSiblingMutation

protected ELExpression cloneSiblingMutation(ELCall parent,
                                            GeneticParameters gp)
Returns the genetic clone of one of this expression's siblings. This is convenient to call when implementing geneticClone().

encloseInNewCallMutation

protected ELExpression encloseInNewCallMutation(GeneticParameters gp)
Returns a clone of this expression with the children genetically cloned, surrounded by another randomly generated expression. It may be convenient to call this when implementing geneticClone().

cloneWithChildMutations

protected ELExpression cloneWithChildMutations(GeneticParameters gp)
Clone, genetically cloning children but perfectly cloning this expression itself. The default implementation of encloseInNewCallMutation calls this method.

sameExpression

public boolean sameExpression(ELExpression other)
Description copied from interface: ELExpression
Return true if this and other are equivalent expressions (unparse to the same value).
Specified by:
sameExpression in interface ELExpression

clone

public abstract java.lang.Object clone()
Specified by:
clone in interface ELExpression
Overrides:
clone in class java.lang.Object