Documentation of 'ec.gp.ge.GrammarFunctionNode' Java class
GrammarFunctionNode
ec.gp.ge

Class GrammarFunctionNode

  • All Implemented Interfaces:
    java.io.Serializable


    public class GrammarFunctionNode
    extends GrammarNode
    A GrammarNode representing a GPNode in the GE Grammar. The head of the GrammarFunctionNode is the name of the GPNode in the grammar; and the children are various arguments to the node as defined by the grammar. These are returned by getArgument(...) and getNumArguments(). The GrammarFunctionNode holds a prototypical GPNode from which clones can be made.
    See Also:
    Serialized Form
    • Constructor Detail

      • GrammarFunctionNode

        public GrammarFunctionNode(GPFunctionSet gpfs,
                                   java.lang.String name)
        Determines the GPNode from the function set by the name. If there is more than one such node (which shouldn't be the case) then only the first such node is used. Stores the prototype.
      • GrammarFunctionNode

        public GrammarFunctionNode(java.lang.String name)
    • Method Detail

      • addArgument

        public void addArgument(GrammarNode arg)
        Adds a given argument to the node.
      • getNumArguments

        public int getNumArguments()
        Returns the number of arguments.
      • getArgument

        public GrammarNode getArgument(int index)
        Returna given argument.
      • getGPNodePrototype

        public GPNode getGPNodePrototype()
        Returns the prototype without cloning it first. Be certain to clone before using.
      • toString

        public java.lang.String toString()
        A better toString() function -- khaled
        Specified by:
        toString in class GrammarNode

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.