Class MatrixOperator
java.lang.Object
math.matrix.expressParser.MatrixOperator
- Direct Known Subclasses:
HalfDet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()static PrecedencegetPrecedence(String name) The precedence of the operatorsstatic booleanstatic booleanstatic booleanstatic booleanisClosingBrace(String op) static booleanstatic booleanbooleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanisOpeningBrace(String op) static booleanstatic booleanstatic booleanisPlusOrMinus(String op) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidorderCompoundTokens(MathExpression function) voidstatic booleanvalidateAll(ArrayList<String> scan)
-
Field Details
-
name
The name of the operator object
-
-
Constructor Details
-
MatrixOperator
- Parameters:
name- creates a new form of a valid mathronian MOperator
-
-
Method Details
-
setName
- Parameters:
name- set the name of the MOperator object
-
getName
- Returns:
- the name of the MOperator object
-
isOperatorString
- Parameters:
op- The string to check.- Returns:
- true if the operator is a valid mathronian operator
-
isRowJoin
- Parameters:
op- the String object in consideration- Returns:
- true if the String object contains a exit command
-
isColJoin
- Parameters:
op- the String object in consideration- Returns:
- true if the String object contains a exit command
-
isColon
-
isTri
- Parameters:
op- the String object in consideration- Returns:
- true if the String object contains a Variable storage command
-
isUnit
- Parameters:
op- the String object in consideration- Returns:
- true if the String object contains a constant storage command
-
isOpeningBrace
- Parameters:
op- the String object in consideration- Returns:
- true if the String object represents a [ character
-
isClosingBrace
- Parameters:
op- the String object in consideration- Returns:
- true if the String object represents a [ character
-
isAssignmentOperator
- Parameters:
op- the String to check- Returns:
- true if the operator is the "=" operator it means that we assign or store the value of the RHS in the LHS and so the LHS must represent a valid variable
-
isBinaryOperator
- Parameters:
op- the String to check- Returns:
- true if the operator is an operator that functions in between 2 numbers or variables i.e,+,-,*,/,^,%,Č,Р
-
isPlusOrMinus
- Parameters:
op- the String to check- Returns:
- true if the operator is the + operator or is the - operator the form is log-¹(num,base)
-
isMul
- Parameters:
op- the String to check- Returns:
- true if the operator is the * operator the form is log-¹(num,base)
-
isPower
- Parameters:
op- the String to check- Returns:
- true if the operator is the "%" operator
-
isBracket
- Parameters:
op- the String to check- Returns:
- true if the operator is the "(" or the ")" operator
-
isOpeningBracket
- Parameters:
op- the String to check- Returns:
- true if the operator is the "(" operator
-
isClosingBracket
- Parameters:
op- the String to check- Returns:
- true if the operator is the ")" operator
-
isInverse
- Parameters:
op- the String to check- Returns:
- true if the operator is the "-¹" operator
-
isDetHalfSymbol
- Parameters:
op- the String to check- Returns:
- true if the operator is the "|" operator
-
isDet
- Parameters:
op- the String to check- Returns:
- true if the operator is the "|" operator
-
isSquare
- Parameters:
op- the String to check- Returns:
- true if the operator is the "²" operator
-
isCube
- Parameters:
op- the String to check- Returns:
- true if the operator is the "³" operator
-
isUnaryPreOperator
- Parameters:
op- the String to check- Returns:
- true if the operator is a pre-number operator e.g the trig operators,exponential operators,logarithmic operators(not to any base)
-
isUnaryPostOperator
- Parameters:
op- the String to check- Returns:
- true if the operator is a post number operator e.g the inverse operator,the factorial,the square and the cube
-
getPrecedence
The precedence of the operators- Parameters:
name- the name of the MOperator object- Returns:
- the MOperator's Precedence attribute
-
orderCompoundTokens
-
validateAll
-