///////////////////////////////////////////////////////////////////

  BRI.h class - README

///////////////////////////////////////////////////////////////////

1) Introduction
---------------

This is a C++ class template that contains all the necessary 
functions for implementing a rational barycentric interpolant 
with all its features. In addition to the standard C++ data types, 
the BRI template variables can also be defined with arbitrary 
precision. In this case, it is necessary to download and install 
the MPFR library (https://www.mpfr.org/) and the MPFR C++ interface 
by Pavel Holoborodko (https://github.com/advanpix/mpreal).

2) Compiling and executing "sample.cpp" 
-------------------------------------

In the code "sample.cpp", the BRI.h class is used to evaluate
the barycentric rational interpolant r of Runge's function 
for d=3 and 11 uniform nodes in [-1,1] at the evaluation point x.
The latter is chosen by the user interactively and both input and 
output types are double.

The code can be compiled by

gcc sample.cpp -lstdc++ -o sample.exe

and executed by

sample.exe

3) Folder "test"
---------------

Contains the source codes of all examples shown in the paper and 
they can be automatically compiled and executed thanks to the 
Makefile. In particular,

  make

compiles all the examples and

  make run

executes them. It is also possible to compile and execute just one 
test, for example, considering Program1, it is compiled by

  make Program1

and executed by

  Program.exe

Finally,

  make clean

deletes all the executable files. Note that Program 4 uses MPFR 
data types, so the MPFR library needs to be installed.

4) Folder "fig"
--------------

Contains the C++ and Matlab codes that we used to create the 
figures in the paper. First, compile and execute the .cpp files
as before for the test file, and then run the .m files to plot the
results. Regarding Figure 2, we show the case n=39, but it is 
possible to change the value of n in the file fig2.cpp (lines 23-25).
Note that for Figure 1 we use MPFR data types, so the MPFR library 
needs to be installed.



