Math2mat
|
Public Member Functions | |
Function () | |
void | modifyNumType (BuildingBlock.NumType type) |
String | getXmlTagName () |
boolean | fromXml (org.w3c.dom.Element el) |
boolean | insideFromXml (org.w3c.dom.Element el, Function newFunc) |
void | superInsideToXml (org.w3c.dom.Element el, Document dom, boolean shortRef) |
void | insideToXml (org.w3c.dom.Element el, Document dom, boolean shortRef) |
Element | copy (Function newFunc) |
void | copyTo (Element to, Function newFunc) |
Element | findElement (String name) |
void | modifAllNames (String prefix) |
void | addInput (Element var) |
void | setInput (Vector< Element > in) |
Vector< Element > | getInput () |
void | addOutput (Element var) |
void | setOutput (Vector< Element > out) |
Vector< Element > | getOutput () |
void | addInternalVar (Element var) |
void | setInternalVars (Vector< Element > list) |
Vector< Element > | getInternalVars () |
Vector< Element > | getMonitoringElement () |
void | addBody (Element el) |
void | addBody (Vector< Element > vec) |
void | addBodyToTop (Element el) |
void | setBody (Vector< Element > body) |
Vector< Element > | getBody () |
String | toString (int level) |
String | toSchematic (int level, String prefix, String boxFormat, String color) |
String | toOctave (int level) |
boolean | isInput (Element element) |
boolean | containsOuputName (String name) |
boolean | containsInputName (String name) |
void | setMaxCost (int cost) |
int | getMaxCost () |
void | setRelativeMaxCost () |
int | getRelativeMaxCost () |
Protected Member Functions | |
String | toStringParam (int level) |
Protected Attributes | |
Vector< Element > | inputVars |
Vector< Element > | outputVars |
Vector< Element > | internalVars |
Vector< Element > | body |
int | maxCost |
int | maxRelativeCost |
Describe a function. Contains inputs, outputs, temp variables and a body.
Definition at line 27 of file Function.java.
m2m.backend.structure.Function.Function | ( | ) |
Construct an empty function
Definition at line 57 of file Function.java.
void m2m.backend.structure.Function.addBody | ( | Element | el | ) |
Add an element to the body
el | Element to add |
Definition at line 367 of file Function.java.
void m2m.backend.structure.Function.addBody | ( | Vector< Element > | vec | ) |
Add a vector of Element to the body
vec | Vector of Element to add |
Definition at line 375 of file Function.java.
void m2m.backend.structure.Function.addBodyToTop | ( | Element | el | ) |
Add an element to the top of the body
el | Element to add |
Definition at line 383 of file Function.java.
void m2m.backend.structure.Function.addInput | ( | Element | var | ) |
void m2m.backend.structure.Function.addInternalVar | ( | Element | var | ) |
Add a variable to the internal variables list
var | Variable |
Definition at line 301 of file Function.java.
void m2m.backend.structure.Function.addOutput | ( | Element | var | ) |
boolean m2m.backend.structure.Function.containsInputName | ( | String | name | ) |
Check if a variable name is an input name.
name | the string to check |
Definition at line 590 of file Function.java.
boolean m2m.backend.structure.Function.containsOuputName | ( | String | name | ) |
Check if a string is an output name.
name | the string to check |
Definition at line 575 of file Function.java.
Copy entirely the function.
Implements m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, and m2m.backend.structure.LoopFor.
Definition at line 199 of file Function.java.
Reimplemented from m2m.backend.structure.Element.
Definition at line 205 of file Function.java.
Element m2m.backend.structure.Function.findElement | ( | String | name | ) |
Reimplemented from m2m.backend.structure.Element.
Definition at line 219 of file Function.java.
boolean m2m.backend.structure.Function.fromXml | ( | org.w3c.dom.Element | el | ) |
Definition at line 74 of file Function.java.
Vector<Element> m2m.backend.structure.Function.getBody | ( | ) |
Vector<Element> m2m.backend.structure.Function.getInput | ( | ) |
Vector<Element> m2m.backend.structure.Function.getInternalVars | ( | ) |
Get the internal variable list
Definition at line 317 of file Function.java.
int m2m.backend.structure.Function.getMaxCost | ( | ) |
Get the maximum cost of the function.
Definition at line 613 of file Function.java.
Vector<Element> m2m.backend.structure.Function.getMonitoringElement | ( | ) |
Get the all the variables that should be monitored
Definition at line 325 of file Function.java.
Vector<Element> m2m.backend.structure.Function.getOutput | ( | ) |
int m2m.backend.structure.Function.getRelativeMaxCost | ( | ) |
Get the maximum relative cost of the function.
Definition at line 635 of file Function.java.
String m2m.backend.structure.Function.getXmlTagName | ( | ) | [virtual] |
Implements m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, m2m.backend.structure.LoopWhile, and m2m.backend.structure.Switch.
Definition at line 70 of file Function.java.
boolean m2m.backend.structure.Function.insideFromXml | ( | org.w3c.dom.Element | el, |
Function | newFunc | ||
) |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, m2m.backend.structure.LoopWhile, and m2m.backend.structure.Switch.
Definition at line 90 of file Function.java.
void m2m.backend.structure.Function.insideToXml | ( | org.w3c.dom.Element | el, |
Document | dom, | ||
boolean | shortRef | ||
) |
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, m2m.backend.structure.LoopWhile, and m2m.backend.structure.Switch.
Definition at line 170 of file Function.java.
boolean m2m.backend.structure.Function.isInput | ( | Element | element | ) |
Check if an element is an input of the function
element | the element to check |
Definition at line 556 of file Function.java.
void m2m.backend.structure.Function.modifAllNames | ( | String | prefix | ) |
Definition at line 235 of file Function.java.
void m2m.backend.structure.Function.modifyNumType | ( | BuildingBlock.NumType | type | ) |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, and m2m.backend.structure.Switch.
Definition at line 64 of file Function.java.
void m2m.backend.structure.Function.setBody | ( | Vector< Element > | body | ) |
Set a new body element list
body | Element list |
Definition at line 391 of file Function.java.
void m2m.backend.structure.Function.setInput | ( | Vector< Element > | in | ) |
Set a new input variable list
in | Variable list |
Definition at line 261 of file Function.java.
void m2m.backend.structure.Function.setInternalVars | ( | Vector< Element > | list | ) |
Set a new internal variable list
stat | Variable list |
Definition at line 309 of file Function.java.
void m2m.backend.structure.Function.setMaxCost | ( | int | cost | ) |
Set the maximum cost of the function.
cost | the maximum cost to set to the function |
Definition at line 604 of file Function.java.
void m2m.backend.structure.Function.setOutput | ( | Vector< Element > | out | ) |
Set a new output variable list
out | Variable list |
Definition at line 285 of file Function.java.
void m2m.backend.structure.Function.setRelativeMaxCost | ( | ) |
Set the maximum relative cost of the function.
cost | the maximum relative cost to set to the function |
Definition at line 622 of file Function.java.
void m2m.backend.structure.Function.superInsideToXml | ( | org.w3c.dom.Element | el, |
Document | dom, | ||
boolean | shortRef | ||
) |
Definition at line 166 of file Function.java.
String m2m.backend.structure.Function.toOctave | ( | int | level | ) |
Generate the octave code for the element
level | Indent level |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, and m2m.backend.structure.LoopWhile.
Definition at line 508 of file Function.java.
String m2m.backend.structure.Function.toSchematic | ( | int | level, |
String | prefix, | ||
String | boxFormat, | ||
String | color | ||
) |
Create the schematic file, use with graphviz to generate schematic
level | Level of tab |
prefix | Prefix for the element name |
boxFormat | Format of box (rectangle, triangle, ...) |
color | Color of the block |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, m2m.backend.structure.LoopWhile, and m2m.backend.structure.Switch.
Definition at line 454 of file Function.java.
String m2m.backend.structure.Function.toString | ( | int | level | ) |
Convert the object to a string that contains all the parametres
level | Indent of the string |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.IfThenElse, m2m.backend.structure.LoopFor, m2m.backend.structure.LoopWhile, and m2m.backend.structure.Switch.
Definition at line 404 of file Function.java.
String m2m.backend.structure.Function.toStringParam | ( | int | level | ) | [protected] |
Convert all the input, output and internal to a String
level | Indentation level |
Definition at line 420 of file Function.java.
Vector<Element> m2m.backend.structure.Function.body [protected] |
Function body
Definition at line 44 of file Function.java.
Vector<Element> m2m.backend.structure.Function.inputVars [protected] |
Function input variables
Definition at line 32 of file Function.java.
Vector<Element> m2m.backend.structure.Function.internalVars [protected] |
Function temp variables
Definition at line 40 of file Function.java.
int m2m.backend.structure.Function.maxCost [protected] |
Maximum cost of the function
Definition at line 48 of file Function.java.
int m2m.backend.structure.Function.maxRelativeCost [protected] |
Maximum relative cost of the function
Definition at line 52 of file Function.java.
Vector<Element> m2m.backend.structure.Function.outputVars [protected] |
Function output variables
Definition at line 36 of file Function.java.