4
Copyright (C) 2009-2012 Gabor Csardi <csardi.gabor@gmail.com>
5
334 Harvard st, Cambridge MA, 02139 USA
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.
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.
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
30
const char *files[] = { "fullmatrix1.dl", "fullmatrix2.dl",
31
"fullmatrix3.dl", "fullmatrix4.dl",
32
"edgelist1.dl", "edgelist2.dl", "edgelist3.dl",
33
"edgelist4.dl", "edgelist5.dl", "edgelist6.dl",
34
"nodelist1.dl", "nodelist2.dl" };
35
int no_files=sizeof(files)/sizeof(const char*);
40
for (i=0; i<no_files; i++) {
41
printf("Doing %s\n", files[i]);
42
infile=fopen(files[i], "r");
44
printf("Cannot open file: %s\n", files[i]);
47
igraph_read_graph_dl(&g, infile, /*directed=*/ 1);
50
printf("Cannot close file: %s\n", files[i]);
53
igraph_write_graph_edgelist(&g, stdout);
57
if (IGRAPH_FINALLY_STACK_SIZE() != 0)