Mercurial > octave
comparison src/ov-cell.cc @ 6276:d26c558691cd
[project @ 2007-02-07 09:01:24 by jwe]
author | jwe |
---|---|
date | Wed, 07 Feb 2007 09:01:24 +0000 |
parents | b64fb24bf4a0 |
children | 2aad75fcc93a |
comparison
equal
deleted
inserted
replaced
6275:6e5835ef21f8 | 6276:d26c558691cd |
---|---|
773 H5Sclose (space_hid); | 773 H5Sclose (space_hid); |
774 H5Gclose (data_hid); | 774 H5Gclose (data_hid); |
775 return false; | 775 return false; |
776 } | 776 } |
777 | 777 |
778 if (! H5Dwrite (size_hid, H5T_NATIVE_IDX, H5S_ALL, H5S_ALL, | 778 if (H5Dwrite (size_hid, H5T_NATIVE_IDX, H5S_ALL, H5S_ALL, |
779 H5P_DEFAULT, hdims) < 0) | 779 H5P_DEFAULT, hdims) < 0) |
780 { | 780 { |
781 H5Dclose (size_hid); | 781 H5Dclose (size_hid); |
782 H5Sclose (space_hid); | 782 H5Sclose (space_hid); |
783 H5Gclose (data_hid); | 783 H5Gclose (data_hid); |
784 return false; | 784 return false; |
794 octave_idx_type nel = dv.numel (); | 794 octave_idx_type nel = dv.numel (); |
795 | 795 |
796 for (octave_idx_type i = 0; i < nel; i++) | 796 for (octave_idx_type i = 0; i < nel; i++) |
797 { | 797 { |
798 std::ostringstream buf; | 798 std::ostringstream buf; |
799 int digits = static_cast<int> (floor (log10 (nel) + 1.0)); | 799 int digits = static_cast<int> (floor (log10 (static_cast<double> (nel)) + 1.0)); |
800 buf << "_" << std::setw (digits) << std::setfill ('0') << i; | 800 buf << "_" << std::setw (digits) << std::setfill ('0') << i; |
801 std::string s = buf.str (); | 801 std::string s = buf.str (); |
802 | 802 |
803 if (! add_hdf5_data (data_hid, tmp.elem (i), s.c_str (), "", false, | 803 if (! add_hdf5_data (data_hid, tmp.elem (i), s.c_str (), "", false, |
804 save_as_floats)) | 804 save_as_floats)) |