[variadic_templates][mpl]interest in compile time matrix multiplication?

For example, with:
***domain_matrix: ( 11 12 13 ) ( 21 22 23 )
the following:
typedef outer_product_pack < plus_times_row_column<arg<1>,arg<2> > >::apply < domain_matrix , domain_matrix >::type outer_plus_times_rows_rows;
std::cout<<"***outer_plus_times_rows_rows:\n"; for_each<outer_plus_times_rows_rows>(printer);
produces:
***outer_plus_times_rows_rows: ( 434 794 ) ( 794 1454 )
The plus and times operations can be replaced with any compile-time binary operation. Any interest? -regards, Larry

Larry Evans wrote:
The plus and times operations can be replaced with any compile-time binary operation. Does it works as MPL extension or is it compeltely another thign ? Advantage of beign MPL based is that you may reuse allt he algorithm by makign tour matrix<> and vector<> conformants to proper concepts.
Any support for stuff like inverse or linear system solving with rationals ? -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35

On 02/16/10 13:44, joel falcou wrote:
Larry Evans wrote:
The plus and times operations can be replaced with any compile-time binary operation. Does it works as MPL extension or is it compeltely another thign ?
MPL extension. It's an outgrowth of the cross_product code mentioned here: http://lists.boost.org/boost-users/2010/02/56243.php
Advantage of beign MPL based is that you may reuse allt he algorithm by makign tour matrix<> and vector<> conformants to proper concepts.
Any support for stuff like inverse or linear system solving with rationals ?
No, Sorry. BTW, the code I posted may seem wrong because the domain_matrix cannot be matrix multiplied; however, transposition is just done by mpl::zip_view and then that's when the outer_product is done. Still working on it, but it's close to done. Thanks for the interest. -regards, Larry.

AMDG joel falcou wrote:
Larry Evans wrote:
The plus and times operations can be replaced with any compile-time binary operation. Does it works as MPL extension or is it compeltely another thign ? Advantage of beign MPL based is that you may reuse allt he algorithm by makign tour matrix<> and vector<> conformants to proper concepts.
Any support for stuff like inverse or linear system solving with rationals ?
Boost.Units has contained non-generic versions of these for several years, because we needed them for conversions. In Christ, Steven Watanabe
participants (4)
-
joel falcou
-
Joel Falcou
-
Larry Evans
-
Steven Watanabe