Package util

Class MatrixFunctionManager


  • public class MatrixFunctionManager
    extends java.lang.Object
    Author:
    GBEMIRO
    • Constructor Detail

      • MatrixFunctionManager

        public MatrixFunctionManager()
    • Method Detail

      • getFunctions

        public java.util.ArrayList<MatrixFunction> getFunctions()
        Returns:
        all function objects stored by this FunctionManager object
      • setFunctions

        public void setFunctions​(java.util.ArrayList<MatrixFunction> functions)
        Parameters:
        functions - the store of Function objects that this FunctionManager object will store
      • canOptimizeFunction

        public boolean canOptimizeFunction​(java.lang.String name)
        checks if the Function object passed to it as an argument can be optimized or not
        Parameters:
        name -
        Returns:
        true if the Function is optimizable
      • storeFunction

        public void storeFunction​(MatrixFunction function)
        stores a Function in objects of this class. The storage is done in such a way that the object is inserted from the front.
        Parameters:
        function - the new Function to store
      • contains

        public boolean contains​(MatrixFunction func)
        Parameters:
        func - the Function object to search for
        Returns:
        true if the Function object is found
      • getFunctionAt

        public MatrixFunction getFunctionAt​(int index)
        Parameters:
        index - the location from which we wish to retrieve the Function object
        Returns:
        the Function object stored at the specified index.
      • getFunctionByName

        public MatrixFunction getFunctionByName​(java.lang.String funcName)
                                         throws java.lang.NullPointerException
        Parameters:
        funcName - the String representation of the Function object
        Returns:
        the Function object in the store that goes by that name.
        Throws:
        java.lang.NullPointerException
      • getFunctionByScanner

        public MatrixFunction getFunctionByScanner​(java.util.ArrayList<java.lang.String> scanner)
        Parameters:
        scanner - the scanner object to search for in the store
        Returns:
        the Function object in the store that possesses that scanned form
      • removeFunctionAt

        public void removeFunctionAt​(int index)
        removes the Function object at the specified location
        Parameters:
        index - the location from which the Function is to be removed
      • removeFunctionByName

        public void removeFunctionByName​(java.lang.String funcName)
        Removes the Function object in the store that goes by that name
        Parameters:
        funcName - the String representation of the Function object
      • removeFunctionByScanner

        public void removeFunctionByScanner​(java.util.ArrayList<java.lang.String> scanner)
        removes the Function object that has that scanner
        Parameters:
        scanner - the scanner object to search for in the store
      • optimizeFunction

        public MatrixFunction optimizeFunction​(java.lang.String name)
        Parameters:
        name - the name or String format of the Function object to be optimized
        Returns:
        the optimized Function object such that it is given its attributes already processed and ready for use