1 // gentest.cc
2
3 // a program that generates some test data
4
5
6 #ifndef GEN_TEST_CC
7 #define GEN_TEST_CC
8
9 #include "testdata.h"
10
main(void)11 int main(void)
12 {
13 ofstream output1("IP/testmatrix1");
14 random_matrix(3,4,0,5,output1);
15 ofstream output2("IP/testmatrix2");
16 random_matrix(4,6,0,5,output2);
17 ofstream output3("IP/testmatrix3");
18 random_matrix(3,4,-5,5,output3);
19 ofstream output4("IP/testmatrix4");
20 random_matrix(5,8,0,1,output4);
21 ofstream output5("IP/testmatrix5");
22 transportation_problem(3,4,5,output5);
23 ofstream output6("IP/testmatrix6");
24 transportation_problem(3,5,5,output6);
25
26 ofstream output1a("IP/testproblem1a");
27 random_problems(3,5,-5,5,output1a);
28 ofstream output1b("IP/testproblem1b");
29 random_problems(3,5,0,5,output1b);
30 ofstream output1c("IP/testproblem1c");
31 random_problems(4,5,0,5,output1c);
32
33 ofstream output2a("IP/testproblem2a");
34 random_problems(4,5,-5,5,output2a);
35 ofstream output2b("IP/testproblem2b");
36 random_problems(4,5,0,5,output2b);
37 ofstream output2c("IP/testproblem2c");
38 random_problems(6,5,0,5,output2c);
39
40 ofstream output3a("IP/testproblem3a");
41 random_problems(3,5,-5,5,output3a);
42 ofstream output3b("IP/testproblem3b");
43 random_problems(3,5,0,5,output3b);
44 ofstream output3c("IP/testproblem3c");
45 random_problems(4,5,0,5,output3c);
46
47 ofstream output4a("IP/testproblem4a");
48 random_problems(5,5,-5,5,output4a);
49 ofstream output4b("IP/testproblem4b");
50 random_problems(5,5,0,5,output4b);
51 ofstream output4c("IP/testproblem4c");
52 random_problems(8,5,0,5,output4c);
53
54 ofstream output5a("IP/testproblem5a");
55 random_problems(3+4,5,-5,5,output5a);
56 ofstream output5b("IP/testproblem5b");
57 random_problems(3+4,5,0,5,output5b);
58 ofstream output5c("IP/testproblem5c");
59 random_problems(3*4,5,0,5,output5c);
60
61 ofstream output6a("IP/testproblem6a");
62 random_problems(3+5,5,-5,5,output6a);
63 ofstream output6b("IP/testproblem6b");
64 random_problems(3+5,5,0,5,output6b);
65 ofstream output6c("IP/testproblem6c");
66 random_problems(3*5,5,0,5,output6c);
67 return 0;
68 }
69 #endif
70