1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include <igraph.h>
- #include "io.h"
- // From examples in igraph documentation.
- void print_vector(igraph_vector_t *v, FILE *f) {
- long int i;
- for (i=0; i<igraph_vector_size(v); i++) {
- fprintf(f, " %li", (long int) VECTOR(*v)[i]);
- }
- fprintf(f, "\n");
- }
- void print_graphml(igraph_t *g) {
- igraph_write_graph_graphml(g, ost);
- }
- void print_gml(igraph_t *g) {
- igraph_write_graph_gml(g, ost, 0, 0);
- }
- void print_pajek(igraph_t *g) {
- igraph_write_graph_pajek(g, ost);
- }
- void print_edgelist(igraph_t *g) {
- igraph_write_graph_edgelist(g, ost);
- }
- void print_ncol(igraph_t *g) {
- igraph_write_graph_ncol(g, ost, 0, 0);
- }
- void print_lgl(igraph_t *g) {
- igraph_write_graph_lgl(g, ost, 0, 0, 1);
- }
- void print_dot(igraph_t *g) {
- igraph_write_graph_dot(g, ost);
- }
- void print_error(igraph_t *g) {
- fprintf(ost, "Invalid output format specified.\n");
- }
|