Presently, only one such method is defined: the “deriveDyadic” method. This method returns a new Result object corresponding to the dyadic derivation. This method has two arguments:
The “Method” String argument corresponds to the name of the dyadic method that is used for the calculation of new Result’s values.
The ”Second” argument can be a Result object or a real value. The Result object is always a valid argument if its tensor order is compatible with the operation being performed. The “real” argument is valid only if the invoked method is “atan2” or “pow”.
Possible values for the “Method” argument are:
“atan2” performs the “atan2” operation on its argument values (). The object on which the method is called must be a scalar Result object. The “Second” argument must be either a scalar Result or a real value. For a real argument, one calculates .
“pow” performs the “pow” operation on its argument (). The object on which the method is called must be a scalar Result object. The “Second” argument must be either a scalar Result or a real value. For a real argument, one calculates for each .
“vectProduct” calculates the vectorial product of its arguments. Several types of arguments are accepted:
The two arguments are vectorial Result objects. Then, .
The second argument can be replaced by a vector (Array of three real elements). Then, one calculates .
The first argument can be replaced by a vector (Array of three real elements) or a complex vector (Array of three complex elements). Then, .
“sumVectProduct” calculates the sum of the vectorial product of its arguments: . The two arguments are vectorial Result objects.
“min” keeps the minimum of the two values. Values must be Real. If the arguments are not scalar, they must have common tensorial order, and for each key-value pair, the coordinate system ID of the arguments must match. Then, the derivation is done component per component.
“max” keeps the maximum of the two values. Values must be Real. If the arguments are not scalar, they must have common tensorial order, and for each key-value pair, the coordinate system ID of the arguments must match. Then, the derivation is done component per component.
“compare” sets the value of new Result to -1, 0 or 1 depending on the relative first and second values. Values must be scalar and Real. If the arguments are not scalar, they must have common tensorial order, and for each key-value pair, the coordinate system ID of the arguments must match. Then, the derivation is done component per component.
“merge” or “mergeKeepFirst” keeps the value of the first Result if a given key is present in the two values. Otherwise the pair key-value of the second Result is kept.
“mergeKeepLast” keeps the value of the second Result if a given key is present in the two values. Otherwise the pair key-value of the first Result is kept.
Note that several of the methods above for dyadic derivation have corresponding short-cuts in the “Post” module.
The different methods listed above are available for real Results. For Complex Results, only the methods “vectProduct”, “sumVectProduct”, “merge”, “mergeKeepFirst” and “mergeKeepLast” can be used. Of course, if the ”Second” argument is a Real object, the “deriveDyadic” method cannot be invoked on a Complex Result object.
Note also that all the dyadic derivation methods discussed here are invoked on a Result object which is the first argument. Dyadic derivation methods that allow to replace the first argument by a real or vector object are also defined in the Post module. (See section I.6.3.)