VECTORIZATION AND NESTED ARRAYS
https://doi.org/10.22405/2226-8383-2015-16-3-496-509
Abstract
In PTC Mathcad, and in previous versions of Mathcad, for numeric and symbolic computation proposed special vectorization operation, which can be used to perform many built-in and some custom functions of one variable over each scalar element or string element simple or nested arrays. This operator looks in the form of directed arrows from left to right over expression. The operation of the vectorization can be applied to built-in functions of several variables, but only over a simple array with a scalar or string elements. So, we emphasize that for built-in functions of one or several variables vectorization operation in the case of nested arrays can be implemented not always. And for user-defined functions, it is usually not implemented even for simple arrays. In the article removed all these constraints and are constructed analogues operation vectorization for any built-in or user-defined functions from one or more variables over simple or nested arrays. There are proposed compact recursive functions that perform the role of the vectorization operator. We considered two possible approaches to solving this problem. When you first approach for functions g of n variables are constructed separate recursive programs-functions F1, F2, F3, ..., implement vectorization respectively for n = 1, 2, 3, ... . The second approach for a function g from n variables creates a single for any n = 1, 2, ... program-function F that performs the role of the vectorization operator. In connection with the problem of vectorization for nested arrays formulated some auxiliary problem and were proposed solutions in a form of recursive functions.
About the Authors
A. R. EsayanRussian Federation
A. V. Yakushin
Russian Federation
References
1. Esayan, A. R. 2001, "Obuchenie algoritmizacii na osnove rekursii." , [Teaching algorithmization based on recursion], TGPU, Tula, 215 pp. (Russian)
2. Brent Maxfield, P. E. 2013, Essential PTC Mathcad Prime 3.0. A Guide for New and Cur-rent Users, Academic Press, New York.
3. Wessenlingh, Н. & de Waard, H. 2014, Calculate & Communicate with Mathcad Prime 3.0, Delft Academic Press, The Netherlands.
4.
Review
For citations:
Esayan A.R., Yakushin A.V. VECTORIZATION AND NESTED ARRAYS. Chebyshevskii Sbornik. 2015;16(3):496-509. (In Russ.) https://doi.org/10.22405/2226-8383-2015-16-3-496-509