The Math library contains the following Utility operators:
Applies a constant value to a result table.
Inputs
|
value: a space-separated string representing a scalar, vector, or tensor.
|
Outputs
|
table: destination table to store the constant value.
|
Notes
|
• | A constant value table will return the same record for every item lookup, specified by value. |
• | The value string must have same format as table (vector and tensor tables require multiple values). A tensor table can accept values of three or six components (representing a 2D or 3D tensor). |
• | Multiple values are passed in a space-separated string: |
o | The following examples show the value attribute applied to each result table type: |
▪ | Vector: value=”1.0 2.0 3.0” |
▪ | Tensor value=”1.0 2.0 3.0” (creates a 2D tensor constant value) |
▪ | Tensor: value=”1.0 2.0 3.0 4.0 5.0 6.0” (creates a 3D tensor constant value) |
• | Vector and tensor constant values are defined relative to the global coordinate system. |
• | When applying this operator to a complex value table, the following rules apply: |
o | If the imaginary parts are omitted, they will be assigned to 0.0. |
o | Complex vector and tensor constants follow a block format where the real parts are followed by the imaginary parts: |
▪ | Vector: value=”Xr Yr Zr Xi Yi Zi” |
▪ | Tensor: value=”XXr YYr XYr XXi YYi XYi” (creates a 2D tensor constant value) |
▪ | Tensor: value=”XXr YYr ZZr XYr YZr ZXr Xxi YYi ZZi XYi YZi ZXi” (creates a 3D tensor constant value) |
|
Expression Builder
|
Numbers in equations are converted to constant value tables. Vector and tensor values are represented using templex style arrays: vector={X,Y,Z}, tensor={XX,YY,XY}, etc. Complex values use the same syntax, and have sub-arrays for the real and imaginary parts: scalar = {{R},{I}}, vector={{Xr,Yr,Zr},{Xi,Yi,Zi}}, etc.
|
XML Example
|
<call name="Constant" value="1.0 2.0 3.0"
table="dest_tab" />
|
|
Combines two tables together into a single table. Matching records are replaced or summed.
Inputs
|
src: a value table.
with: a value table.
|
Outputs
|
answer: a value table.
sum_count: a scalar value table (default=”null”).
|
Notes
|
• | src, with, and answer must be of the same type, binding, and format. |
• | If sum_count is specified, it must be a scalar table bound to the same entity type as src, with, and answer. |
• | The sum_count argument controls how values from src and with are combined into answer. |
o | If sum_count is “null”, answer will contain records from src and with. In the case where a matching record ID exists in both src and with, answer will contain the record from with. |
o | If sum_count is a valid scalar table, it will contain a count for each record added to answer. In the case where a matching record ID exists in both src and with, answer will contain the sum of src and with. |
• | Combine can be used to average values between two tables by dividing answer by sum_count. |
|
Expression Builder
|
N/A
|
XML Example
|
<call name="Combine" src="src_tab" with="with_tab"
answer="ans_tab" />
|
|