Class MatrixFunctionTable
- java.lang.Object
-
- com.singularsys.jep.FunctionTable
-
- com.singularsys.extensions.matrix.MatrixFunctionTable
-
- All Implemented Interfaces:
JepComponent,java.io.Serializable
public class MatrixFunctionTable extends FunctionTable
A function table with some matrix functions. Defines functionsdet- the determinate of a matrixtrace- the trace of a matrixtrans- transpose of a matrixid- creates an identity matrixid(3)is a 3 by 3 matrixzeroMat- creates a matrix of zeroszeroMat(3,2)creates a 3 by 2 matrixzeroVec- creates a vector of zeroszeroVec(3)creates a 3 element vectorsize- finds the length of a vector or the vector with rows and columns of a matrixinv(m)- find the inverse of mv=solve(m,u)- find solution ofm * v = u
- Author:
- Richard Morris
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.FunctionTable
table
-
-
Constructor Summary
Constructors Modifier Constructor Description MatrixFunctionTable(MatrixFactoryI mfact, MatrixFieldI mfield)Uses all the functions on theStandardFunctionTableplus matrix operationsMatrixFunctionTable(FunctionTable root, MatrixFactoryI mfact, MatrixFieldI mfield)protectedMatrixFunctionTable(java.util.Map<java.lang.String,PostfixMathCommandI> tbl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMatrixFunctions(MatrixFactoryI factory, MatrixFieldI field)FunctionTableshallowCopy()Returns a new shallow copy of this function table.-
Methods inherited from class com.singularsys.jep.FunctionTable
addFunction, clear, containsKey, containsValue, entrySet, getFunction, getLightWeightInstance, init, isEmpty, keySet, remove, size, threadSafeMapCopy, toString, values
-
-
-
-
Constructor Detail
-
MatrixFunctionTable
public MatrixFunctionTable(MatrixFactoryI mfact, MatrixFieldI mfield)
Uses all the functions on theStandardFunctionTableplus matrix operations- Parameters:
mfact-mfield-
-
MatrixFunctionTable
public MatrixFunctionTable(FunctionTable root, MatrixFactoryI mfact, MatrixFieldI mfield)
-
MatrixFunctionTable
protected MatrixFunctionTable(java.util.Map<java.lang.String,PostfixMathCommandI> tbl)
-
-
Method Detail
-
addMatrixFunctions
public void addMatrixFunctions(MatrixFactoryI factory, MatrixFieldI field)
-
shallowCopy
public FunctionTable shallowCopy()
Description copied from class:FunctionTableReturns a new shallow copy of this function table. Calls theFunctionTable.threadSafeMapCopy()method to ensure the table is safe to use a separate thread. All sub-classes should override this methods to create a function table of the matching type. A typical implementation would be@Override public FunctionTable shallowCopy() { Map<String,PostfixMathCommandI> newMap = this.threadSafeMapCopy(); return new myFunctionTable(newMap); }using theFunctionTable.threadSafeMapCopy()method to return a copy of the map of operators and a constructor taking this map which uses theFunctionTable(Map)constructor.- Overrides:
shallowCopyin classFunctionTable- Returns:
- a new shallow copy of this function table
-
-