Skip to content

Library for reading and write sparse matrices and graphs.

License

Notifications You must be signed in to change notification settings

dlasalle/wildriver

Repository files navigation

WildRiver

Documentation Status

Library for reading and writing sparse matrices and graphs.

Full documentation of the API is available at https://wildriver.readthedocs.io.

Examples

How to read in a graph:

#include <wildriver.h>
#include <stdio.h>

int main(
    int argc,
    char ** argv)
{
  if (argc != 2) {
    printf("Need to specify a file name\n");
    return 1;
  }

  char const * const input_file = argv[1];

  uint32_t nvtxs;
  size_t * edgePrefix;
  uint32_t * edgeList;
  double * edgeWeight; 

  rv = wildriver_read_graph(input_file, &nvtxs, NULL, NULL, NULL, \
      &edgePrefix, &edgeList, NULL, &edgeWeight);

  printf("Read graph with %u vertices and %z edges.\n", nvtxs, \
      edgePrefix[nvtxs]);

  free(edgePrefix);
  free(edgeList);
  free(edgeWeight);

  return 0;
}

See the examples/ directory for more usage.

About

Library for reading and write sparse matrices and graphs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published