Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.lsmp.djep.matrixJep
Class MatrixPreprocessor

    java.lang.Object
      org.lsmp.djep.matrixJep.MatrixPreprocessor

All Implemented Interfaces:
  ParserVisitor

    public class MatrixPreprocessor

extends java.lang.Object
implements ParserVisitor

This visitor does the majority of preprocessing work. Specifically it

- Sets the dimension of each node.
- For assignment equations it adds an entry in the VariableTable
- For diff opperator it calculates the derivative.
- For the List opperator it finds the dimensions and returns a ASTTensor.
- For the Hat opperator it finds the dimension and returns a Power or Wedge opperator.

The visitor will return a new Tree.

Author:
  Rich Morris Created on 30-Oct-2003

Constructor Summary
`MatrixPreprocessor()`

Method Summary
`MatrixNodeI` | `preprocess(Node node, MatrixJep mdjep)` Main entry point: pre-process a node.
`java.lang.Object` | `visit(ASTConstant node, java.lang.Object data)` constants
`java.lang.Object` | `visit(ASTFunNode node, java.lang.Object data)` visit functions and operators
`java.lang.Object` | `visit(ASTStart node, java.lang.Object data)`
`java.lang.Object` | `visit(ASTVarNode node, java.lang.Object data)` multi-dimensional differentiable variables
`java.lang.Object` | `visit(SimpleNode node, java.lang.Object data)`
`MatrixNodeI[]` | `visitChildrenAsArray(Node node, java.lang.Object data)` Returns an array of matrix nodes which are the results of visiting each child.
`java.lang.Object` | `visitOp(ASTFunNode node, java.lang.Object data)` operators +,-,*,/

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MatrixPreprocessor

    public MatrixPreprocessor()

Method Detail

### preprocess

    public MatrixNodeI preprocess(Node node,
                                  MatrixJep mdjep)
                           throws ParseException

  Main entry point: pre-process a node.

  Parameters:
    `node` - Top node of tree.
    `mdjep` - Reference to MatrixJep instance
  Returns:
    A new tree with all preprocessing carried out.
  Throws:
    `ParseException`

### visitChildrenAsArray

    public MatrixNodeI[] visitChildrenAsArray(Node node,
                                              java.lang.Object data)
                                       throws ParseException

  Returns an array of matrix nodes which are the results of visiting each child.

  Throws:
    `ParseException`

### visit

    public java.lang.Object visit(SimpleNode node,
                                  java.lang.Object data)

  Specified by:
    `visit` in interface `ParserVisitor`

### visit

    public java.lang.Object visit(ASTStart node,
                                  java.lang.Object data)

  Specified by:
    `visit` in interface `ParserVisitor`

### visit

    public java.lang.Object visit(ASTConstant node,
                                  java.lang.Object data)
                           throws ParseException

  constants

  Specified by:
    `visit` in interface `ParserVisitor`
  Throws:
    `ParseException`

### visit

    public java.lang.Object visit(ASTVarNode node,
                                  java.lang.Object data)
                           throws ParseException

  multi-dimensional differentiable variables

  Specified by:
    `visit` in interface `ParserVisitor`
  Throws:
    `ParseException`

### visit

    public java.lang.Object visit(ASTFunNode node,
                                  java.lang.Object data)
                           throws ParseException

  visit functions and operators

  Specified by:
    `visit` in interface `ParserVisitor`
  Throws:
    `ParseException`

### visitOp

    public java.lang.Object visitOp(ASTFunNode node,
                                    java.lang.Object data)
                             throws ParseException

  operators +,-,*,/

  Throws:
    `ParseException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

http://www.singularsys.com/jep Copyright © 2007 Singular Systems