1 /* -*- mode: C -*-  */
2 /*
3    IGraph library.
4    Copyright (C) 2006-2012  Gabor Csardi <csardi.gabor@gmail.com>
5    334 Harvard st, Cambridge MA, 02139 USA
6 
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc.,  51 Franklin Street, Fifth Floor, Boston, MA
20    02110-1301 USA
21 
22 */
23 
24 #include <igraph.h>
25 #include "test_utilities.inc"
26 
main()27 int main() {
28     igraph_t g;
29     igraph_integer_t n_vertices = 10;
30 
31     printf("Null graph\n");
32     igraph_full(&g, 0, IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS);
33     print_graph_canon(&g);
34     igraph_destroy(&g);
35 
36     printf("Singleton graph, no loops\n");
37     igraph_full(&g, 1, IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS);
38     print_graph_canon(&g);
39     igraph_destroy(&g);
40 
41     printf("Singleton graph, loops\n");
42     igraph_full(&g, 1, IGRAPH_UNDIRECTED, IGRAPH_LOOPS);
43     print_graph_canon(&g);
44     igraph_destroy(&g);
45 
46     printf("Undirected, no loops\n");
47     igraph_full(&g, n_vertices, IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS);
48     print_graph_canon(&g);
49     igraph_destroy(&g);
50 
51     printf("Directed, no loops\n");
52     igraph_full(&g, n_vertices, IGRAPH_DIRECTED, IGRAPH_NO_LOOPS);
53     print_graph_canon(&g);
54     igraph_destroy(&g);
55 
56     printf("Undirected, with loops\n");
57     igraph_full(&g, n_vertices, IGRAPH_UNDIRECTED, IGRAPH_LOOPS);
58     print_graph_canon(&g);
59     igraph_destroy(&g);
60 
61     printf("Directed, with loops\n");
62     igraph_full(&g, n_vertices, IGRAPH_DIRECTED, IGRAPH_LOOPS);
63     print_graph_canon(&g);
64     igraph_destroy(&g);
65 
66     VERIFY_FINALLY_STACK();
67     return 0;
68 }
69