| 645 | |
| 646 | |
| 647 | int Elim_Conti_Traverso(INPUT_FILE MATRIX, |
| 648 | const int& version, |
| 649 | const int& S_pair_criteria, |
| 650 | const float& interred_percentage, |
| 651 | const BOOLEAN& verbose) |
| 652 | { |
| 653 | |
| 654 | |
| 655 | /////////////////////////// input ///////////////////////////////////////// |
| 656 | |
| 657 | char format_string[128]; // to verify file format |
| 658 | int constraints; // number of equality constraints |
| 659 | int variables; // number of variables (without auxiliary variables) |
| 660 | |
| 661 | ifstream input(MATRIX); |
| 662 | |
| 663 | // verfifie existence of file |
| 664 | |
| 665 | if(!input) |
| 666 | { |
| 667 | cerr<<"ERROR: int Elim_Conti_Traverso(INPUT_FILE, const BOOLEAN&):\n" |
| 668 | "cannot read from input file, possibly not found"<<endl; |
| 669 | return 0; |
| 670 | } |
| 671 | |
| 672 | // read format specification |
| 673 | |
| 674 | input>>format_string; |
| 675 | |
| 676 | if(!input) |
| 677 | { |
| 678 | cerr<<"ERROR: int Elim_Conti_Traverso(INPUT_FILE, const BOOLEAN&):\n" |
| 679 | "input failure when reading format specification,\n" |
| 680 | "input format not accepted"<<endl; |
| 681 | return 0; |
| 682 | } |
| 683 | |
| 684 | if(strcmp(format_string,"MATRIX")) |
| 685 | cerr<<"Warning: int Elim_Conti_Traverso(INPUT_FILE, const BOOLEAN&):\n" |
| 686 | "input file has suspicious format"<<endl; |
| 687 | |
| 688 | // read number of variables |
| 689 | |
| 690 | input>>format_string; |
| 691 | |
| 692 | if(!input) |
| 693 | { |
| 694 | cerr<<"ERROR: int Elim_Conti_Traverso(INPUT_FILE, const BOOLEAN&):\n" |
| 695 | "input failure before reading number of variables / matrix columns,\n" |
| 696 | "input format not accepted"<<endl; |
| 697 | return 0; |
| 698 | } |
| 699 | |
| 700 | if(strcmp(format_string,"columns:")) |
| 701 | cerr<<"WARNING: int Elim_Conti_Traverso(INPUT_FILE, const BOOLEAN&):\n" |
| 702 | "input file has suspicious format"<<endl; |
| 703 | |
| 704 | input>>variables; |
no test coverage detected