input.c 917 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <igraph.h>
  2. #include "io.h"
  3. void read_graphml(igraph_t *g, FILE *ist) {
  4. igraph_read_graph_graphml(g, ist, 0);
  5. }
  6. void read_gml(igraph_t *g, FILE *ist) {
  7. igraph_read_graph_gml(g, ist);
  8. }
  9. void read_pajek(igraph_t *g, FILE *ist) {
  10. igraph_read_graph_pajek(g, ist);
  11. }
  12. void read_edgelist(igraph_t *g, FILE *ist) {
  13. igraph_read_graph_edgelist(g, ist, 0, 0);
  14. }
  15. void read_ncol(igraph_t *g, FILE *ist) {
  16. igraph_read_graph_ncol(g, ist, NULL, 0, IGRAPH_ADD_WEIGHTS_IF_PRESENT, IGRAPH_UNDIRECTED);
  17. }
  18. void read_lgl(igraph_t *g, FILE *ist) {
  19. igraph_read_graph_lgl(g, ist, 0, IGRAPH_ADD_WEIGHTS_IF_PRESENT, IGRAPH_UNDIRECTED);
  20. }
  21. void read_dl(igraph_t *g, FILE *ist) {
  22. igraph_read_graph_dl(g, ist, 0);
  23. }
  24. void read_graphdb(igraph_t *g, FILE *ist) {
  25. igraph_read_graph_graphdb(g, ist, 0);
  26. }
  27. void read_error(igraph_t *g, FILE *ist) {
  28. fprintf(ost, "Invalid input format specified.\n");
  29. }