[mlpack-svn] [MLPACK] #159: save() and load() for SpMat
MLPACK Trac
trac at coffeetalk-1.cc.gatech.edu
Mon Jan 23 15:00:36 EST 2012
#159: save() and load() for SpMat
---------------------------------------------+------------------------------
Reporter: rcurtin | Owner: mamidon
Type: enhancement | Status: accepted
Priority: major | Milestone:
Component: armadillo sparse | Resolution:
Keywords: sparse matrix save format load | Blocking:
Blocked By: |
---------------------------------------------+------------------------------
Comment (by rcurtin):
I'm curious about a change in save_pgm_binary(). PGM is a dense format,
so we end up writing even the zeros out into a non-sparse format.
However, when we actually write the data, we do this
(diskio_meat.hpp:2251):
{{{
f.write(reinterpret_cast<const char*>(tmp.mem),
std::streamsize(x.n_rows*x.n_cols) );
f.write( reinterpret_cast<const char*>(x.row_indices),
std::streamsize(x.n_nonzero*sizeof(uword)) );
f.write( reinterpret_cast<const char*>(x.col_ptrs),
std::streamsize((x.n_cols+1)*sizeof(uword)) );
}}}
Shouldn't the column pointers and row indices be ignored since we're
saving it densely?
--
Ticket URL: <http://trac.research.cc.gatech.edu/fastlab/ticket/159#comment:5>
MLPACK <www.fast-lab.org>
MLPACK is an intuitive, fast, and scalable C++ machine learning library developed by the FASTLAB at Georgia Tech under Dr. Alex Gray.
More information about the mlpack-svn
mailing list