Class FunctionManager
java.lang.Object
util.FunctionManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Function
Adds a Function object to this FunctionManager.static void
static void
Deletes all anonymous functionsstatic boolean
static int
static void
Removes a Function object from this FunctionManager.static Function
getFunction
(String fName) static void
Registers the parameters of all registered functions as Variables on the Variable Registry.static void
static void
static Function
Attempts to retrieve a Function object from a FunctionManager based on its name.static void
update()
Saves stored functions and: updates the client UIs that use this manager.static void
Updates a Function object in this FunctionManager.
-
Field Details
-
FUNCTIONS
-
-
Constructor Details
-
FunctionManager
public FunctionManager()
-
-
Method Details
-
contains
- Parameters:
fName
- The name of the dependent variable of the function or the full name of the function which is a combination of the name of its dependent variable and its independent variables enclosed in circular parentheses. e.g in y = x^3, either y or y(x) may be supplied.- Returns:
- true if a Function exists by the name supplied.
-
getFunction
-
lookUp
-
add
Adds a Function object to this FunctionManager.- Parameters:
expression
- The expression that creates the Function to add. The form is:F=@(x,y,z,...)mathexpr. e.g y=@(x)3x-x^2; Functions take precedence over variables.. so if a function called sin_func is created and there exists a variable with that name, the system discards that variable
-
add
- Parameters:
f
- The Function object to add to this object.
-
load
-
load
-
delete
Removes a Function object from this FunctionManager. -
update
Updates a Function object in this FunctionManager. -
clearAnonymousFunctions
public static void clearAnonymousFunctions()Deletes all anonymous functions -
countAnonymousFunctions
public static int countAnonymousFunctions()- Returns:
- the number of anonymous functions in the FunctionManager.
-
getDefinedFunctions
-
update
public static void update()Saves stored functions and: updates the client UIs that use this manager. -
initializeFunctionVars
public static void initializeFunctionVars()Registers the parameters of all registered functions as Variables on the Variable Registry.
-