Class MatrixFunctionManager

java.lang.Object
util.MatrixFunctionManager

public class MatrixFunctionManager extends Object
  • Field Details

  • Constructor Details

    • MatrixFunctionManager

      public MatrixFunctionManager()
  • Method Details

    • getFunctions

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

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

      public boolean canOptimizeFunction(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
    • getFunction

      public MatrixFunction getFunction(MatrixFunction function)
    • 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(String funcName) throws NullPointerException
      Parameters:
      funcName - the String representation of the Function object
      Returns:
      the Function object in the store that goes by that name.
      Throws:
      NullPointerException
    • getFunctionByScanner

      public MatrixFunction getFunctionByScanner(ArrayList<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(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(ArrayList<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(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