Package util
Class MatrixFunctionManager
java.lang.Object
util.MatrixFunctionManager
public class MatrixFunctionManager
extends java.lang.Object
- Author:
- GBEMIRO
-
Constructor Summary
Constructors Constructor Description MatrixFunctionManager() -
Method Summary
Modifier and Type Method Description booleancanOptimizeFunction(java.lang.String name)checks if the Function object passed to it as an argument can be optimized or notbooleancontains(MatrixFunction func)MatrixFunctiongetFunction(MatrixFunction function)MatrixFunctiongetFunctionAt(int index)MatrixFunctiongetFunctionByName(java.lang.String funcName)MatrixFunctiongetFunctionByScanner(java.util.ArrayList<java.lang.String> scanner)java.util.ArrayList<MatrixFunction>getFunctions()MatrixFunctionoptimizeFunction(java.lang.String name)voidremoveFunctionAt(int index)removes the Function object at the specified locationvoidremoveFunctionByName(java.lang.String funcName)Removes the Function object in the store that goes by that namevoidremoveFunctionByScanner(java.util.ArrayList<java.lang.String> scanner)removes the Function object that has that scannervoidsetFunctions(java.util.ArrayList<MatrixFunction> functions)voidstoreFunction(MatrixFunction function)stores a Function in objects of this class.
-
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
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
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
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
- 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
- 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
-