JAGA Homepage

org.jaga.reproduction.booleanFormulas.nodes
Class OperatorNode

java.lang.Object
  extended by org.jaga.reproduction.booleanFormulas.nodes.BooleanFormulaTreeNode
      extended by org.jaga.reproduction.booleanFormulas.nodes.OperatorNode
Direct Known Subclasses:
BinaryOperatorNode, TertiaryOperatorNode, UnaryOperatorNode

public abstract class OperatorNode
extends BooleanFormulaTreeNode

TODO: Complete these comments.

Project: JAGA - Java API for Genetic Algorithms.

Company: University College London and JAGA.Org (http://www.jaga.org).

Copyright: (c) 2004 by G. Paperin.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, ONLY if you include a note of the original author(s) in any redistributed/modified copy.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/gpl.html

Version:
JAGA public release 1.0 beta
Author:
Greg Paperin (greg@jaga.org)

Field Summary
(package private)  BooleanFormulaTreeNode[] children
           
 
Constructor Summary
OperatorNode()
           
 
Method Summary
 java.lang.Object clone()
           
 int findChild(BooleanFormulaTreeNode node)
           
 BooleanFormulaTreeNode getChild(int index)
           
(package private) abstract  java.lang.String getOperatorName()
           
abstract  int getRequiredChildrenNumber()
           
private  void initChildrenArray()
           
(package private)  void propagateNewHeight()
           
 int recalcHeight()
           
 void setChild(int index, BooleanFormulaTreeNode node)
           
private  void validateChildIndex(int index)
           
 
Methods inherited from class org.jaga.reproduction.booleanFormulas.nodes.BooleanFormulaTreeNode
evaluate, getDepth, getHandle, getHeight, getParent, setDepth, setHandle, setHeight, setParent, toString, toString, toStringBuffer
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

BooleanFormulaTreeNode[] children
Constructor Detail

OperatorNode

public OperatorNode()
Method Detail

getRequiredChildrenNumber

public abstract int getRequiredChildrenNumber()
Specified by:
getRequiredChildrenNumber in class BooleanFormulaTreeNode

getOperatorName

abstract java.lang.String getOperatorName()

clone

public java.lang.Object clone()
Specified by:
clone in class BooleanFormulaTreeNode

recalcHeight

public int recalcHeight()
Specified by:
recalcHeight in class BooleanFormulaTreeNode

propagateNewHeight

void propagateNewHeight()

setChild

public void setChild(int index,
                     BooleanFormulaTreeNode node)

validateChildIndex

private void validateChildIndex(int index)
                         throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

findChild

public int findChild(BooleanFormulaTreeNode node)

getChild

public BooleanFormulaTreeNode getChild(int index)

initChildrenArray

private void initChildrenArray()

JAGA Homepage

Go to JAGA Homepage