Interface MatrixFieldI
-
- All Superinterfaces:
FieldI,IntegerConvertor,JepComponent,java.io.Serializable
- All Known Implementing Classes:
AbstractMatrixField,ComplexMatrixField,DoubleMatrixField,FieldMatrixField,GenericFieldMatrixField,GenericMatrixField,MatrixFieldCollection,SequenceMatrixField,SimpleMatrixField
public interface MatrixFieldI extends FieldI, IntegerConvertor, JepComponent
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectcross(java.lang.Object l, java.lang.Object r)The cross product of two vectorsjava.lang.Objectdet(java.lang.Object mat)The determinant of a matrixjava.lang.Objectdot(java.lang.Object l, java.lang.Object r)The dot product of two vectorsjava.lang.Objectinv(java.lang.Object mat)Returns the inverse of a square matrix.java.lang.Objectsolve(java.lang.Object A, java.lang.Object B)Solve equation A * X = Bjava.lang.Objecttrace(java.lang.Object mat)Returns the trace of a matrix.java.lang.Objecttrans(java.lang.Object mat)Transpose of a matrix-
Methods 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, sub
-
Methods inherited from interface com.singularsys.extensions.field.implementations.IntegerConvertor
convertFromInt, convertToInt
-
Methods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance, init
-
-
-
-
Method Detail
-
det
java.lang.Object det(java.lang.Object mat) throws EvaluationExceptionThe determinant of a matrix- Parameters:
mat-- Returns:
- the determinant of mat if it is a matrix
- Throws:
EvaluationException
-
trans
java.lang.Object trans(java.lang.Object mat) throws EvaluationExceptionTranspose of a matrix- Parameters:
mat- the matrix- Returns:
- a matrix containing the transpose
- Throws:
EvaluationException
-
dot
java.lang.Object dot(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionThe dot product of two vectors- Parameters:
l-r-- Returns:
- the dot product if both arguments are vectors, null otherwise.
- Throws:
EvaluationException
-
cross
java.lang.Object cross(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionThe 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
java.lang.Object trace(java.lang.Object mat) throws EvaluationExceptionReturns the trace of a matrix.- Parameters:
mat- the matrix- Returns:
- the trace
- Throws:
EvaluationException
-
inv
java.lang.Object inv(java.lang.Object mat) throws EvaluationExceptionReturns the inverse of a square matrix.- Parameters:
mat- the matrix- Returns:
- the trace
- Throws:
EvaluationException- if matrix is not square or is singular
-
solve
java.lang.Object solve(java.lang.Object A, java.lang.Object B) throws EvaluationExceptionSolve 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
-
-