C# Класс MathParserDataStructures.MathObj

Показать файл Открыть проект

Открытые методы

Метод Описание
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