const unsigned int i=0,
const unsigned int j=0);
+
+ /**
+ * Fill matrix with an array of numbers.
+ * The array is arranged line by line. No
+ * range checking is performed.
+ */
+ template<typename number2>
+ void fill (const number2* entries);
+
/**
* Set dimension to $m\times n$ and
* allocate memory if necessary. Forget
}
+template <typename number>
+template <typename number2>
+void FullMatrix<number>::fill (const number2* entries)
+{
+ if (dim_range*dim_image != 0)
+ std::copy (entries, entries+dim_image*dim_range, val);
+}
+
+
+
template <typename number>
void FullMatrix<number>::add_row (const unsigned int i,
const number s,
#define TYPEVEC double
#define TYPERES double
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
#undef TYPEVEC
#define TYPEVEC float
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
#define TYPEVEC double
#define TYPERES double
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
#undef TYPEVEC
#define TYPEVEC float
+template void FullMatrix<TYPEMAT>::fill (const TYPEVEC*);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;