Debian Codegraph @

src/cxx/test_applications/test_PhyloDAG/test_PhyloDAG.cc

raw symbols SCIP
1 #include "PhyloDag_tmp.hh"
2
3 #include "AnError.hh"
4 #include <boost/graph/adjacency_list.hpp>
5 #include <iostream>
6
7
8 void usage(char* cmd);
9
10 int
11 main (int argc, char **argv)
12 {
13 using namespace beep;
14 using namespace std;
15
16 if (argc != 1)
17 {
18 usage(argv[0]);
19 }
20
21 try
22 {
23 PhyloDAG_AL T;
24 T.setName("Kalle");
25 T.addVertex(7);
26 T.addVertex(6);
27 T.addVertex(5);
28 T.addVertex(4);
29 T.addVertex(3);
30 cerr << "PhyloDAG " << T.getName() << " has " << T.getNVertices() << " vertices and " << T.getNEdges() << " edges. " << endl;
31
32 cerr << T << endl;
33
34 cerr << endl << T.getVertex(7) << endl;
35 }
36 catch(AnError e)
37 {
38 cout <<" error\n";
39 e.action();
40 }
41 catch(exception e)
42 {
43 cout <<" error\n"
44 << e.what();
45 }
46 }
47
48
49 void
50 usage(char *cmd)
51 {
52 using std::cerr;
53 cerr << "Usage: "
54 << cmd
55 ;
56 exit(0);
57 }
58