Interface to Test Collections

Before downloading test matrices, it is recommended to first update the database:

julia> MatrixDepot.update()

Interface to the UF Sparse Matrix Collection

Use matrixdepot(NAME, :get), where NAME is collection name +'/' + matrix name, to download a test matrix from the UF Sparse Matrix Collection. For example:

julia> matrixdepot("SNAP/web-Google", :get)

Note

matrixdepot() displays all the matrices in the collection, including the newly downloaded matrices. All the matrix data can be found by matrixdepot("data").

If the matrix name is unique in the collections, we could use matrixdepot(matrix name, :get) to download the data. If more than one matrix has the same name, a list of options will be returned. For example:

julia> matrixdepot("epb0", :get)
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100 83244  100 83244    0     0   109k      0 --:--:-- --:--:-- --:--:--  133k
download:/home/weijian/.julia/v0.4/MatrixDepot/data/uf/Averous/epb0.tar.gz
epb0/epb0.mtx

julia> matrixdepot("1138_bus", :get)
Try MatrixDepot.get(`name`), where `name` is one of the elements in the following Array:
2-element Array{AbstractString,1}:
"HB/1138_bus"
"Harwell-Boeing/psadmit/1138_bus"

When download is complete, we can check matrix information using:

julia> matrixdepot("SNAP/web-Google")

%%MatrixMarket matrix coordinate pattern general
%-------------------------------------------------------------------------------
% UF Sparse Matrix Collection, Tim Davis
% http://www.cise.ufl.edu/research/sparse/matrices/SNAP/web-Google
% name: SNAP/web-Google
% [Web graph from Google]
% id: 2301
% date: 2002
% author: Google
% ed: J. Leskovec
% fields: name title A id date author ed kind notes
% kind: directed graph
%-------------------------------------------------------------------------------
...

and generate it with the Symbol :r or :read

julia> matrixdepot("SNAP/web-Google", :r)
916428x916428 sparse matrix with 5105039 Float64 entries:
      [11343 ,      1]  =  1.0
      [11928 ,      1]  =  1.0
      [15902 ,      1]  =  1.0
      [29547 ,      1]  =  1.0
      [30282 ,      1]  =  1.0
      [31301 ,      1]  =  1.0
      [38717 ,      1]  =  1.0
      [43930 ,      1]  =  1.0
      [46275 ,      1]  =  1.0
      [48193 ,      1]  =  1.0
      [50823 ,      1]  =  1.0
      [56911 ,      1]  =  1.0
      [62930 ,      1]  =  1.0
      [68315 ,      1]  =  1.0
      [71879 ,      1]  =  1.0
      [72433 ,      1]  =  1.0
      [73632 ,      1]  =  1.0
      ⋮
      [532967, 916427]  =  1.0
      [547586, 916427]  =  1.0
      [557890, 916427]  =  1.0
      [571471, 916427]  =  1.0
      [580544, 916427]  =  1.0
      [608625, 916427]  =  1.0
      [618730, 916427]  =  1.0
      [622998, 916427]  =  1.0
      [673046, 916427]  =  1.0
      [716616, 916427]  =  1.0
      [720325, 916427]  =  1.0
      [772226, 916427]  =  1.0
      [785097, 916427]  =  1.0
      [788476, 916427]  =  1.0
      [822938, 916427]  =  1.0
      [833616, 916427]  =  1.0
      [417498, 916428]  =  1.0
      [843845, 916428]  =  1.0

Interface to NIST Matrix Market

Use matrixdepot(NAME, :get), where NAME is collection name + '/' + set name + '/' + matrix name to download a test matrix from NIST Matrix Market: http://math.nist.gov/MatrixMarket/. For example:

julia> matrixdepot("Harwell-Boeing/lanpro/nos5", :get)

If the matrix name is unique, we could also use matrixdepot(matrix name, :get):

julia> matrixdepot("bp__1400", :get)
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed
100 28192  100 28192    0     0   4665      0  0:00:06  0:00:06 --:--:-- 10004
download:/home/weijian/.julia/v0.4/MatrixDepot/data/mm/Harwell-Boeing/smtape/bp__1400.mtx.gz

Checking matrix information and generating matrix data are similar to the above case:

julia> matrixdepot("Harwell-Boeing/smtape/bp__1400")

%%MatrixMarket matrix coordinate real general

use matrixdepot("Harwell-Boeing/smtape/bp__1400", :read) to read the data

julia> matrixdepot("Harwell-Boeing/smtape/bp__1400", :read)
822x822 sparse matrix with 4790 Float64 entries:
      [1  ,   1]  =  1.0
      [1  ,   2]  =  0.001
      [26 ,   2]  =  -1.0
      [1  ,   3]  =  0.6885
      [25 ,   3]  =  0.9542
      [692,   3]  =  1.0
      [718,   3]  =  5.58
      ⋮
      [202, 820]  =  -1.0
      [776, 820]  =  1.0
      [1  , 821]  =  0.4622
      [25 , 821]  =  0.725
      [28 , 821]  =  1.0
      [202, 821]  =  -1.0
      [796, 821]  =  1.0
      [2  , 822]  =  1.0