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);
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);
AbstractLinAlgPack::size_type size_type
void read_coo_into_valarrays(std::istream &istrm, size_type &m, size_type &n, size_type &nz, std::valarray< value_type > &a, std::valarray< indice_type > &ivect, std::valarray< indice_type > &jvect)
Read in a Coordinate Matrix from a C++ input stream and store it in valarrays.
const f_int f_dbl_prec const f_int const f_int const f_int jvect[]
const f_int f_dbl_prec a[]
const f_int f_dbl_prec const f_int const f_int ivect[]
AbstractLinAlgPack::value_type value_type