function UFlists %UFlists: create the web pages for each matrix list (group, name, etc.) % Places the web pages in the matrices/ subdirectory of the current directory. % % Example: % UFlists % % See also UFget, UFlist % Copyright 2006, Timothy A. Davis % create all the web pages for the lists UFlist ('group') ; UFlist ('name') ; UFlist ('id') ; UFlist ('dimension') ; UFlist ('nnz') ; UFlist ('symmetry') ; UFlist ('type') ; % do all the group pages, and the list of groups index = UFget ; nmat = length (index.nrows) ; [ignore, i] = sort (index.Group) ; g = index.Group (i) ; % create the primary directory [url topdir] = UFlocation ; matrices = [topdir 'matrices'] ; if (~exist (matrices, 'dir')) mkdir (matrices) ; end % create the groups.html file f = fopen ([matrices filesep 'groups.html'], 'w') ; if (f < 0) error ('unable to create groups.html file\n') ; end % add the header fprintf (f, ... '\n') ; fprintf (f, '\n') ; fprintf (f, 'UF Sparse Matrix Collection: group list') ; fprintf (f, '\n') ; fprintf (f, '\n') ; fprintf (f, '
  • UF Sparse Matrix Collection\n') ; fprintf (f, '

    List of matrix groups in the UF Sparse Matrix Collection:\n') ; fprintf (f, '

    \n') ; fprintf (f, '\n') ; fprintf (f, '\n') ; fprintf (f, '\n') ; fprintf (f, '\n') ; % find all the groups group = '' ; ngroup = 0 ; for i = 1:nmat if (strcmp (group, g {i})) continue end group = g {i} ; ngroup = ngroup + 1 ; groups {ngroup} = group ; %#ok end nmat = 0 ; for i = 1:ngroup group = groups {i} ; UFlist ('group', group) ; fprintf (f, '\n') ; % link to group fprintf (f, '\n', group, group) ; % number of matrices d = dir ([topdir 'mat' filesep group filesep '*.mat']) ; nmat_group = size (d,1) ; fprintf (f, '\n', nmat_group) ; nmat = nmat + nmat_group ; % link to README.txt file ("details") f2 = fopen ([topdir filesep 'mat' filesep group filesep 'README.txt'], 'r'); if (f2 < 0) error (['no README file for group: ' group]) ; else s = fgets (f2) ; fprintf (f, ... '\n', group) ; end % one-line description (first line of README.txt) fprintf (f, '\n', s) ; fclose (f2); fprintf (f, '\n') ; end fprintf (f, '
    Group# matricesdetailsdescription
    %s%ddetails%s
    \n') ; fprintf (f, '

    Total number of matrices in UF Sparse Matrix Collection:') ; fprintf (f, ' %d\n', nmat) ; fprintf (f, '

    Maintained by '); fprintf (f, 'Tim Davis, last updated %s.', date) ; fprintf (f, '
    Matrix pictures by cspy, a MATLAB', ... url) ; fprintf (f, ' function in the CSparse package.\n', ... url) ; fprintf (f, '\n') ; fprintf (f, '\n') ; fclose (f) ;