A Concretization of an Approximation Method for Non-Afﬁne Fractal Interpolation Functions

: The present paper concretizes the models proposed by S. Ri and N. Secelean. S. Ri proposed the construction of the fractal interpolation function (FIF) considering ﬁnite systems consisting of Rakotch contractions, but produced no concretization of the model. N. Secelean considered countable systems of Banach contractions to produce the fractal interpolation function. Based on the abovementioned results, in this paper, we propose two different algorithms to produce the fractal interpolation functions both in the afﬁne and non-afﬁne cases. The theoretical context we were working in suppose a countable set of starting points and a countable system of Rakotch contractions. Due to the computational restrictions, the algorithms constructed in the applications have the weakness that they use a ﬁnite set of starting points and a ﬁnite system of Rakotch contractions. In this respect, the attractor obtained is a two-step approximation. The large number of points used in the computations and the graphical results lead us to the conclusion that the attractor obtained is a good approximation of the fractal interpolation function in both cases, afﬁne and non-afﬁne FIFs. In this way, we also provide a concretization of the scheme presented by C.M. P˘acurar.


Introduction
The notion of fractal interpolation has been introduced by Barnesley in [1] (see also [2]) and it represents a different interpolation method, which results in functions that are continuous, but not necessarily differentiable at every point. , where x i are sorted in an ascending order such that its graph is the attractor of an iterated function system. The significance of FIFs is emphasized by the numerous research directions that have been broadly studied ever since they were introduced. Among these directions, we mention the hidden variable fractal interpolation, which was introduced by Barnsley et al. (see [3]) and generates functions which are not self-referential; thus, being much more less restrictive (see [4][5][6]), the extension to a countable iterated function systems (a notion introduced in [7][8][9]) to obtain the corresponding FIFs (see [10,11]) and the replacement of the fixed point result (Banach fixed point theorem), which guarantees the existence of the FIF with different fixed point results (see [12][13][14][15]).
Among the different types of FIFs existing in the literature, there were studied affine FIFs (see [1]), but also non-affine FIFs (see [16]). However, if for the affine case, there have been studies undertaken towards the computational part (see [17][18][19][20][21]), as far as we know, there have not yet been any studies related to non-affine FIFs in this respect.
The aim of the present paper is to offer a concretization of an approximation method for non-affine fractal interpolation functions. Starting from the results in [8,12], in this paper, we propose two different algorithms to produce the fractal interpolation functions in both cases affine and non-affine FIFs. The theoretical context we were working in, suppose a countable set of starting points and a countable system of Rakotch contractions. Due to the computational restrictions the built algorithms, in applications, have the weakness that they uses a finite set of starting points and a finite system of Rakotch contractions. With this respect, the attractor obtained is a two-step approximation. The big amount of points used in the computations and the graphical results lead us to the conclusion that the attractor obtained is a good approximation of the fractal interpolation function in both affine and non-affine cases. In this way, we also provide a concretization of the scheme presented by C.M. Pȃcurar (see [15]).
In this study, we want to solve also the problem of viewing a big set of data, generated by the iterations schemes mentioned above, in order to better understand the theoretical knowledge in the function plotting field. We study the nature of data plotting in C++ regarding its pros and cons (limitations). The scope of the application is to generate graphs for various functions and to observe the steps taken by the algorithm in order to obtain the correct plotting. Using C++ (one of the fastest and most memory efficient languages) and Qt (a C++ cross-platform framework for GUI -Graphical User Interface), we developed an application that puts into use most of the modern features offered by C++ (especially, C++11 issues).

Mathematical Preliminaries
Let (X, d) be a metric space. Definition 1. The map f : X → X is called a Picard operator if f has a unique fixed point x * ∈ X (i.e., f (x * ) = x * ) and lim for every x ∈ X, where f [n] denotes the n-times composition of f with itself.
for every x, y ∈ X. The smallest C in the above definition is called Lipschitz constant and it is defined as for every x, y ∈ X.

3.
A map f : X → X is called ϕ-contraction if there exists a function ϕ : for every x, y ∈ X. 4.
Every Banach contraction is Lipschitz where the Lipschitz constant is smaller than 1.

2.
Every Banach contraction is a ϕ-contraction, for for every t > 0.
In [22], the following fixed point result was proved.
Theorem 1. Every Matkowski contraction on a complete metric space is a Picard operator.

Iterated Function Systems
Hutchinson introduced the notion of iterated function systems in [23]. Secelean extended the notion to countable iterated function systems, composed of a countable number of constitutive functions (see [8]).

Definition 3.
Let (X, d) be a compact metric space and the continuous functions f n : X → X. The system of all functions f n is called a countable iterated function system (CIFS), which will be denoted by S = {( f n ) n≥0 } Let P cp (X) be the class of all non-empty compact subsets of X. The fractal operator associated to S is the map F S : P cp (X) → P cp (X) defined as If the functions f n are Matkowski contractions (or Rakotch contractions, or ϕ-contractions, or Banach contractions), the fractal operator associated to the CIFS S is a Picard operator and its unique fixed point is called the attractor of S, which will be denoted by A S .

Countable FIFs
Let (Y, d) be a compact metric space and the countable system of data where the sequence (x n ) n≥0 is strictly increasing and bounded and m = lim n→∞ x n , and the sequence (y n ) n≥0 is convergent. We make the notation M = lim n→∞ y n . Let us recall from [15], the way we can construct a family of functions associated to the system of data (1): ] be a family of contractive homeomorphisms such that We can now define the family of functions ( f n ) n≥0 Given the same aforementioned framework, there exists an interpolation function f * corresponding to the system of data (1) such that its graph is the attractor of the CIFS In the particular case that Y is a compact real interval, Y ⊂ (0, ∞), we can choose the non-affine functions f n as follows (see [15]): For the affine case, when Y is a compact real interval, one can choose the functions f n as follows (see [10]):

Applied Technologies. Motivation (Pros)
Qt is a widget toolkit for creating graphical user interfaces as well as cross-platform applications that run on various software and hardware platforms such as Linux, Windows, macOS, Android or embedded systems with little or no change in the underlying codebase, while still being a native application with native capabilities and speed. Qt Creator is a cross-platform C++, JavaScript and QML integrated development environment which simplifies Graphical User Interface (GUI) application development. It includes a visual debugger and an integrated WYSIWYG (What You See Is What You Get) GUI layout and forms the designer. The editor has features such as syntax highlighting and autocompletion.
One of the main problems encountered during development was using user-input flexible functions, that is why we prioritised adding a fairly robust mathematics parsing engine written in C++. We chose CmathParser (https://github.com/NTDLS/CMathParser, accessed on 15 February 2021) that provides a robust collection of functions and structures that give users the ability to parse and evaluate various types of expressions. Although it is fairly lightweight, CMathParser can interpret a various list of mathematical functions and operations and its performance is convenient in relation to the advantages that this engine brings. The mathematical functions used need to follow a specific syntax (for example, √ x is SQRT(x)), this is why we found it useful to read our functions from a file. We opted for reading from an XML (Extended Markup Language) file because we can use the tags in our advantage and clearly define every function and every parameter for that function.
Below, Listing 1, is an example for an XML file accepted by the application: Qt C++ widget for plotting and data visualization. It has no further dependencies and is well documented. This plotting library focuses on making good looking, publicationquality 2D plots, graphs and charts, as well as offering high performance for real time data visualization applications.

Technical Notes on Performance
Our target regarding the application's performance focused around optimising the algorithm in a way that it brings up the graphs as soon as possible. To increase the performance, we used multithreading: we use all the available threads on the CPU and developed the algorithm in a way that favors concurrency. The algorithm finds out how many threads are available and uses them (for a CPU with 4 threads, the algorithm will use a maximum of 4 threads on max load) although it is possible to start any number of threads (the OS scheduler will put them in a priority queue). A program that starts 100 threads for 100 tasks on a 4 threaded CPU will be less performant than the same program that splits those 100 tasks in a way that the CPU takes 4 tasks at a time.
This, Listing 2, is a threading code snippet that spawns as many threads as available to generate points: The number of used threads impacts performance, and overall, the quality and time; see Figure 1. It can also be seen that as the number of points increases, the difference between the time associated with running with 8 threads versus 16 threads increases considerably.

Limitations (Constraints)
At the present time, the only known limit of the application is the time required to generate and plot the points when they are billions or even more in number. The next examples were run on a i7-7700HQ with 8 threads. RAM memory is not really relevant because the algorithm is very CPU heavy.
For the probabilistic scheme, generating and plotting 100,000 points are made in approximately 2-3 s, and for every p * 100,000 (p is a signed integer), the time will be approximately p * x, where x ∈ [2,3].
For the deterministic scheme, things become challenging. At a low level, the time for generating and plotting points will be the same as for Step 1. The difference occurs in the number of points the scheme generates for parameters k, n, p. leading to run time fluctuations and may occur due to the insertion and processing of points in the files.

Countable Fractal Non-Affine Interpolation Schemes
We start the study producing an approximation for the fractal countable non-affine interpolation scheme in two different ways. Let us consider the positive, increasing, convergent sequence (x n ) n∈N , the convergent sequence (y n ) n∈N defined by (x n ) n∈N , (y n ) n∈N given by the following: and the sequence of non-affine functions given by the following: for all (x, y) ∈ [x 0 , m] × Y . The argument of the function sinus we used when defining y n was imposed by the fact that the Mathematical Function Library demands us to work in radians.
The absolute value of sinus in the definition of y n was imposeed by the fact that every second coordinate of the points obtained in the process must be positive in order to have a Rakotch contraction. The result obtained is an approximation of the countable non-affine interpolation schemes. For the desired approximation, we take the following subsets The two schemes we used are the probabilistic interpolation scheme and the deterministic interpolation scheme. The probabilistic scheme is described in Algorithm 1.
The deterministic scheme we are triyng to apply is given by the Algorithm 2. The probabilistic scheme (Algorithm 1), after 100,000 steps, leads us to the result shown in Figure 2. In Figure 4, a graph with the plotting of the interpolation function in every step of the algorithm is shown.

Countable Fractal Affine Interpolation Schemes
We made the study producing an approximation for the fractal countable affine interpolation scheme in the same two ways as for the non-affine case. Let us consider the positive, increasing, convergent sequence (x n ) n∈N , the convergent sequence (y n ) n∈N defined by x n = 3 √ n + 1 √ n + 1 , y n = cos 180 · n π + 1 √ n + 1 and the affine sequence of functions ( f n (x, y)) n∈N for all (x, y) ∈ [x 0 , m] × Y . The argument of the function cosinus we used when defining y n was imposed by the fact that the Mathematical Function Library demands us to work in radians.
For the desired approximation, we take the following subsets The probabilistic scheme (Algorithm 1), after 100,000 steps, leads us to the result shown in Figure 5. The deterministic scheme produces, for k = 100 , n = 100 and p = 3, the graph in Figure 6.
The time for obtaining the points in these conditions was 595.631 s and the time for plotting the function was 1594.470 s. The graph with the plotting of the interpolation function in every step of the algorithm is given in Figure 7.
The red graph is for the function given by the random generated 100 points. Graph 2 is the function for 10,000 thousand points (step for p = 1), graph 3 is for the function after step p = 2 (1,000,000 points) and the yellow graph is the final one-the same as in Figure 7.

Conclusions
The main conclusion of this study is that the algorithms presented give similar approximations of the FIFs for both schemes, affine and non-affine. For the probabilistic scheme (Algorithm 1), significant results are obtained for more than 10,000 steps and the time elapsed to plot the graph is less than two seconds. The deterministic scheme (Algorithm 2) permits the study of the variation of FIFs, step by step, but, in order to obtain significant results one must perform more than three steps. The time elapsed in this case is more than 1000 s. In the applications presented, both algorithms have an imposed number of steps.
Further studies are to be made in order to obtain a condition for stopping the algorithms if some conditions are fulfilled .
Besides the two algorithms, the computer application is a useful tool for plotting big sets of data generated by the iteration schemes described above through functions made in C++. It truly shows the capabilities of this programming language and it pushes it to the maximum using threading and modern programming techniques.