📄 readme.2
字号:
HOW TO USE FD3, VERSION 0.3.A PROGRAM FOR CALCULATING FRACTAL DIMENSION.What follows is a fairly detailed set of directions for usingthe fractal dimension (FD3) program. We are aware that many ofthe potential users are not well-aquainted with computingsystems, and we have made an effort to make this documentsomewhat accessible to them. We hope that the moresophisticated readers will bear with us.To use the FD3 program, a directory should be created and thesource files fdqueue.c, fdutil.c, and fddriver.c should becopied to it. The include file fd.h should also be copied tothe same directory. The sample inputs and outputs, and thefiles containing documentation of the program probably ought tobe placed in this directory too. (To you Unix savants: sorry,no man page yet.) If you are getting an update of a previousrelease of the software, you should put it into a DIFFERENTdirectory from all other versions.The source files should then be compiled, using the C compileron the host computer.Compilation is the act of translating the (english-like) sourceversion of the program into the machine-executable binaryversion of the program. Typically, compilation is carried outby a special program that runs on the host machine -- acompiler. We can't send you our BINARY form of the programbecause different machines have different machine languages,and thus the binary version that runs on our machine wouldprobably not run on your machine. Since the FD3 you aregetting is written in a source language called "C", a "Ccompiler" is required.When WE compile the program in a Unix environment, we sometimesuse the following command:cc -o fd3 fdqueue.c fdutil.c fddriver.c -lm This has the effect of compiling all three source files, linkingthem to the mathematics libraries, and naming the compiledversion of the program "fd3". You should consult your Ccompiler's documentation or ask your system administrator forhelp if you are uncertain about this step. (Again, apologiesto Unix and C savants -- no makefiles yet.)Once the program has been compiled, the executable version ofthe program will exist, and will be a named binary file. Weassume that you will have given it the name "fd3", butobviously, you can give it any name you like, and if the nameyou use is different from ours, you should substitute it belowwhere we use "fd3" -- especially where we use it in commandsthat are to be given to the computer!The simplest way to run the program is to do so while attachedto a directory containing the executable code, and an inputfile. In a Unix environment, one then typesfd3 inputfilenameto execute the program with the input taken from the file"inputfilename" (instead of literally typing "inputfilename",you type the name of the file that you want the program to useas input.) If this does not work in your environment, you mayhave to check with your system administrator to find out theconventions for executing a program. The input file must be ofthe following form:Line 1: Number, N, of data lines (POINTS) in the input file.Line 2: Coordinates of 1st POINT, separated by at least one space or tab.Line 3: Coordinates of 2nd POINT, separated by at least one space or tab.Line 4: Coordinates of 3rd POINT, separated by at least one space or tab. ... ... ...Line n: Coordinates of (N-1)st POINT, separated by at least one space or tab.Line n+1: Coordinates of Nth POINT, separated by at least one space or tab.------------------------------------------Example* of a 1-DIMENSIONAL input file:------------------------------------------105.564.56111114534.552.2245324.55555432 689.9756546.9987476.098------------------------------------------Example* of a 2-DIMENSIONAL input file:------------------------------------------103.34 5.566664.9 4.561111145 .776234 34.552.2245 02556.3 324.55555432 333.0001334.987 689.97568765.567 546.99874345.45 76.098------------------------------------------Example* of a 3-DIMENSIONAL input file:------------------------------------------102.47 3.34 5.56-3.123 6664.9 4.5610.334231 111145 0.776497650 234 34.55217 2.2245 01.23 2556.3 324.5555510548 432 333.00012815 334.987 689.9756219.85 8765.567 546.998740.0042987 345.45 76.098################################################## * Real data sets ought to be larger than the sample above. It is not possible for us to say precisely what the requirements for a good sample are. We have found empirically that we get less than a 5% error in the calculated value of certain fractal dimensions if we use a uniform sample of 200 or more distinct 2-D points. ("Distinct" means the 200 points all have to be different from one another.) In general, there is good reason to think that you will need at least around 2^(4*Fd) DISTINCT points, where Fd is the "true" fractal dimension of the underlying set. ("^" is a symbol for exponentiation and "*" is a symbol for multiplication.) Since you don't KNOW Fd (that's what the program is supposed to be telling you!) you can substitute your best guess as to an upper bound in the formula. Certainly the Fd of your data set is no more than the "embedding dimension", which is the number of coordinates each of your points has. You will most likely need more than what the formula calls for when Fd = 1 or less. In fact, I would recommend 200 as a minimum if you can possibly get that many points. That gives us the following numbers: Fd value minimal # of points 1 200 2 256 3 4,096 4 65,536 5 1,048,576ON EACH LINE OF THE INPUT FILE, EXCEPT THE FIRST, YOU SHOULDHAVE *ALL* THE COORDINATES OF *EXACTLY ONE* OF THE DATA POINTS.This is important because the program looks at the second lineof the input file to determine the embedding dimension. TheNUMBER OF NUMBERS ON THAT LINE is taken to be the dimension.------------------------------When fd3 executes, it will write it's output to the defaultoutput device (usually the screen in front of you). Ondifferent systems, different methods exist to "deflect" theoutput to a printer or file. In our environment, we use suchcommand lines as:fd3 can1K.1D > can1K-1D.repwhich has the effect of redirecting the output to a file called"can1K-1D.rep". We can then use the facilities of our system toview "can1K-1D.rep" or print a copy of it if we like.This program is relatively fast. (Basically O(NlogN), where Nis the size of the input file.) It will turnaround in secondsor less if you are inputting hundreds of numbers or a fewthousand. But don't expect instantaneous results if your inputfile contains tens of thousands of numbers.FD3 will tell you what it's doing while it's doing it. It willlet you know as it finishes each main phase of the job. Youmay not be interested in knowing this stuff most of the time,but it can be nicely reassuring when you are waiting for along-running analysis to complete. FD3 outputs a report of length about two pages. If you want,you can ignore everything but the last few lines. Assumingthat there were enough distinct points to satisfy FD3, you willsee overall estimates of the capacity, information, andcorrelation dimensions of the input set.If you understand how box-counting works, you can probablydecode the columns of output above the overall estimates, anduse them to learn some more about your input set. A discussionof that black art is beyond the scope of this document. Thereis however, a document called REPORT.INF included in thispackage that should serve to help with the basic interpretationof FD3 reports.This program should be considered a "beta-version", orpre-release. We cannot warrantee the program in any way. Noclaim is made concerning the quality of the program, or theaccuracy that you will get using it. We hope that you WILL useit to experiment, and to learn what you can. We certainly willnot be surprised if we learn that there are a few bugs in it.If you can identify any problems, we would be grateful to haveyour input./* BEGIN NOTICECopyright (c) 1992 by John Sarraille and Peter DiFalco(john@ishi.csustan.edu)Permission to use, copy, modify, and distribute this softwareand its documentation for any purpose and without fee is herebygranted, provided that the above copyright notice appear in allcopies and that both that copyright notice and this permissionnotice appear in supporting documentation.The algorithm used in this program was inspired by the paperentitled "A Fast Algorithm To Determine Fractal Dimensions ByBox Counting", which was written by Liebovitch and Toth, andwhich appeared in the journal "Physics Letters A", volume 141,pp 386-390, (1989).This program is not warranteed: use at your own risk.END NOTICE */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -