Math2mat
|
Public Member Functions | |
String | getXmlTagName () |
boolean | insideFromXml (org.w3c.dom.Element el, Function newFunc) |
void | insideToXml (org.w3c.dom.Element el, Document dom, boolean shortRef) |
Operation () | |
Element | findElement (String name) |
void | copyTo (Element e, Function newFunc) |
Operation (String opName) | |
Operation (String opName, boolean gen) | |
BuildingBlock | getFirstPipelined (NumType type) |
void | modifyNumType (BuildingBlock.NumType type) |
BuildingBlock | getFirst () |
void | addInput (Element op) |
void | setInput (Vector< Element > op) |
void | setInputAt (int i, Element op) |
Vector< Element > | getInput () |
int | getNbInput () |
Element | getInputAt (int i) |
void | addOutput (Element op) |
void | setOutput (Vector< Element > op) |
void | setOutputAt (int i, Element op) |
Vector< Element > | getOutput () |
int | getNbOutput () |
Element | getOutputAt (int i) |
void | setBlock (BuildingBlock block) |
BuildingBlock | getBlock () |
void | setOpName (String name) |
String | getOpName () |
String | getOpSymbol () |
String | toString (int level) |
String | toSchematic (int level, String prefix, String boxFormat, String color) |
String | toOctave (int level, String op) |
Protected Member Functions | |
String | toStringParam (int level) |
Protected Attributes | |
Vector< Element > | input |
Vector< Element > | output |
BuildingBlock | block |
String | opName |
boolean | generic = false |
Describe an operation
<T> | Type of element (Operation or SimpleVariable) |
Definition at line 28 of file Operation.java.
m2m.backend.structure.Operation.Operation | ( | ) |
Construct an empty operation
Definition at line 120 of file Operation.java.
m2m.backend.structure.Operation.Operation | ( | String | opName | ) |
Definition at line 179 of file Operation.java.
m2m.backend.structure.Operation.Operation | ( | String | opName, |
boolean | gen | ||
) |
Definition at line 185 of file Operation.java.
void m2m.backend.structure.Operation.addInput | ( | Element | op | ) |
Add an operand to the operand list
op | Operand |
Definition at line 237 of file Operation.java.
void m2m.backend.structure.Operation.addOutput | ( | Element | op | ) |
Add an operand to the operand list
op | Operand |
Definition at line 293 of file Operation.java.
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.Addition, m2m.backend.structure.Assignment, m2m.backend.structure.Comparison, m2m.backend.structure.Delay, m2m.backend.structure.Division, m2m.backend.structure.DotDivision, m2m.backend.structure.DotMultiplication, m2m.backend.structure.Equal, m2m.backend.structure.GenericOperation, m2m.backend.structure.Greater, m2m.backend.structure.GreaterEqual, m2m.backend.structure.Less, m2m.backend.structure.LessEqual, m2m.backend.structure.Multiplexer, m2m.backend.structure.Multiplication, m2m.backend.structure.Negation, m2m.backend.structure.NotEqual, m2m.backend.structure.Power, m2m.backend.structure.SQRT, and m2m.backend.structure.Subtraction.
Definition at line 144 of file Operation.java.
Element m2m.backend.structure.Operation.findElement | ( | String | name | ) |
Reimplemented from m2m.backend.structure.Element.
Definition at line 127 of file Operation.java.
BuildingBlock m2m.backend.structure.Operation.getBlock | ( | ) |
BuildingBlock m2m.backend.structure.Operation.getFirst | ( | ) |
Get the first material block who correspond to the opName
Definition at line 221 of file Operation.java.
BuildingBlock m2m.backend.structure.Operation.getFirstPipelined | ( | NumType | type | ) |
Get the first pipelined material block if exist, or the first block who correspond to the opName
Definition at line 197 of file Operation.java.
Vector<Element> m2m.backend.structure.Operation.getInput | ( | ) |
Element m2m.backend.structure.Operation.getInputAt | ( | int | i | ) |
Get the operand to the wanted position
i | Position |
Definition at line 279 of file Operation.java.
int m2m.backend.structure.Operation.getNbInput | ( | ) |
int m2m.backend.structure.Operation.getNbOutput | ( | ) |
String m2m.backend.structure.Operation.getOpName | ( | ) |
String m2m.backend.structure.Operation.getOpSymbol | ( | ) |
Get the operation symbol of the operation
Reimplemented in m2m.backend.structure.Addition, m2m.backend.structure.And, m2m.backend.structure.Assignment, m2m.backend.structure.Division, m2m.backend.structure.DotDivision, m2m.backend.structure.DotMultiplication, m2m.backend.structure.Equal, m2m.backend.structure.Greater, m2m.backend.structure.GreaterEqual, m2m.backend.structure.Less, m2m.backend.structure.LessEqual, m2m.backend.structure.Multiplication, m2m.backend.structure.Negation, m2m.backend.structure.Not, m2m.backend.structure.NotEqual, m2m.backend.structure.Or, m2m.backend.structure.Power, m2m.backend.structure.SQRT, and m2m.backend.structure.Subtraction.
Definition at line 381 of file Operation.java.
Vector<Element> m2m.backend.structure.Operation.getOutput | ( | ) |
Element m2m.backend.structure.Operation.getOutputAt | ( | int | i | ) |
Get the operand to the wanted position
i | Position |
Definition at line 335 of file Operation.java.
String m2m.backend.structure.Operation.getXmlTagName | ( | ) | [virtual] |
Implements m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.GenericOperation, m2m.backend.structure.LogicOperation, and m2m.backend.structure.Multiplexer.
Definition at line 46 of file Operation.java.
boolean m2m.backend.structure.Operation.insideFromXml | ( | org.w3c.dom.Element | el, |
Function | newFunc | ||
) |
Reimplemented from m2m.backend.structure.Element.
Reimplemented in m2m.backend.structure.Multiplexer.
Definition at line 51 of file Operation.java.
void m2m.backend.structure.Operation.insideToXml | ( | org.w3c.dom.Element | el, |
Document | dom, | ||
boolean | shortRef | ||
) |
Reimplemented in m2m.backend.structure.Multiplexer.
Definition at line 99 of file Operation.java.
void m2m.backend.structure.Operation.modifyNumType | ( | BuildingBlock.NumType | type | ) |
Reimplemented from m2m.backend.structure.Element.
Definition at line 213 of file Operation.java.
void m2m.backend.structure.Operation.setBlock | ( | BuildingBlock | block | ) |
void m2m.backend.structure.Operation.setInput | ( | Vector< Element > | op | ) |
void m2m.backend.structure.Operation.setInputAt | ( | int | i, |
Element | op | ||
) |
Set the operand to the wanted position
i | Position |
op | Operand |
Definition at line 254 of file Operation.java.
void m2m.backend.structure.Operation.setOpName | ( | String | name | ) |
void m2m.backend.structure.Operation.setOutput | ( | Vector< Element > | op | ) |
void m2m.backend.structure.Operation.setOutputAt | ( | int | i, |
Element | op | ||
) |
Set the operand to the wanted position
i | Position |
op | Operand |
Definition at line 310 of file Operation.java.
String m2m.backend.structure.Operation.toOctave | ( | int | level, |
String | op | ||
) |
Generate the octave code corresponding to the operation, the operator is set by the parameter op.
level | Tabulation level |
op | Operator |
If octave need to display the resultat of the operation
Definition at line 472 of file Operation.java.
String m2m.backend.structure.Operation.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.Multiplexer.
Definition at line 424 of file Operation.java.
String m2m.backend.structure.Operation.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.Multiplexer.
Definition at line 386 of file Operation.java.
String m2m.backend.structure.Operation.toStringParam | ( | int | level | ) | [protected] |
Convert input and output to String
level | Indent of the string |
Definition at line 402 of file Operation.java.
BuildingBlock m2m.backend.structure.Operation.block [protected] |
Define what material block use
Definition at line 38 of file Operation.java.
boolean m2m.backend.structure.Operation.generic = false [protected] |
Definition at line 43 of file Operation.java.
Vector<Element> m2m.backend.structure.Operation.input [protected] |
Operand list
Definition at line 33 of file Operation.java.
String m2m.backend.structure.Operation.opName [protected] |
Save the name of the operation (add, sub, mult, etc)
Definition at line 42 of file Operation.java.
Vector<Element> m2m.backend.structure.Operation.output [protected] |
Definition at line 34 of file Operation.java.