Package math.matrix.expressParser
Class MatrixVariable
java.lang.Object
math.matrix.expressParser.MatrixVariable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMatrixVariable
(String name, String expression) Here an expression like A=[2,3,4:-2,3,4:5,1,20] is passed into the constructor.MatrixVariable
(String name, Matrix matrix) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
static boolean
isMatrixVariableName
(String name) A + B + 2*C + A.B - A.B^5 + 3*4*A^2*C+I Matrix names must start with # in this syntax.static void
void
void
setMatrixVariable
(String expression) void
toString()
-
Field Details
-
name
The name of the Matrix Variable. A valid Matrix Variable Name must start with # and the rest of its body must be a valid variable name. -
matrix
The matrix object stored by this variable.
-
-
Constructor Details
-
MatrixVariable
- Parameters:
name
- The name of the Matrix object.matrix
- The Matrix object used to set the Matrix value stored by this MatrixVariable object.
-
MatrixVariable
Here an expression like A=[2,3,4:-2,3,4:5,1,20] is passed into the constructor.- Parameters:
name
- The name of the matrix.expression
- The compound expression containing information useful in creating the MatrixVariable object..e.g [2,3,4:-2,3,4:5,1,20]
-
-
Method Details
-
setMatrixVariable
-
setMatrix
-
getMatrix
-
getName
-
setName
-
getCreatingExpression
- Returns:
- the equivalent string expression that creates the matrix variable and stores its present matrix value in it.
-
isMatrixVariableName
A + B + 2*C + A.B - A.B^5 + 3*4*A^2*C+I Matrix names must start with # in this syntax.- Parameters:
name
- The string to be checked if or not it represents a valid matrix name.- Returns:
- true if the name represents a valid matrix name.
-
toString
-
main
-