From: <bm...@fi...> - 2005-08-31 05:59:39
|
Hi All, I would like to use blitz arrays of other types (in this case tvmet matrices) and use the arrays of matrices in chained arithmetic expressions. However, I get compile-time errors when I attemt to do so. Does anyone have a way around this problem? Code example is: _____________________________________________________________________ blitz::Array<tvmet::Matrix<double,3,2>,2> bz1(100,100); blitz::Array<tvmet::Matrix<double,3,2>,2> bz2(100,100); blitz::Array<tvmet::Matrix<double,3,2>,2> bz3(100,100); blitz::Array<tvmet::Matrix<double,3,2>,2> bz4(100,100); tvmet::Matrix<double,3,2> m1; m1= 0.0,0.0, 0.0,0.0, 0.0,0.0; bz1 = m1; bz2 = bz1; bz3 = bz1; bz4 = bz1; //all works fine to here bz1 = bz2+bz3;+bz4; //this doesnt work... _____________________________________________________________________ Error codes are: _____________________________________________________________________ /usr/include/blitz/ops.h: In static member function `static typename blitz::promote_trait<T1_orig, T2_orig>::T_promote blitz::Add<T_numtype1, T_numtype2>::apply(T_numtype1, T_numtype2) [with T_numtype1 = tvmet::Matrix<double, 3, 2>, T_numtype2 = tvmet::Matrix<double, 3, 2>]': ... a long list of 'instantiated from here... /usr/include/blitz/ops.h:139: error: conversion from ` tvmet::XprMatrix<tvmet::XprBinOp<tvmet::Fcnl_add<double, double>, tvmet::MatrixConstReference<double, 3, 2>, tvmet::MatrixConstReference<double, 3, 2> >, 3, 2>' to non-scalar type ` tvmet::Matrix<double, 3, 2>' requested _____________________________________________________________________ I know long ago the plan was to integrate tvmet into blitz... I welcome that day. In the meantime can it be made to work? Thanks for all assistance, Ben McLean. |