Package util
Class MatrixFunctionManager
java.lang.Object
util.MatrixFunctionManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canOptimizeFunction
(String name) checks if the Function object passed to it as an argument can be optimized or notboolean
contains
(MatrixFunction func) getFunction
(MatrixFunction function) getFunctionAt
(int index) getFunctionByName
(String funcName) getFunctionByScanner
(ArrayList<String> scanner) optimizeFunction
(String name) void
removeFunctionAt
(int index) removes the Function object at the specified locationvoid
removeFunctionByName
(String funcName) Removes the Function object in the store that goes by that namevoid
removeFunctionByScanner
(ArrayList<String> scanner) removes the Function object that has that scannervoid
setFunctions
(ArrayList<MatrixFunction> functions) void
storeFunction
(MatrixFunction function) stores a Function in objects of this class.
-
Field Details
-
functions
-
-
Constructor Details
-
MatrixFunctionManager
public MatrixFunctionManager()
-
-
Method Details
-
getFunctions
- Returns:
- all function objects stored by this FunctionManager object
-
setFunctions
- Parameters:
functions
- the store of Function objects that this FunctionManager object will store
-
canOptimizeFunction
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
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
- Parameters:
func
- the Function object to search for- Returns:
- true if the Function object is found
-
getFunction
-
getFunctionAt
- Parameters:
index
- the location from which we wish to retrieve the Function object- Returns:
- the Function object stored at the specified index.
-
getFunctionByName
- Parameters:
funcName
- the String representation of the Function object- Returns:
- the Function object in the store that goes by that name.
- Throws:
NullPointerException
-
getFunctionByScanner
- 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
Removes the Function object in the store that goes by that name- Parameters:
funcName
- the String representation of the Function object
-
removeFunctionByScanner
removes the Function object that has that scanner- Parameters:
scanner
- the scanner object to search for in the store
-
optimizeFunction
- 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
-