Skip to content
Snippets Groups Projects
Commit 949cf142 authored by Markus Blatt's avatar Markus Blatt
Browse files

Deprecated transposedMult as decided in flyspray #663.

Unfortunately DUNE_DEPRECATED does not work before definitions of
template member functions inside the class.

[[Imported from SVN: r1551]]
parent 01016baf
No related branches found
No related tags found
No related merge requests found
......@@ -299,23 +299,11 @@ namespace Dune {
return out;
}
//! Multiplication of the transposed matrix times a vector
//! \brief Multiplication of the transposed matrix times a vector
//!
//! This method is deprecated. Use method mtv instead.
template <class X, class Y>
Y transposedMult(const X& vec) {
#ifdef DUNE_ISTL_WITH_CHECKING
if (N()!=vec.size())
DUNE_THROW(ISTLError, "Vector size doesn't match the number of matrix rows!");
#endif
Y out(M());
out = 0;
for (size_type i=0; i<out.size(); i++ ) {
for ( size_type j=0; j<vec.size(); j++ )
out[i] += (*this)[j][i]*vec[j];
}
return out;
}
Y transposedMult(const X& vec) DUNE_DEPRECATED;
/// Generic matrix multiplication.
friend Matrix<T> operator*(const Matrix<T>& m1, const Matrix<T>& m2) {
......@@ -608,6 +596,26 @@ namespace Dune {
*/
size_type cols_;
};
template<class T, class A>
template<class X, class Y>
inline Y Matrix<T,A>::transposedMult(const X& vec)
{
#ifdef DUNE_ISTL_WITH_CHECKING
if (N()!=vec.size())
DUNE_THROW(ISTLError, "Vector size doesn't match the number of matrix rows!");
#endif
Y out(M());
out = 0;
for (size_type i=0; i<out.size(); i++ ) {
for ( size_type j=0; j<vec.size(); j++ )
out[i] += (*this)[j][i]*vec[j];
}
return out;
}
/** \} */
} // end namespace Dune
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment