Boost logo

Ublas :

From: Martin Wiebusch (martin.wiebusch_at_[hidden])
Date: 2006-06-13 10:13:03


Hi,

I am using Boost 1.33 with gcc 4.0.2.
I noticed that uBLAS seems to have problems with products of more than
two matrices. The following code

    const unsigned N = 4;
    matrix<double> A(N,N);
    matrix<double> O(N,N);

    // .. initializations

    A = prod(prod(herm(O),A), O);

gives this error on compilation:

/usr/local/include/boost/numeric/ublas/matrix_expression.hpp: In
function ‘typename
boost::numeric::ublas::matrix_matrix_binary_traits<typename
E1::value_type, E1, typename E2::value_type, E2>::result_type
boost::numeric::ublas::prod(const
boost::numeric::ublas::matrix_expression<E>&, const
boost::numeric::ublas::matrix_expression<E2>&) [with E1 =
boost::numeric::ublas::matrix_matrix_binary<boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned int, int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::scalar_conj<double> >, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned int, int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::matrix_matrix_prod<double, double, double> >, E2 = boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned int, int>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >]’:
diag.cpp:218: instantiated from here
/usr/local/include/boost/numeric/ublas/matrix_expression.hpp:4637:
error: invalid application of ‘sizeof’ to incomplete type
‘boost::STATIC_ASSERTION_FAILURE<false>’

Is that a bug or a feature? ;-)

Martin.