Package math.matrix.expressParser
Class MOperator
java.lang.Object
parser.Operator
math.matrix.expressParser.MOperator
- Direct Known Subclasses:
MatrixBinaryOperator
,MBinaryOperator
,MBracket
,MUnaryPostOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String[]
The instruction set of the parser of this software.static final String
static final String
static final String
Fields inherited from class parser.Operator
AND, ASSIGN, AT, CLOSE_CIRC_BRAC, CLOSE_SQUARE_BRAC, COLON, COMBINATION, COMMA, CONST, CUBE, CUBE_ROOT, DIVIDE, EN_DASH, EQUALS, EXIT, FACTORIAL, GREATER_OR_EQUALS, GREATER_THAN, INVERSE, LESS_OR_EQUALS, LESS_THAN, MINUS, MULTIPLY, name, OPEN_CIRC_BRAC, OPEN_SQUARE_BRAC, OR, PERMUTATION, PLUS, POWER, REMAINDER, ROOT, SEMI_COLON, SPACE, SQUARE, STORE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
static Precedence
getPrecedence
(String name) The precedence of the operatorsstatic boolean
static boolean
static boolean
static boolean
isClosingBrace
(String op) static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
isOpeningBrace
(String op) static boolean
static boolean
static boolean
isPlusOrMinus
(String op) static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
void
static boolean
validateAll
(ArrayList<String> scan) Methods inherited from class parser.Operator
isAtOperator, isComma, isConstantStoreCommand, isCubeRoot, isEqualsOperator, isExitCommand, isFactorial, isLogicOperator, isMulOrDiv, isMulOrDivOrRemOrPermOrCombOrPow, isPermOrComb, isRemainder, isSemiColon, isSquareRoot, isStoreCommand
-
Field Details
-
ROW_JOIN
- See Also:
-
COL_JOIN
- See Also:
-
TRI_MATRIX
- See Also:
-
DET_BRACE
- See Also:
-
UNIT
- See Also:
-
DET
- See Also:
-
INV
- See Also:
-
operators
The instruction set of the parser of this software.
-
-
Constructor Details
-
MOperator
- Parameters:
name
- creates a new form of a valid MOperator
-
-
Method Details
-
setName
-
getName
-
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
-
validateAll
- Parameters:
scan
- An ArrayList object containing a scanned function.- Returns:
- true if validated successfully
-