C# 클래스 MathParserDataStructures.MathObj

파일 보기 프로젝트 열기: FlorianRappl/YAMP

공개 메소드들

메소드 설명
Evaluate ( string mathInput, char vars, double varsValues ) : double

Evaluate the mathematical expression.

GetPolishPostfixExpression ( ) : MathParserDataStructures.Operation[]

Polish postfix expression.

GetVariables ( ) : char[]

Gets the array of variables

GetVariablesValues ( ) : double[]

Gets the array of variable's values

MathObj ( ) : System

Create new MathObj object

보호된 메소드들

메소드 설명
CalculateValue ( ) : double

Calculate the value of the polish postfix notation

GeneratePolishPostfixExpression ( ) : void

Generates polish postfix expression.

SemanticTransform ( ) : void

Perform semantic transform of the introduced expression. Check if the expression is valid and build BinaryTree needed for polish postfix expression.

비공개 메소드들

메소드 설명
Acos ( Stack stack ) : void

Acos

Acot ( Stack stack ) : void

Acot

Asin ( Stack stack ) : void

Asin

Atan ( Stack stack ) : void

Atan

Cos ( Stack stack ) : void

Consine

Cot ( Stack stack ) : void

Cotangent

Csc ( Stack stack ) : void

Cosecant

End ( Stack stack ) : void

End of the input stream.

Exp ( Stack stack ) : void

Exp

ExpressionToTermW ( Stack stack ) : void

Expression to TermW (E->TW)

Factor ( Stack stack ) : void

Factor

FindValueOfSubstring ( ) : double

Finds the value of substring in the input string.

KtoYKorKtoEps ( Stack stack ) : void

K->YK or K->eps

Log ( Stack stack ) : void

Logarithm

ParanthesisClose ( Stack stack ) : void

Closing paranthesis.

PowerToFactoV ( Stack stack ) : void

Power->FactorV

Sec ( Stack stack ) : void

Secant

Sin ( Stack stack ) : void

Sine

Sqrt ( Stack stack ) : void

Sqrt

Tan ( Stack stack ) : void

Tangent

TermToPowerK ( Stack stack ) : void

Term -> PowerK

VtoZVorVtoEps ( Stack stack ) : void

V->ZV or V->eps

WtoXWorEps ( Stack stack ) : void

W->XW or W->eps

XtoMinusTermOrXtoPlusTerm ( Stack stack ) : void

X->-T or X->+T

YtoMultiplyPowerOrYtoDividePower ( Stack stack ) : void

Y->*P or Y->/P

ZtoPowerFactor ( Stack stack ) : void

Z->^Factor

메소드 상세

CalculateValue() 보호된 메소드

Calculate the value of the polish postfix notation
protected CalculateValue ( ) : double
리턴 double

Evaluate() 공개 메소드

Evaluate the mathematical expression.
MathParserException ArgumentException
public Evaluate ( string mathInput, char vars, double varsValues ) : double
mathInput string Mathematical expression
vars char Character variables contained within the expression[x,y,z etc.]
varsValues double Coresponding values of character variables within the expression
리턴 double

GeneratePolishPostfixExpression() 보호된 메소드

Generates polish postfix expression.
protected GeneratePolishPostfixExpression ( ) : void
리턴 void

GetPolishPostfixExpression() 공개 메소드

Polish postfix expression.
public GetPolishPostfixExpression ( ) : MathParserDataStructures.Operation[]
리턴 MathParserDataStructures.Operation[]

GetVariables() 공개 메소드

Gets the array of variables
public GetVariables ( ) : char[]
리턴 char[]

GetVariablesValues() 공개 메소드

Gets the array of variable's values
public GetVariablesValues ( ) : double[]
리턴 double[]

MathObj() 공개 메소드

Create new MathObj object
public MathObj ( ) : System
리턴 System

SemanticTransform() 보호된 메소드

Perform semantic transform of the introduced expression. Check if the expression is valid and build BinaryTree needed for polish postfix expression.
MathParserException
protected SemanticTransform ( ) : void
리턴 void