Class MatrixComponents

java.lang.Object
com.singularsys.jep.ComponentSubset
com.singularsys.extensions.matrix.MatrixComponents
All Implemented Interfaces:
JepComponent, Serializable
Direct Known Subclasses:
DoubleMatrixComponents

public class MatrixComponents extends ComponentSubset
Creates matrix specific components. Creates a MatrixFunctionTable and MatrixOperatorTable based on supplied MatrixFactoryI and MatrixFieldI. Unlike MatrixComponentSet it does not create a DimensionVisitor or use the StandardConfigurableParser needed for correct parsing of element access.
See Also:
  • Constructor Details

    • MatrixComponents

      public MatrixComponents(MatrixFactoryI mfact, MatrixFieldI mfield)
      Constructor with no logical or string support
      Parameters:
      mfact - the MatrixFactory to use
      mfield - the MatrixField to use
    • MatrixComponents

      public MatrixComponents(MatrixFactoryI mfact, MatrixFieldI mfield, boolean logical, boolean strings)
      Constructor with optional logical and string support
      Parameters:
      mfact - the MatrixFactory to use
      mfield - the MatrixField to use
      logical - whether operations on booleans are supported
      strings - whether string operations are supported
  • Method Details

    • buildField

      protected static MatrixFieldI buildField(MatrixFieldI mfield, boolean logical, boolean strings)
      Creates a field with optional logical and string support
      Parameters:
      mfield - base field
      logical - whether operations on booleans are supported
      strings - whether string operations are supported
      Returns:
    • init

      public void init(Jep jep)
      Description copied from interface: JepComponent
      Initialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.
      Specified by:
      init in interface JepComponent
      Overrides:
      init in class ComponentSubset
      Parameters:
      jep - the current Jep instance
    • getLightWeightInstance

      public JepComponent getLightWeightInstance()
      Description copied from interface: JepComponent
      Gets a light-weight instance suitable for using in multiple threads.
      Specified by:
      getLightWeightInstance in interface JepComponent
      Overrides:
      getLightWeightInstance in class ComponentSubset
      Returns:
      either a new instance, null or 'this'.
    • getMatrixFactory

      public MatrixFactoryI getMatrixFactory()
    • getMatrixField

      public MatrixFieldI getMatrixField()
    • getMatrixFunctionTable

      public FunctionTable getMatrixFunctionTable()
      Return a function table
      Returns:
      a table created during construction
      Since:
      Jep 4.0/Extensions 2.1
    • getMatrixOperatorTable

      public MatrixOperatorTable getMatrixOperatorTable()
      Return an operator table
      Returns:
      a table created during construction
      Since:
      Jep 4.0/Extensions 2.1