Diploma Thesis Percolation Simulation
C++ Sourcecode Documentation

www.AndreasKrueger.de/thesis/code

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

configuration.h

Go to the documentation of this file.
00001 // configuration.h
00002 //
00003 // define's and include's                         
00004 // for the clustercounter programs
00005 // (C) 2000, 2001, 2002 Andreas Krueger (percolation__at__AndreasKrueger__dot__de)
00006 // last change: 16.3.2002
00007 
00008 #define COORDFLOAT float                        // for cordinates
00009 #define REAL double                                     // for radius, fillingfactor, etc.
00010 #define NUMBER long                                     // for the number of clusters, etc. ! -1 must be allowed !
00011 #define COUNTER int                                     // for the number of dividings, etc.
00012 #define LONGBITS unsigned long          // for spanningcl-in-direction-x BITS
00013 
00014 // turn off warning about symbols too long for debugger
00015 #pragma warning (disable : 4786)
00016 
00017 #include <math.h>                       // for pow & sqrt
00018 #include "constants.h"          // the critical fillingfactor and the optimal cuts for the algo
00019 
00020 const COORDFLOAT GRIDSIZE = (COORDFLOAT)1;                      // length of "cube" / "square"
00021                                                                                                         // TODO: check all COORDFLOATs for * 1/GRIDSIZE
00022                                                                                                         //       (probably only necessary in visualization)
00023                                                                                                         //       (until then: GRIDSIZE=1 !)
00024 
00025 char version[]="v8.71";
00026 
00027 #ifdef _MSC_VER
00028 char FILEHEAD[]="c:\\results\\count";                                           // filename header for filebased-version
00029 char FILEHEAD1[]="c:\\results\\";                                                  // filename header 1 for into_file6
00030 char FILEHEAD2[]="c:\\results\\";                                                  // filename header 2 for into_file6 (local version)
00031 char FILENAME1[]="c:\\results\\unitsphere.txt";                 // filename for unitsphere-table
00032 char FILENAME2[]="c:\\results\\max_ff.txt";                     // filename for maxff-table
00033 #else
00034 char FILEHEAD[]="results/count";                                                // filename header for filebased-version
00035 char FILEHEAD1[]="results/";                                               // filename header 1 for into_file6
00036 char FILEHEAD2[]="results/";                                               // filename header 2 for into_file6 (local version)
00037 char FILENAME1[]="results/unitsphere.txt";                      // filename for unitsphere-table
00038 char FILENAME2[]="results/max_ff.txt";                  // filename for maxff-table
00039 #endif
00040 
00041 
00042 REAL FILE_FROM=0.85;                            // lower fillingfactor limit
00043 REAL FILE_TO=1.5;                                       // upper fillingfactor limit
00044 
00045 // exit errornumbers
00046 #define EXIT_OUTOFMEMORY 1
00047 
00048 // random seeds
00049 const int SEED4 = 4;                    // sets the random generator to a common seed (=same numbers)
00050 const int SEED5 = 50;
00051 const int SEED6 = 42;
00052 const int SEED7 = 137;
00053 
00054 #include <sys/timeb.h>  // for milliseconds
00055 #include <iomanip>              // for setw() and setprecision
00056 #include <stdlib.h>             // for rand()
00057 #include <iostream>             // for cout
00058 #include <time.h>               // for time()
00059 #include <stdio.h>              // for printf()
00060 #include <string>               // for strcat, strcpy (filename)
00061 #include <float.h>              // for DBL_MAX
00062 
00063 #include <list>
00064 #include <vector>
00065 #include <set>
00066 
00067 typedef std::list<NUMBER> NUMLIST;
00068 
00069 
00070 using std::ostream;
00071 using std::istream;
00072 using std::cout;
00073 using std::cerr;
00074 using std::cin;
00075 using std::setw;
00076 using std::setprecision;
00077 using std::endl;
00078 using std::flush;
00079 using std::string;
00080 using std::swap;
00081 
00082 
00083 #include "little_helpers.h"             // waitanykey(), etc.
00084 #include "my_vector.h"
00085 #include "sphere.h"
00086 
00087 #include "cellcount.h"
00088 #include "cluster.h"
00089 #include "analyze.h"
00090 #include "quicksort.h"
00091 #include "boxing.h"
00092 #include "divide_and_conquer.h"
00093 
00094 #include "measure.h"
00095 #include "statistics.h"
00096 #include "statistics_old.h"
00097 
00098 #include "results.h"
00099 #include "datafiles.h"
00100 
00101 #include "counters.h"
00102 #include "ff.h"
00103 
00104 #include "svg.h"
00105 
00106 
00107 // this is for Win32 GUI version only
00108 clock_t pause_milliseconds=5000;
00109 clock_t drawpause_milliseconds=1;
00110 REAL distance_effect=0.5;    // distanceeffectfor closer spheres 0.3 ~ [0.7 .... 1] * radius and (x,y)-coord
00111 // end of Win32 configuration
00112 
00113 




Diploma Thesis Sourcecode Documentation
check out the text and the executable binaries

www.AndreasKrueger.de/thesis/code