from
SparsePack
by Sebastiaan
Packs a sparse matrix into a single uint8 array, reducing memory usage.
|
| SparseUnPack.m |
% SparseUnPack - Unpacks an array of bytes, representing a packed sparse.
%
% Usage: C = SparseUnPack(B);
%
% B is a packed sparse type, of uint8
% C is a sparse matrix
% If B is a sparse matrix, B is returned without error.
%
% If B is stored as a format other than double, the values are converted
% double.
%
% Some sanity checing is done if the packed array can be unpacked on the
% current system, i.e. when unpacking an array on a 32 bit machine when
% the dimensions are larger than 2^32.
%
% This program only works on Little Endian machines!
%
% Compile with -D_DEBUG_ for some debugging information:
% mex -largeArrayDims SparsePack.c [-D_DEBUG_]
% mex -largeArrayDims SparseUnPack.c [-D_DEBUG_]
%
% (c) Sebastiaan Breedveld, 2009
%
%
|
|
Contact us at files@mathworks.com