46 #include "AbstractLinAlgPack_SparseCOOReadMatrix.hpp"
50 inline void assert_sep_char(
char c) {
54 inline void assert_eof(std::istream& istrm) {
61 , std::valarray<value_type>& a, std::valarray<indice_type>& ivect
62 , std::valarray<indice_type>& jvect)
65 istrm >> m; assert_eof(istrm);
66 istrm >> n; assert_eof(istrm);
73 value_type *p_a = &a[0],
75 indice_type *p_ivect = &ivect[0],
78 for(; p_a != p_a_last; ++p_a, ++p_ivect, ++p_jvect) {
83 istrm.get(num, bs-1,
':'); assert_eof(istrm); *p_a = ::atof(num);
84 istrm.get(c); assert_eof(istrm); assert_sep_char(c);
85 istrm.get(num, bs-1,
':'); assert_eof(istrm); *p_ivect = ::atoi(num);
86 istrm.get(c); assert_eof(istrm); assert_sep_char(c);