net.sourceforge.combean.mathprog.grooml
Class GDynamicExpression

An expression with a dynamic definition. The expression contains a dynamic inner expression that is defined based on a Closure. When the terms of the expression are accessed, the Closure is evaluated in the current environment (i.e. with the current environment object as delegate) and the result is converted to an expression.

Field Summary
 Closure genExpr
           
 
Constructor Summary
GDynamicExpression(Closure genExpr)
            Constructor
 
Method Summary
Iterator evaluate(Object env)
           Access the terms of the expression
 

Constructor Detail

GDynamicExpression

public GDynamicExpression(Closure genExpr)
Constructor
params:
genExpr closure which dynamically defines and expression


Method Detail

evaluate

public Iterator evaluate(Object env)
Access the terms of the expression
params:
env the environment in which the expression shall be evaluated
returns:
an iterator through the terms in the expression