Class MatrixOperatorTable
- java.lang.Object
-
- com.singularsys.jep.EmptyOperatorTable
-
- com.singularsys.jep.OperatorTable2
-
- com.singularsys.jep.standard.StandardOperatorTable2
-
- com.singularsys.extensions.field.FieldOperatorTable
-
- com.singularsys.extensions.matrix.MatrixOperatorTable
-
- All Implemented Interfaces:
JepComponent
,OperatorTableI
,java.io.Serializable
public class MatrixOperatorTable extends FieldOperatorTable
An operator table with operators which work on vectors and matrices.- Since:
- Jep 3.5 / Extensions 2.0
- Author:
- Richard Morris
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.singularsys.jep.OperatorTable2
OperatorTable2.BasicOperators, OperatorTable2.PsudoOperators, OperatorTable2.SpecialOperators
-
Nested classes/interfaces inherited from class com.singularsys.jep.EmptyOperatorTable
EmptyOperatorTable.OperatorKey
-
-
Field Summary
-
Fields inherited from class com.singularsys.extensions.field.FieldOperatorTable
field
-
-
Constructor Summary
Constructors Modifier Constructor Description MatrixOperatorTable(MatrixFactoryI mfact, MatrixFieldI mfield)
protected
MatrixOperatorTable(MatrixFieldI mfield2, MatrixFactoryI mfact2, java.util.Map<EmptyOperatorTable.OperatorKey,Operator> map)
MatrixOperatorTable(OperatorTable2 oldTable, MatrixFactoryI mfact, MatrixFieldI mfield)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatrixFactoryI
getMatrixFactory()
MatrixFieldI
getMatrixField()
protected void
setBasicPfmcs()
Sets the standard set of pfmc's for basic operators.protected void
setMatrixPfmcs()
Sets the pfmc's for basic and special operators.protected void
setSpecialPfmcs()
Does nothing, prevents parents method being called in copy constructor.OperatorTableI
shallowCopy()
Create a new version of this OperatorTable.-
Methods inherited from class com.singularsys.extensions.field.FieldOperatorTable
getAddFunction, getAndFunction, getDivFunction, getEqFunction, getField, getGeFunction, getGtFunction, getLeFunction, getLtFunction, getModFunction, getMulFunction, getNeFunction, getNegFunction, getNotFunction, getOrFunction, getPowFunction, getSubFunction, setPsudoPfmcs
-
Methods inherited from class com.singularsys.jep.OperatorTable2
getAdd, getAnd, getAssign, getCross, getDivide, getDot, getEle, getEQ, getGE, getGT, getLE, getList, getLT, getMod, getMultiply, getNE, getNop, getNot, getOr, getPower, getRange, getSubtract, getUDivide, getUMinus, getUPlus
-
Methods inherited from class com.singularsys.jep.EmptyOperatorTable
addOperator, addOperator, addOperator, appendOperator, appendOperator, entrySet, getKey, getLightWeightInstance, getNumOps, getOperator, getOperatorMap, getOperators, getOperatorsByName, getOperatorsBySymbol, init, insertOperator, insertOperator, keySet, removeOperator, removeOperator, replaceOperator, replaceOperator, setBinaryInverseOp, setDistributiveOver, setGroupOperatorRelations, setGroupOperatorRelations, setInverseOp, setPrecedenceTable, setRootOp, setStandardOperatorRelations, threadSafeMapCopy, toString
-
-
-
-
Constructor Detail
-
MatrixOperatorTable
public MatrixOperatorTable(MatrixFactoryI mfact, MatrixFieldI mfield)
-
MatrixOperatorTable
public MatrixOperatorTable(OperatorTable2 oldTable, MatrixFactoryI mfact, MatrixFieldI mfield)
-
MatrixOperatorTable
protected MatrixOperatorTable(MatrixFieldI mfield2, MatrixFactoryI mfact2, java.util.Map<EmptyOperatorTable.OperatorKey,Operator> map)
-
-
Method Detail
-
setBasicPfmcs
protected void setBasicPfmcs()
Description copied from class:StandardOperatorTable2
Sets the standard set of pfmc's for basic operators. This method is called by the constructor and subclasses can override this method to change or prevent building of these pfmcs.- Overrides:
setBasicPfmcs
in classFieldOperatorTable
- See Also:
OperatorTable2.BasicOperators
-
setSpecialPfmcs
protected void setSpecialPfmcs()
Description copied from class:FieldOperatorTable
Does nothing, prevents parents method being called in copy constructor.- Overrides:
setSpecialPfmcs
in classFieldOperatorTable
- See Also:
OperatorTable2.SpecialOperators
-
setMatrixPfmcs
protected void setMatrixPfmcs()
Sets the pfmc's for basic and special operators. Called by the constructor.
-
getMatrixField
public MatrixFieldI getMatrixField()
-
getMatrixFactory
public MatrixFactoryI getMatrixFactory()
-
shallowCopy
public OperatorTableI shallowCopy()
Description copied from class:EmptyOperatorTable
Create a new version of this OperatorTable. Operators are copied into new table. However Operators whose pfmc implement JepComponent are duplicated. This means the table could be used in a separate thread without problem. Subclasses should override with method to return a table of the correct type, a typical implementation would be@Override public OperatorTableI shallowCopy() { Map<OperatorKey, Operator> map = this.threadSafeMapCopy(); return new MyOperatorTable(map); }
using theEmptyOperatorTable.threadSafeMapCopy()
method to return a copy of the map of operators and a constructor taking this map which uses theEmptyOperatorTable(Map)
constructor.- Specified by:
shallowCopy
in interfaceOperatorTableI
- Overrides:
shallowCopy
in classFieldOperatorTable
- Returns:
- a new Table
-
-