COM.hugin.HAPI
Class Expression

java.lang.Object
  extended byCOM.hugin.HAPI.Expression
Direct Known Subclasses:
CompositeExpression, ConstantExpression, NodeExpression

public class Expression
extends java.lang.Object

Expression is the ancestor of all expression classes. Expression classes are used to build expressions for discrete chance node tables and utility tables (see also class Model).


Field Summary
static int H_OPERATOR_ABS
           
static int H_OPERATOR_ADD
           
static int H_OPERATOR_AND
           
static int H_OPERATOR_BETA
           
static int H_OPERATOR_BINOMIAL
           
static int H_OPERATOR_BOOLEAN
           
static int H_OPERATOR_CEIL
           
static int H_OPERATOR_COS
           
static int H_OPERATOR_COSH
           
static int H_OPERATOR_DISTRIBUTION
           
static int H_OPERATOR_DIVIDE
           
static int H_OPERATOR_EQUALS
           
static int H_OPERATOR_ERROR
           
static int H_OPERATOR_EXP
           
static int H_OPERATOR_EXPONENTIAL
           
static int H_OPERATOR_FLOOR
           
static int H_OPERATOR_GAMMA
           
static int H_OPERATOR_GEOMETRIC
           
static int H_OPERATOR_GREATER_THAN
           
static int H_OPERATOR_GREATER_THAN_OR_EQUALS
           
static int H_OPERATOR_IF
           
static int H_OPERATOR_LABEL
           
static int H_OPERATOR_LESS_THAN
           
static int H_OPERATOR_LESS_THAN_OR_EQUALS
           
static int H_OPERATOR_LOG
           
static int H_OPERATOR_LOG10
           
static int H_OPERATOR_LOG2
           
static int H_OPERATOR_MAX
           
static int H_OPERATOR_MIN
           
static int H_OPERATOR_MOD
           
static int H_OPERATOR_MULTIPLY
           
static int H_OPERATOR_NEGATE
           
static int H_OPERATOR_NEGATIVEBINOMIAL
           
static int H_OPERATOR_NODE
           
static int H_OPERATOR_NOISYOR
           
static int H_OPERATOR_NORMAL
           
static int H_OPERATOR_NOT
           
static int H_OPERATOR_NOT_EQUALS
           
static int H_OPERATOR_NUMBER
           
static int H_OPERATOR_OR
           
static int H_OPERATOR_POISSON
           
static int H_OPERATOR_POWER
           
static int H_OPERATOR_SIN
           
static int H_OPERATOR_SINH
           
static int H_OPERATOR_SQRT
           
static int H_OPERATOR_SUBTRACT
           
static int H_OPERATOR_TAN
           
static int H_OPERATOR_TANH
           
static int H_OPERATOR_UNIFORM
           
static int H_OPERATOR_WEIBULL
           
 
Method Summary
 void delete()
          Deletes this Expression.
 java.lang.String expressionToString()
          Returns a String representation of this Expression.
 boolean isCompositeExpression()
          Tests if the the expression is a CompositeExpression.
 boolean isConstantExpression()
          Tests if the the expression is a ConstantExpression.
 boolean isNodeExpression()
          Tests if the the expression is a NodeExpression.
static Expression stringToExpression(java.lang.String expression, Model model, ExpressionParseListener parseListener)
          Converts a string to an Expression.
static Expression stringToExpression(java.lang.String expression, NetworkModel network, ExpressionParseListener parseListener)
          Deprecated. Replaced by stringToExpression(String, Model, ExpressionParseListener).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

H_OPERATOR_BETA

public static final int H_OPERATOR_BETA
See Also:
Constant Field Values

H_OPERATOR_BINOMIAL

public static final int H_OPERATOR_BINOMIAL
See Also:
Constant Field Values

H_OPERATOR_DISTRIBUTION

public static final int H_OPERATOR_DISTRIBUTION
See Also:
Constant Field Values

H_OPERATOR_EXPONENTIAL

public static final int H_OPERATOR_EXPONENTIAL
See Also:
Constant Field Values

H_OPERATOR_GAMMA

public static final int H_OPERATOR_GAMMA
See Also:
Constant Field Values

H_OPERATOR_GEOMETRIC

public static final int H_OPERATOR_GEOMETRIC
See Also:
Constant Field Values

H_OPERATOR_NEGATIVEBINOMIAL

public static final int H_OPERATOR_NEGATIVEBINOMIAL
See Also:
Constant Field Values

H_OPERATOR_NOISYOR

public static final int H_OPERATOR_NOISYOR
See Also:
Constant Field Values

H_OPERATOR_NORMAL

public static final int H_OPERATOR_NORMAL
See Also:
Constant Field Values

H_OPERATOR_POISSON

public static final int H_OPERATOR_POISSON
See Also:
Constant Field Values

H_OPERATOR_UNIFORM

public static final int H_OPERATOR_UNIFORM
See Also:
Constant Field Values

H_OPERATOR_WEIBULL

public static final int H_OPERATOR_WEIBULL
See Also:
Constant Field Values

H_OPERATOR_ABS

public static final int H_OPERATOR_ABS
See Also:
Constant Field Values

H_OPERATOR_ADD

public static final int H_OPERATOR_ADD
See Also:
Constant Field Values

H_OPERATOR_AND

public static final int H_OPERATOR_AND
See Also:
Constant Field Values

H_OPERATOR_BOOLEAN

public static final int H_OPERATOR_BOOLEAN
See Also:
Constant Field Values

H_OPERATOR_CEIL

public static final int H_OPERATOR_CEIL
See Also:
Constant Field Values

H_OPERATOR_COS

public static final int H_OPERATOR_COS
See Also:
Constant Field Values

H_OPERATOR_COSH

public static final int H_OPERATOR_COSH
See Also:
Constant Field Values

H_OPERATOR_DIVIDE

public static final int H_OPERATOR_DIVIDE
See Also:
Constant Field Values

H_OPERATOR_EQUALS

public static final int H_OPERATOR_EQUALS
See Also:
Constant Field Values

H_OPERATOR_ERROR

public static final int H_OPERATOR_ERROR
See Also:
Constant Field Values

H_OPERATOR_EXP

public static final int H_OPERATOR_EXP
See Also:
Constant Field Values

H_OPERATOR_FLOOR

public static final int H_OPERATOR_FLOOR
See Also:
Constant Field Values

H_OPERATOR_GREATER_THAN

public static final int H_OPERATOR_GREATER_THAN
See Also:
Constant Field Values

H_OPERATOR_GREATER_THAN_OR_EQUALS

public static final int H_OPERATOR_GREATER_THAN_OR_EQUALS
See Also:
Constant Field Values

H_OPERATOR_IF

public static final int H_OPERATOR_IF
See Also:
Constant Field Values

H_OPERATOR_LABEL

public static final int H_OPERATOR_LABEL
See Also:
Constant Field Values

H_OPERATOR_LESS_THAN

public static final int H_OPERATOR_LESS_THAN
See Also:
Constant Field Values

H_OPERATOR_LESS_THAN_OR_EQUALS

public static final int H_OPERATOR_LESS_THAN_OR_EQUALS
See Also:
Constant Field Values

H_OPERATOR_LOG

public static final int H_OPERATOR_LOG
See Also:
Constant Field Values

H_OPERATOR_LOG10

public static final int H_OPERATOR_LOG10
See Also:
Constant Field Values

H_OPERATOR_LOG2

public static final int H_OPERATOR_LOG2
See Also:
Constant Field Values

H_OPERATOR_MAX

public static final int H_OPERATOR_MAX
See Also:
Constant Field Values

H_OPERATOR_MIN

public static final int H_OPERATOR_MIN
See Also:
Constant Field Values

H_OPERATOR_MOD

public static final int H_OPERATOR_MOD
See Also:
Constant Field Values

H_OPERATOR_MULTIPLY

public static final int H_OPERATOR_MULTIPLY
See Also:
Constant Field Values

H_OPERATOR_NEGATE

public static final int H_OPERATOR_NEGATE
See Also:
Constant Field Values

H_OPERATOR_NODE

public static final int H_OPERATOR_NODE
See Also:
Constant Field Values

H_OPERATOR_NOT

public static final int H_OPERATOR_NOT
See Also:
Constant Field Values

H_OPERATOR_NOT_EQUALS

public static final int H_OPERATOR_NOT_EQUALS
See Also:
Constant Field Values

H_OPERATOR_NUMBER

public static final int H_OPERATOR_NUMBER
See Also:
Constant Field Values

H_OPERATOR_OR

public static final int H_OPERATOR_OR
See Also:
Constant Field Values

H_OPERATOR_POWER

public static final int H_OPERATOR_POWER
See Also:
Constant Field Values

H_OPERATOR_SIN

public static final int H_OPERATOR_SIN
See Also:
Constant Field Values

H_OPERATOR_SINH

public static final int H_OPERATOR_SINH
See Also:
Constant Field Values

H_OPERATOR_SQRT

public static final int H_OPERATOR_SQRT
See Also:
Constant Field Values

H_OPERATOR_SUBTRACT

public static final int H_OPERATOR_SUBTRACT
See Also:
Constant Field Values

H_OPERATOR_TAN

public static final int H_OPERATOR_TAN
See Also:
Constant Field Values

H_OPERATOR_TANH

public static final int H_OPERATOR_TANH
See Also:
Constant Field Values
Method Detail

stringToExpression

public static Expression stringToExpression(java.lang.String expression,
                                            Model model,
                                            ExpressionParseListener parseListener)
                                     throws ExceptionHugin
Converts a string to an Expression.

Parameters:
expression - the String to be parsed.
model - the Model to which the expression belongs.
parseListener - the ExpressionParseListener that handles parse errors occuring during the parsing of 'expression'.
Returns:
If the parsing completes successfully, an Expression object corresponding to 'expression' is returned.
Throws:
ExceptionHugin

stringToExpression

public static Expression stringToExpression(java.lang.String expression,
                                            NetworkModel network,
                                            ExpressionParseListener parseListener)
                                     throws ExceptionHugin
Deprecated. Replaced by stringToExpression(String, Model, ExpressionParseListener).

Throws:
ExceptionHugin

isCompositeExpression

public boolean isCompositeExpression()
                              throws ExceptionObjectNotAlive
Tests if the the expression is a CompositeExpression.

Returns:
A boolean.
Throws:
ExceptionObjectNotAlive

isConstantExpression

public boolean isConstantExpression()
                             throws ExceptionObjectNotAlive
Tests if the the expression is a ConstantExpression.

Returns:
A boolean.
Throws:
ExceptionObjectNotAlive

isNodeExpression

public boolean isNodeExpression()
                         throws ExceptionObjectNotAlive
Tests if the the expression is a NodeExpression.

Returns:
A boolean.
Throws:
ExceptionObjectNotAlive

expressionToString

public java.lang.String expressionToString()
                                    throws ExceptionHugin
Returns a String representation of this Expression.

Throws:
ExceptionHugin

delete

public void delete()
            throws ExceptionHugin
Deletes this Expression.

Throws:
ExceptionHugin