Subset of the University of Florida sparse matrix collection
This repository is a subset of the University of Florida sparse matrix collection.
Each file in this repository has the following format:
// it can be consumed as common js module:moduleexports ="recordsPerEdge": 3"links":"description: ""};
links is a flat array of all links (edges) in the graph. Each link is represented by two or three numbers:
toId and optionally associated
recordsPerEdge is 3);
This example shows how to transform a matrix into a graph:
// This collection is huge. Import concrete graph only// to reduce amount of browserified package:var mtxObject = require'ngraph.sparse-collection/HB/plat1919'mtxParser = require'ngraph.serialization/mtx'graph = mtxParserloadFromObjectmtxObject;// now you can use graph for analysis:console.loggraphgetLinksCount;
This collection was generated from public data set of University of Florida Sparse Matrix Collection. I've mounted image to ec2 host, and then with help of this 100 lines of code converted small subset of
LPnetlib folders into CommonJS module.
Conversion itself is done with mtx parser. To save space this parser does not save loops (edges which start and end at the same vertex). Please let me know if it's a deal breaker - I'll make sure to fix this.
- T. A. Davis, The University of Florida Sparse Matrix Collection, ACM Transactions on Mathematical Software (submitted, 2009), also available as a tech report at http://www.cise.ufl.edu/~davis/techreports/matrices.pdf
- I. S. Duff, R. G. Grimes, and J. G. Lewis, Sparse Matrix Test Problems, ACM Transactions on Mathematical Software, vol. 15, no. 1. pp. 1-14, 1989, http://doi.acm.org/10.1145/62038.62043