Boost logo

Ublas :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2006-03-03 08:19:56


Hi!

This is a problem with boost-1.33.1.
I am using axpy_prod in my code and got an error with
a failed assertion in boost\numeric\ublas\operation.hpp at line 486.
Could you please explain what kind of error could have raised this error?

My harmless looking code called ublas functions like this
 
 ublas::vector<value_type> minus_g(ncols(Jacobian));
 ublas::axpy_prod(-f, J, minus_g, true);

    template<class V, class E1, class E2>
    BOOST_UBLAS_INLINE
    V &
    axpy_prod (const vector_expression<E1> &e1,
               const matrix_expression<E2> &e2,
               V &v, bool init = true) {
        typedef typename V::value_type value_type;
        typedef typename E1::const_iterator::iterator_category iterator_category;

        if (init)
            v.assign (zero_vector<value_type> (e2 ().size2 ()));
#if BOOST_UBLAS_TYPE_CHECK
        vector<value_type> cv (v);
        typedef typename type_traits<value_type>::real_type real_type;
        real_type verrorbound (norm_1 (v) + norm_1 (e1) * norm_1 (e2));
        indexing_vector_assign<scalar_plus_assign> (cv, prod (e1, e2));
#endif
        axpy_prod (e1, e2, v, iterator_category ());
#if BOOST_UBLAS_TYPE_CHECK

*****************LINE THAT FAILED ************************************
        BOOST_UBLAS_CHECK (norm_1 (v - cv) <= 2 *
std::numeric_limits<real_type>::epsilon () * verrorbound, internal_logic ());
#endif
        return v;
    }