Interface MatrixFieldI
- All Superinterfaces:
FieldI,IntegerConvertor,JepComponent,Serializable
- All Known Implementing Classes:
AbstractMatrixField,ComplexMatrixField,DoubleMatrixField,ExternalMatrixField,FieldMatrixField,GenericFieldMatrixField,GenericMatrixField,MatrixFieldCollection,SequenceMatrixField,SimpleMatrixField
Defines all the basic operations which can be carried out on matrices and vectors.
- Since:
- Jep 3.5 / Extensions 2.0
- Author:
- Richard Morris
-
Method Summary
Modifier and TypeMethodDescriptionThe cross product of two vectorsThe determinant of a matrixThe dot product of two vectorsReturns the inverse of a square matrix.Solve equation A * X = BReturns the trace of a matrix.Transpose of a matrixMethods inherited from interface com.singularsys.extensions.field.FieldI
add, and, div, eq, ge, getOne, getZero, gt, le, lt, mod, mul, ne, neg, not, or, pow, subMethods inherited from interface com.singularsys.extensions.field.IntegerConvertor
convertFromInt, convertToIntMethods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance, init
-
Method Details
-
det
The determinant of a matrix- Parameters:
mat-- Returns:
- the determinant of mat if it is a matrix
- Throws:
EvaluationException
-
trans
Transpose of a matrix- Parameters:
mat- the matrix- Returns:
- a matrix containing the transpose
- Throws:
EvaluationException
-
dot
The dot product of two vectors- Parameters:
l-r-- Returns:
- the dot product if both arguments are vectors, null otherwise.
- Throws:
EvaluationException
-
cross
The cross product of two vectors- Parameters:
l-r-- Returns:
- a vector with the cross product
- Throws:
EvaluationException- if either vectors not of length 3
-
trace
Returns the trace of a matrix.- Parameters:
mat- the matrix- Returns:
- the trace
- Throws:
EvaluationException
-
inv
Returns the inverse of a square matrix.- Parameters:
mat- the matrix- Returns:
- the trace
- Throws:
EvaluationException- if matrix is not square or is singular
-
solve
Solve equation A * X = B- Parameters:
A- a square matrixB- either a vector or matrix with same number of rows as A- Returns:
- a vector or matrix solving equations
- Throws:
EvaluationException- if matrix is not square or is singular
-