mirror of https://github.com/CGAL/cgal
Remove cmp file for theta_io example in Cone_spanners_2 package.
This commit is contained in:
parent
a00a539259
commit
8296ba7efd
|
|
@ -1 +0,0 @@
|
|||
4 data/n9.cin
|
||||
|
|
@ -26,26 +26,37 @@ typedef boost::adjacency_list<boost::listS,
|
|||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
if (argc < 3) {
|
||||
unsigned int k=4; // By default, no. of cones==4
|
||||
std::string filename="data/n9.cin"; // file used by default
|
||||
|
||||
if (argc > 1 &&
|
||||
(!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help") || !strcmp(argv[1],"-?")))
|
||||
{
|
||||
std::cout << "Usage: " << argv[0] << " <no. of cones> <input filename> [<direction-x> <direction-y>]" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
unsigned int k = atoi(argv[1]);
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones should be larger than 1!" << std::endl;
|
||||
return 1;
|
||||
if (argc > 1)
|
||||
{
|
||||
k = atoi(argv[1]);
|
||||
if (k<2) {
|
||||
std::cout << "The number of cones should be larger than 1!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 2)
|
||||
{ filename=std::string(argv[2]); }
|
||||
|
||||
// open the file containing the vertex list
|
||||
std::ifstream inf(argv[2]);
|
||||
std::ifstream inf(filename);
|
||||
if (!inf) {
|
||||
std::cout << "Cannot open file " << argv[2] << "!" << std::endl;
|
||||
std::cout << "Cannot open file " << filename << "!" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Direction_2 initial_direction;
|
||||
if (argc == 3)
|
||||
if (argc == 1 || argc == 3)
|
||||
initial_direction = Direction_2(1, 0); // default initial_direction
|
||||
else if (argc == 5)
|
||||
initial_direction = Direction_2(atof(argv[3]), atof(argv[4]));
|
||||
|
|
|
|||
Loading…
Reference in New Issue