SIMPLE AND GENERALIZED ELEMENTS SEARCH IN NESTED ARRAYS AND THEIR REPLACEMENT
https://doi.org/10.22405/2226-8383-2015-16-3-460-478
Abstract
The article provides a series of custom recursive functions for a variety of tasks of searching and replacing elements in nested arrays. The latter are defined recursively, as is done in the system of engineering and scientific calculations, PTC Mathcad Prime, then there are matrices whose elements can be scalars, strings, and again the nesting arrays. Some problems of the search are considered in [1-4]. Our goal was the development of existing and creation of new means associated with both simple and generalized searching and replacing elements in nested arrays. Let A be a scalar, a string, or a nested array, B — nested array. The problem with generalized occurrences of A in B (generalized searching A in B) and replaced of such occurrences arise when A or B to be included by special elements associated with any scalar, string or nested array. In the article are formulated 10 problems. For each suggested one or more solutions as functions in a programming language PTC Mathcad Prime. All the features are tested on a large number of examples, but the tests are not completely.
About the Authors
S. G. GrigoryevRussian Federation
A. R. Esayan
Russian Federation
References
1. Esayan, A. R. & Dobrovolsky, N. M. 2015, "Nested arrays and recursion" , Proc. XXIII Int. Conf. “Algebra, number theory and discrete geometry. Modern problems and applications” Tula, May 25–30 2015, pp. 319–321. (Russian)
2. Esayan, A. R. & Yakushin, A. V. 2015, "Vectorization and nested arrays" , Proc. XXIII Int. Conf. “Algebra, number theory and discrete geometry. Modern problems and applications” Tula, May 25–30 2015, pp. 328–330. (Russian)
3. Esayan, A. R. & Dobrovolsky, N. M. 2015, "Nested arrays and recursion" , Chebyshevskii Sb., vol. 16, no. 3(55), pp. 479–495.
4. Esayan, A. R. & Yakushin, A. V. 2015,"Vectorization and nested arrays" , Chebyshevskii Sb., vol. 16, no. 3(55), pp. 496–509.
5. Esayan, A. R. 2001, "Obuchenie algoritmizacii na osnove rekursii.", [Teaching algorithmization based on recursion], TGPU, Tula, 215 pp. (Russian)
6. Brent Maxfield, P. E. 2013, Essential PTC Mathcad Prime 3.0. A Guide for New and Cur-rent Users, Academic Press, New York.
7. Wessenlingh, Н. & de Waard, H. 2014, Calculate & Communicate with Mathcad Prime 3.0, Delft Academic Press, The Netherlands
Review
For citations:
Grigoryev S.G., Esayan A.R. SIMPLE AND GENERALIZED ELEMENTS SEARCH IN NESTED ARRAYS AND THEIR REPLACEMENT. Chebyshevskii Sbornik. 2015;16(3):460-478. (In Russ.) https://doi.org/10.22405/2226-8383-2015-16-3-460-478