In section I.4.4, functions are defined that allow the creation of new Result objects from existing ones. Here, short-cuts to some of these functions are presented (for the following functions, x, y and z are Result objects):
z=Post.pow(x,y) is generally equivalent to “z=x.deriveDyadic("pow",y)”. But the “pow” method defined in “Post” module also allows to replace the first “x” operand by a Real value. However, at least one of the two arguments must be a Result object.
z=Post.atan2(x,y) is generally equivalent to “z=x.deriveDyadic("atan2",y)”. But the “atan2” method defined in “Post” module also allows to replace the first “x” operand by a Real value. However, at least one of the two arguments must be a Result object.
z=Post.vectProduct(x,y) is generally equivalent to “z=x.deriveDyadic("vectProduct",y)”. However the first argument can be replaced by a vector (Array of three real elements). However, at least one of the two arguments must be a Result object.
z=Post.sumVectProduct(x,y) is equivalent to “z=x.deriveDyadic("sumVectProduct",y)”.
Other functions that have no direct correspondence in Result class methods can also be used to define new Results:
z=Post.min(x,y) returns a Result built by selecting the minimum values of x and y. The method works with scalar, vectorial or tensorial results. Either x or y can be replaced by a Real value.
z=Post.max(x,y) returns a Result built by selecting the maximum values of x and y. The method works with scalar, vectorial or tensorial results. Either x or y can be replaced by a Real value.
z=Post.cmp(x,y) returns a Result built by setting the corresponding values to -1 if x<y, 0 if x==y and 1 if x>y. Both results must be scalar. Either of the two Results can be replaced by a real argument.
z=Post.mergeKeepFirst(x,y) returns a Result built by merging the two arguments. When a key is present in the two argument Results, the values extracted from the first Result are kept.
z=Post.merge(x,y) is identical to z=Post.mergeKeepFirst(x,y).
z=Post.mergeKeepLast(x,y) returns a Result built by merging the two arguments. When a key is present in the two argument Results, the values extracted from the second Result are kept.
Most of the dyadic functions insert a pair “key-value” in the created Result only if the corresponding key is found in the two Result arguments. “Post.min”, “Post.max” and “Post.merge” methods are an exception: if a given key is found in only one of the two arguments, it is inserted in the new Result.