Package math.matrix.expressParser
Class MatrixBinaryOperator
java.lang.Object
parser.Operator
math.matrix.expressParser.MOperator
math.matrix.expressParser.MatrixBinaryOperator
- All Implemented Interfaces:
Validatable
- Direct Known Subclasses:
MmultiplicationOperator
,MSubtractionOperator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The index of this operator in the scanned Function that it belongs to.private final Precedence
The precedence of this MBinaryOperator object.Fields inherited from class math.matrix.expressParser.MOperator
COL_JOIN, DET, DET_BRACE, INV, operators, ROW_JOIN, TRI_MATRIX, UNIT
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
Methods inherited from class math.matrix.expressParser.MOperator
getName, getPrecedence, isAssignmentOperator, isBinaryOperator, isBracket, isClosingBrace, isClosingBracket, isColJoin, isColon, isCube, isDet, isDetHalfSymbol, isInverse, isMul, isOpeningBrace, isOpeningBracket, isOperatorString, isPlusOrMinus, isPower, isRowJoin, isSquare, isTri, isUnaryPostOperator, isUnaryPreOperator, isUnit, setName, validateAll
Methods inherited from class parser.Operator
isAtOperator, isComma, isConstantStoreCommand, isCubeRoot, isEqualsOperator, isExitCommand, isFactorial, isLogicOperator, isMulOrDiv, isMulOrDivOrRemOrPermOrCombOrPow, isPermOrComb, isRemainder, isSemiColon, isSquareRoot, isStoreCommand
-
Field Details
-
precedence
The precedence of this MBinaryOperator object. -
index
private int indexThe index of this operator in the scanned Function that it belongs to.
-
-
Constructor Details
-
MatrixBinaryOperator
- Parameters:
name
- the name that identifies the MBinaryOperator objectindex
- The index of this operator in the scanned Function that it belongs to.scan
- the scanner tokens MBinaryOperator object belongs to.
-
-
Method Details
-
getPrecedence
- Returns:
- the precedence of this operator
-
setIndex
- Parameters:
index
- sets the index of this operator in the scanned Function that it belongs to.scan
- The scanner output
-
getIndex
public int getIndex()- Returns:
- the index of this operator in the scanned Function that it belongs to.
-
validate
- Specified by:
validate
in interfaceValidatable
- Parameters:
scan
- the scanner output that this MBinaryOperator object exists in. validates the grammatical usage of this operator (by leaving the correctFunction attribute of the function object un-modified) if the usage of this operator in its immediate environment i.e to its left and right is correct.
-