Degree Calculator 1.5.01 Copyright (C) 2012 Marco Spadini This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License for more details. About the author: Marco Spadini Dipartimento di Matematica e Informatica, Via S. Marta 3, 50139 Firenze, ITALY web: http:\\\www.dma.unifi.it\~spadini e-mail: marco.spadini@math.unifi.it Description: The program attempts the computation of the topological degree of the self-map, in the n-dimensional Euclidean space, f=(f[0];...;f[n-1]), with respecto to the point Q=(Q[0];...;Q[n-1]), relatively to an n-dimensional box P whose faces are parallel to the hyper-planes x[0]=0,...,x[n-1]=0 and id defined by two apposite corners A=(A[0];...;A[n-1]) and B=(B[0];...;B[n-1]). Namely, P = {(x[0];...;x[n-1]): A[i] < x[i] < B[i], i=0,...,n}. Starting from version 1.4.09, x[0],...,x[5] can be replaced, in the expression of f, by x,y,z,u,v,w respectively (in this case "x" is a scalar andactually represents "x[0]"). Mixing x,y,... and x[0],x[1],... in the same formula is possible but not recommended: it is not sound mathematically and quite confusing. The program works by attempting the computation, via the Montecarlo method, of a certain integral on the preimage of a given (hyper-)cube centered at Q. The choice of the integration method has been determined by simplicity and robustness considerations. Unfortunately this choice is not well-suited for problems in many dimensions where the necessary number of trial points becomes quickly prohibitively high. At the end of each computation, before returning control to user interface, a batch of checks is run on approximation parameters and warnings are raised in suspicious cases. However the user is well-advised not to rely too heavily on these tests. The program is designed so that, in order to speed things up, it tries to take advantage of multiple cores/CPUs where present. However, for those who really want execution speed, a hybrid version written in Python+FORTRAN95/OppenMP is in preparation. INSTALLATION: To install this program just copy it to some directory in your system. Bear in mind, however, that this is a Python script not a binary executable. Thus, in order to run it, you need to have Python installed (at least v.2.6.5 is guaranteed to work) along with the modules this script relies on which might not yet be present on your system. These are all available on the internet, though. Example: On my Linux box running KUbuntu, I installed the packets python-scipy, python-numpy, python-tk, python-gtk2, python-Pmw (perhaps some of them can be found rolled together in some big metapackage), in addition to the preinstalled ones. Actually, I am not at all sure that all the above packets are truly necessary. Example: On my small testing Windows(TM) machine, I succesfully ran the program after installing the packages: python2.7, numpy, scipy, sciTools, (you may need Tkinter too depending on the Python distribution), which I downloaded from the Internet after googling them. INSTALLATION NOTE: In case of problems with the Pmw package, the program can be run with the option --noFuss (or --quiet or -q) that disable the (few) feature that require that package (see below). RUNNING THE PROGRAM: (Bash shell and similar.) Just go to the directory containing the script and, at the prompt write: "python degree_*" (replace * with version number). Linux users might want to customize the magic line at the top and make executable the file containig this script. In this case a graphic WM, such as KDE, will let you launch the program with a simple click! Lazy typers like to spare themselves even a few keystrokes :-) (Other shells.) If you are not using the bash shell (for instance if you use some non-Linux system), do not despair. Some similar command will do the trick. For example, the same command, or its variant "pythonw degree_*", (provided everything is installed correctly) works from the DOS prompt in a Windows(TM) terminal. CALLING OPTIONS: The program accepts the following options: -s, --single Invokes the single process mode. Good for those machines where multiprocess is absent or fails. -q, --quiet It means "No baloon help". This option is good for those machines where package Pmw is not installed. -h, --help Outputs a help string and exit the program. Default is: Active Baloon helps, and Multiprocess Computation Mode. CODE FREEZING: Someone might find useful to roll the script and all of its referenced modules to a base executable in order to install it on Python-less machines. This can be done, for instance with cxFreeze (I tried). However, this procedure will not speed up execution. Have fun!