Installation
- Edit the file shared\rootsIni.m and set values for "folder," "RAM," and "DIAGNOSTICS."
- "Folder" establishes the folder that will contain roots.his and deflatedRadii.his. Roots.his contains information about each factorization. You should look here for any error messages. DeflatedRadii.his contains the magnitude of roots obtained by deflation. However, if the magnitude was > 1, its reciprocal is listed instead. This information was used to fine tune the grid-generation but is no longer needed.
- RAM is the amount of available physical RAM in GB. Higher degree polynomials require smaller grid cells which requires more RAM. 1 GB actual RAM is sufficient for degree 1 million, but it will be extremely slow. 2 GB is sufficient for degree 2 million, but it took 6 days on a 3 GHz Pentium.
- DIAGNOSTICS=0 means no diagnostics. DIAGNOSTICS=1 prints diagnostic messages from the three basic steps - grid search, polishing, and unfactoring/deflation. This is useful for very long factorizations so you can tell how much work is still left.
- Whenever you receive a large package of code from someone else, there is always the potential that some file name will be the same as a file you already have. The easiest way to deal with this is to have a file named something like polypath.m containing lines like:
addpath('c:\!matlab\Poly');
addpath('c:\!matlab\Poly\broots');
addpath('c:\!matlab\Poly\lroots');
addpath('c:\!matlab\Poly\lroots\simp_fl');
addpath('c:\!matlab\Poly\multroot\multroot');
addpath('c:\!matlab\Poly\shared');
addpath('c:\!matlab\Poly\mexFiles');
addpath('c:\!matlab\Poly\Unwrap');
addpath('c:\!matlab\Poly\util');
Note, this example used "\" indicating Windows file names. Linux would use "/."
Addpath adds these files to the beginning of your Matlab path so they will be seen before anything else. Simply run polypath before you run any of the programs in this distribution.
- The alternative is to manually search for files with the same name and start renaming.
- If there are no file name clashes, you can copy the files to some place on your Matlab path. If you wish, you can put them all in some existing folder. Alternatively, if you do not use something like polypath.m, you can retain the existing system of folders and edit your matlab\toolbox\local\startup.m file to add the new folders to your Matlab path. (At least that is the location of startup.m in Windows.)
- If you are not using Windows, you will want to compile the 4 c-code files in folder "mexFiles." using the mex comand:
>> mex rdft.c rdftNoTable.c
>> mex deflate.c
>> mex innerpart.c
>> mex winding.c
If you do not, the factorization and phase unwrapping programs will still work for random coefficient polynomials using the corresponding m-files, but factorization will be much slower. Also, nroots will not work unless winding.c is compiled.
The following are times on a 2.66 GHz computer. If the Mex files are compiled, the times to factor polynomials of degree 100, 500, and 1,000 are 0.09, 0.31, and 0.51 seconds. If they are not compiled, the times are .45, 9.53, and 35.67 seconds.