Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.math.model
Class AstFunctionDeclaration

    ru.biosoft.math.model.SimpleNode
      |
      +--ru.biosoft.math.model.AstFunctionDeclaration

public class AstFunctionDeclaration
extends SimpleNode
implements Function, ParserContext

Function declaration, it corresponds lambda element in MathML. Function declaration syntax is following:

    FunctionDeclaration ::= ( "function" Identifier "(" ArgumentDeclaration ( "," ArgumentDeclaration )* ")"  Expression )

Example:

     function f(x, y) = sin(x) + cos(y);

Parser contex issues: Linear parser checks whether the function uses declared variables, for this purpose it uses its own parser context.

Constructor Summary
`AstFunctionDeclaration(int id)`

Method Summary
`boolean` | `containsConstant(String name)`
`boolean` | `containsVariable(String name)`
`void` | `declareConstant(String name, Object value)`
`void` | `declareFunction(Function function)`
`void` | `declareVariable(String name, Object value)`
`Object` | `getConstantValue(String name)`
`Function` | `getFunction(String name)`
`String` | `getName()`
`int` | `getNumberOfParameters()`
`int` | `getPriority()`
`Object` | `getVariableValue(String name)`
`void` | `init(ParserContext parent)`
`void` | `setName(String name)`
`String` | `toString()`

Methods inherited from class ru.biosoft.math.model.SimpleNode
`dump, dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtReplaceChild, jjtSetParent, toString`

Constructor Detail

### AstFunctionDeclaration

    public AstFunctionDeclaration(int id)

Method Detail

### containsConstant

    public boolean containsConstant(String name)

### containsVariable

    public boolean containsVariable(String name)

### declareConstant

    public void declareConstant(String name, Object value)

### declareFunction

    public void declareFunction(Function function)

### declareVariable

    public void declareVariable(String name, Object value)

### getConstantValue

    public Object getConstantValue(String name)

### getFunction

    public Function getFunction(String name)

### getName

    public String getName()

### getNumberOfParameters

    public int getNumberOfParameters()

### getPriority

    public int getPriority()

### getVariableValue

    public Object getVariableValue(String name)

### init

    public void init(ParserContext parent)

### setName

    public void setName(String name)

### toString

    public String toString()

Association Links

to Class java.lang.String

  Function name.

to Class ru.biosoft.math.model.ParserContext

to Class java.util.HashMap

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM