proj home

Files   Classes   Functions   Hierarchy  

main.cpp File Reference

#include <cassert>
#include <iostream>
#include <commandline.h>
#include <quickhull2Dtest.h>
#include <quickhull3Dtest.h>
#include <typedefs.h>
#include <zero.h>

Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 15 of file main.cpp.

References commandline::mapvar(), quickhull2Dtest::test03(), quickhull2Dtest::test04(), and quickhull2Dtest::test05().

00016 {
00017   commandline cmd(argc,argv);
00018   uint prog(0);
00019   cmd.mapvar(prog,"prog");
00020 
00021   switch (prog)
00022   {
00023     case 0:
00024 
00025       cout << "Generate 2D points and find and display the convex hull." << endl;
00026       cout << "  ./main prog=2 pointsfile=data.txt numPoints=300" << endl;
00027       cout << "Generates random 2D points in unit circle and writes them to a file." << endl;
00028       cout << "  ./main prog=4 pointsfile=data.txt numPoints=30" << endl;
00029 
00030       cout << "Calculate the Convex hull of a set of 2D points." << endl;
00031       cout << "  Read file of points, writes the hull indexes." << endl;
00032       cout << "  Optional randomize to guarantee O(nlogn) time complexity." << endl;
00033 
00034       cout << "  ./main prog=5 pointsfile=data.txt hullfile=hull.txt randomize" << endl;
00035 
00036       cout << "Display the convex hull and points by reading in the points and hull indexes." << endl;
00037       cout << "  ./main prog=6 pointsfile=data.txt hullfile=hull.txt" << endl;
00038       cout << "Quickhull 3D Algorithm (Experiment)" << endl;
00039       cout << "  ./main prog=11 n=40" << endl;
00040 
00041       break;
00042 
00043     case 2: quickhull2Dtest().test02(argc,argv); break;
00044     case 3: quickhull2Dtest::test03(); break;
00045     case 4: quickhull2Dtest::test04(argc,argv); break;
00046     case 5: quickhull2Dtest::test05(argc,argv); break;
00047     case 6: quickhull2Dtest().test06(argc,argv); break;
00048 
00049     case 11: quickhull3Dtest().test01(argc,argv); break;
00050     //case 12: quickhull3Dtest().test02(argc,argv); break;
00051 
00052     default: cout << "error:  No case handled." << endl; return 1;
00053   }
00054 
00055   return 0;
00056 }


Generated on Fri Mar 4 00:49:33 2011 for Chelton Evans Source by  doxygen 1.5.8