1 
2 #include <igraph.h>
3 
4 #include "test_utilities.inc"
5 
main()6 int main() {
7     igraph_t ug;
8     igraph_t dg;
9 
10     igraph_small(&ug, 6, /* directed= */ 0,
11                  2,0, 1,4, 3,2, 2,3, 0,4, 5,0, 2,3, 5,3, 2,5, 0,1,
12                  -1);
13 
14     igraph_copy(&dg, &ug);
15     printf("\nARBITRARY:\n");
16     igraph_to_directed(&dg, IGRAPH_TO_DIRECTED_ARBITRARY);
17     print_graph(&dg);
18     igraph_destroy(&dg);
19 
20     igraph_copy(&dg, &ug);
21     printf("\nMUTUAL:\n");
22     igraph_to_directed(&dg, IGRAPH_TO_DIRECTED_MUTUAL);
23     print_graph(&dg);
24     igraph_destroy(&dg);
25 
26     igraph_copy(&dg, &ug);
27     printf("\nACYCLIC:\n");
28     igraph_to_directed(&dg, IGRAPH_TO_DIRECTED_ACYCLIC);
29     print_graph(&dg);
30     igraph_destroy(&dg);
31 
32     igraph_copy(&dg, &ug);
33     printf("\nRANDOM (edge count only):\n");
34     igraph_to_directed(&dg, IGRAPH_TO_DIRECTED_RANDOM);
35     printf("%" IGRAPH_PRId "\n", igraph_ecount(&dg));
36     igraph_destroy(&dg);
37 
38     igraph_destroy(&ug);
39 
40     VERIFY_FINALLY_STACK();
41 
42     return 0;
43 }
44