Skip to content
Snippets Groups Projects
Commit 64af4453 authored by Martin Nolte's avatar Martin Nolte
Browse files

add missing method mtv (mv and umtv exist, so mtv should exist, too)

[[Imported from SVN: r5532]]
parent 3ac32bc8
No related branches found
No related tags found
No related merge requests found
......@@ -304,6 +304,25 @@ namespace Dune {
}
}
//! y = A^T x
template< class X, class Y >
void mtv ( const X &x, Y &y ) const
{
#ifdef DUNE_FMatrix_WITH_CHECKING
assert( &x != &y );
if( x.N() != N() )
DUNE_THROW( FMatrixError, "Index out of range." );
if( y.N() != M() )
DUNE_THROW( FMatrixError, "Index out of range." );
#endif
for( size_type i = 0; i < m; ++i )
{
y[ i ] = 0;
for( size_type j = 0; j < n; ++j )
y[ i ] += (*this)[ j ][ i ] * x[ j ];
}
}
//! y += A x
template<class X, class Y>
void umv (const X& x, Y& y) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment