ru.biosoft.math.model
Class MatlabFormatter

java.lang.Object
  extended byru.biosoft.math.model.LinearFormatter
      extended byru.biosoft.math.model.PiecewiseExtFormatter
          extended byru.biosoft.math.model.MatlabFormatter
All Implemented Interfaces:
Formatter

public class MatlabFormatter
extends PiecewiseExtFormatter


Field Summary
protected static java.util.HashMap badFuncNames
           
protected  java.util.List usedVariableList
           
 
Fields inherited from class ru.biosoft.math.model.PiecewiseExtFormatter
auxVariableCounter, auxVariableName
 
Fields inherited from class ru.biosoft.math.model.LinearFormatter
endl, result
 
Constructor Summary
MatlabFormatter(java.util.List usedVariableList)
           
 
Method Summary
protected  java.lang.String getFunctionName(java.lang.String name)
           
protected  void processConstant(AstConstant node)
           
protected  void processElseIf(AstPiece node)
           
protected  void processFunction(AstFunNode node)
           
protected  void processFunctionDeclaration(AstFunctionDeclaration node)
           
protected  void processIf(AstPiece node)
           
protected  void processOtherwise(AstPiece node)
           
protected  void processPiecewiseBegin(Node node)
          Auxiliary variables initialization
protected  void processPiecewiseEnd(Node node)
          Prints some final keyword if necessary
protected  void processVariable(AstVarNode node)
           
 
Methods inherited from class ru.biosoft.math.model.PiecewiseExtFormatter
format, processPiecewise, resetVariableCounter
 
Methods inherited from class ru.biosoft.math.model.LinearFormatter
needParenthis, processNode, processPiece
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

usedVariableList

protected java.util.List usedVariableList

badFuncNames

protected static java.util.HashMap badFuncNames
Constructor Detail

MatlabFormatter

public MatlabFormatter(java.util.List usedVariableList)
Method Detail

getFunctionName

protected java.lang.String getFunctionName(java.lang.String name)
Overrides:
getFunctionName in class LinearFormatter

processConstant

protected void processConstant(AstConstant node)
Overrides:
processConstant in class LinearFormatter

processFunction

protected void processFunction(AstFunNode node)
Overrides:
processFunction in class LinearFormatter

processFunctionDeclaration

protected void processFunctionDeclaration(AstFunctionDeclaration node)
Overrides:
processFunctionDeclaration in class LinearFormatter

processIf

protected void processIf(AstPiece node)
Specified by:
processIf in class PiecewiseExtFormatter

processElseIf

protected void processElseIf(AstPiece node)
Specified by:
processElseIf in class PiecewiseExtFormatter

processOtherwise

protected void processOtherwise(AstPiece node)
Specified by:
processOtherwise in class PiecewiseExtFormatter

processPiecewiseEnd

protected void processPiecewiseEnd(Node node)
Description copied from class: PiecewiseExtFormatter
Prints some final keyword if necessary

Specified by:
processPiecewiseEnd in class PiecewiseExtFormatter

processPiecewiseBegin

protected void processPiecewiseBegin(Node node)
Description copied from class: PiecewiseExtFormatter
Auxiliary variables initialization

Specified by:
processPiecewiseBegin in class PiecewiseExtFormatter

processVariable

protected void processVariable(AstVarNode node)
Overrides:
processVariable in class LinearFormatter


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.