org.jscience.computing.ai.planning
Class Plan

java.lang.Object
  extended by org.jscience.computing.ai.planning.Plan

public class Plan
extends java.lang.Object

This class represent a plan as a LinkedList of ground instances of operators.


Constructor Summary
Plan()
          To initialize the plan to an empty list.
 
Method Summary
 double addOperator(Operator op, Term[] binding)
          To add an operator instance to the end of the plan.
 java.lang.Object clone()
          To clone an object of this class.
 void removeOperator(double opCost)
          To remove the operator instance at the end of the plan.
 java.lang.String toString()
          This function returns a printable String representation of this plan.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Plan

public Plan()
To initialize the plan to an empty list.

Method Detail

addOperator

public double addOperator(Operator op,
                          Term[] binding)
To add an operator instance to the end of the plan.

Parameters:
op - the operator the instance of which is being added.
binding - the binding to instantiate the operator.
Returns:
the cost of the operator instance being added.

clone

public java.lang.Object clone()
To clone an object of this class.

Overrides:
clone in class java.lang.Object
Returns:
DOCUMENT ME!

removeOperator

public void removeOperator(double opCost)
To remove the operator instance at the end of the plan.

Parameters:
opCost - the cost of the operator instance to be removed.

toString

public java.lang.String toString()
This function returns a printable String representation of this plan.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this plan.