Library for reading and write sparse matrices and graphs.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
examples
include
src
.gitignore
.travis.yml
CMakeLists.txt
LICENSE
README.md
VERSION
appveyor.yml
configure
doxygen.conf
packagecore.yaml

README.md

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.