//#  eulerN -- program for statistical estimation of Euler characteristic of a 3-dimensional body
//#  given as a sufficiently dense "volumetric" point sampling
//#
//#  Copyright (c) 2005-2007 Bradford Jones, Konstantin Rybnikov, Karen Daniels, Daniel Klain
//#  Release 2: 1 June 2007 
//#
//#  This program is free software; you can redistribute it and/or modify it
//#  under the terms of the GNU General Public License as published by the
//#  Free Software Foundation; either version 2, or (at your option) any
//#  later version: http://www.gnu.org/licenses/gpl.txt.
//#
//#  This program is distributed in the hope that it will be useful,
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#  GNU General Public License for more details.
//#-----------------------------------------------------------------------------
// The program eulerN estimates the Euler characteristic of a 3-dimensional bounded body
// The body is represented by a sufficiently dense point sampling. 
// This point sampling is the input to the algorithm.
// The point sampling, also referred to in the code as point cloud, is listed in an ASCII file
// Each line of this ASCII file represents a point; it contains three numbers, separated by empty spaces.
// These numbers are the x, y, and z coordinates of the point
//
// We provide two sample data files. They are
// 1) threetunnels.txt  
// 2) cube125bubbles.txt
// The former contains a uniform sampling from a cube in which three straight cylindrical tunnels have been 
// drilled. Each of the tunnels contains the origin and their common intersection (as sets)
// is  a topological ball. The correct Euler characteristic is -4
// The latter contains a lattice sampling from a cube with 125 spherical (ball-like) holes.  
// The correct Euler characteristic is 126
//
// Assuming you have added the directory where eulerN is located to your PATH variable, 
// the program can  be run by typing "eulerN input_script", 
// where input_script is a file specifying the experiments that you want to run.
// The name of the argument need not be input_script, if it is specified on the command line.
// 
// Alternatively, you can omit input_script from the command line.
// In this case eulerN will look for the file named  test_configuration.cfg , which is the DEFAULT SCRIPT FILE.
// 
// A sample test_configuration.cfg is provided.
//
// To create an input script file, which is recognizable by eulerN, 
// you must use the following syntax within your input_script:
//	
// 1) every test must be enclosed by START and END, just like in the example below.
// 
// 2) There are 15 parameters: 
// filename, 
// stripwidth, 
// overlap2d, 
// overlap3d, 
// numdirections2d,
// numdirections3d, 
// d2algorithm, 
// 2dcustomdir, 
// 3dcustomdir, 
// T, 
// tau, 
// timealgorithm, 
// factor, 
// lambda, 
// and hard_approach. 
//
// Each of these commands works exactly as explained in the provided test_configuration.cfg .
//  
// 3) test_configuration may contain many individual tests.
//
// 4) All 15 commands do not have to be defined for each test. During the execution, eulerN will read a file
//    named default_parameters.cfg which will contain values for all of the commands 
//    EXCEPT filename and stripwidth.
//
//    Thus, stripwidth and filename are the only two commands that MUST be defined for each test. 
//    During each individual test, all of the parameters, except for those specified in the test, get reset to 
//    their default values, specified in default_parameters.cfg . Upon completion of the program  the file 
//    default_parameters.cfg is reverted to its original form. 
// 
// 5) Comments may be used at the beginning of a line. If this file is commented properly, it can be used as the // argument to for eulerN. You may run it with the command:  eulerN readme.txt
// 
// 6) The results of your tests will be printed to the console window and logged to testresults.txt
// 
// 7) Define stripwidth as follows: stripwidth (w1 w2 w3) where w1 is the width for 1D subroutines, 
//    w2 is the width for  2D subroutines, and w3 is the width for  3D subroutines.
//
// N.B. This file was prepared on a Linux computer, so make sure that all the lines are properly commented 
// if you are using  a different operating system




// test 1
START
	filename threetunnels.txt
	stripwidth (.4 .45 .5)
	
	numdirections2d 1
	numdirections3d 30
	d2algorithm 1

	T 4000000000
	tau 0

	hard_approach 1
END


// test 2
START

	filename threetunnels.txt
	d2algorithm 2
	numdirections2d 1
	numdirections3d 30
	stripwidth (.4 .45 .5)

END


// test 3
START
	filename threetunnels.txt
	stripwidth .5
	
	numdirections2d 1
	numdirections3d 30
	d2algorithm 1

	T 4000000000
	tau 0

	hard_approach 1
END


// test 4
START

	filename threetunnels.txt
	d2algorithm 2
	numdirections2d 1
	numdirections3d 30
	stripwidth .5
END


