|
Boost Users : |
From: jhrwalter (jhr.walter_at_[hidden])
Date: 2002-11-10 14:43:24
--- In Boost-Users_at_y..., John Lloyd <yg-boost-users_at_m...> wrote:
> Hickman, Greg wrote:
>
> > Why isn't there an overloaded
> >
> > matrix_expression
> > operator* (const matrix_expression&, const matrix_expression&);
> >
> > for peforming matrix multiplication?
> >
> > Greg Hickman
> >
> > Info: <http://www.boost.org>
> > Wiki: <http://www.crystalclearsoftware.com/cgi-
bin/boost_wiki/wiki.pl>
> > Unsubscribe: <mailto:boost-users-unsubscribe_at_y...>
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
> I think it has something to do with the fact that expression
templates can
> be very inefficient for certain chained operations, e.g., A * B *
v, where
> A and B are matrices and v is a vector.
>
> Suppose you have a matrix expression like A = B * C * D. Using
expression
> templates, this could result in an order n^5 time complexity as
opposed to
> order n^3 complexity.
Exactly. I believe the theoretically more important signature is
prod<matrix_type> (A, B), although prod (A, B) will be more
frequently used practically (BTW: the complexity of prod (A, B) (i,
j) is O(n) as opposed to O(n^3) for prod<matrix_type> (A, B) (i, j)).
Best regards
Joerg
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net