Jasmine  1.1
Super fast expression and algorithm evaluator
 All Classes Functions
org.quark.jasmine.Expression Class Referenceabstract
Inheritance diagram for org.quark.jasmine.Expression:

Public Member Functions

abstract Expression eval (double...vars)
- Public Member Functions inherited from org.quark.jasmine.AbstractExpression
 AbstractExpression ()
Answer answer ()
long getBuildTime ()
long getEvalTime ()
String infix ()
String ast ()
String bytecode ()

Additional Inherited Members

- Protected Member Functions inherited from org.quark.jasmine.AbstractExpression
String makeInfix (List< Exp > infix)
String makeAST (Exp ast)
String makeAST (Deque< Exp > ast)
void mmakeASTimpl (Exp exp, String tab, StringBuilder sb)
String makeByteCode (byte[] b)
- Protected Attributes inherited from org.quark.jasmine.AbstractExpression
long __buildTime
long __evalTime
Answer __answer
String infix
String ast
String bytecode

Detailed Description

Abstract class for all Expressions.

Peter Lager

Member Function Documentation

abstract Expression org.quark.jasmine.Expression.eval ( double...  vars)
pure virtual

This method is overridden in the generated class.

This method accepts zero or more values to be used in the expression. They are matched, in order, to the variables found in the expression. For example if the expression is

"4 + h * a / sin(a * b)"

then evaluating the method with

expression.eval(2.1, 6.2, -7.2);

will initialise the variables as

h = 2.1;  a = 6.2;  b = -7.2;

This method returns 'this' so for example you can chain like this:

expression.eval(2.1, 6.2, -7.2).answer().toDouble(); 

to get the answer as a float.

varsthe initial values for variables
this Expression

The documentation for this class was generated from the following file: