Boost logo

Boost Users :

From: Nicholas Andrews (nandrews_at_[hidden])
Date: 2004-07-22 21:15:09


Hi,

I have the following c++ function:

void multi_state_kf::correction(const vector<double>& obs, const matrix<double>& dev)
{
        compute_gain(dev);
        
        vector<double> temp = (m*obs-newX*m);
        x=newX+prod(temp,K);
        
        matrix<double> T=identity_matrix<double>(3,3)-K*m;
        matrix<double> temp2=prod(T,newP);
        matrix<double> temp3=prod(K,dev);
        P=prod(temp2,trans(T))+prod(temp3,trans(K));
}

The syntax is completely hacked together as this is my first attempt at
using boost's uBLAS, but it got rid of most of my errors except this
one:

\boost\numeric\ublas\functional.hpp(190): error C2440: '=' : cannot
convert from 'const
boost::numeric::ublas::matrix_binary_scalar2<E1,E2,F>::value_type'
to 'double' (...)

The odd (for me) part is that even when I remove all boost function
calls from the function the compile error still shows up and it points
me to a line in the functional.hpp file.

So

1. Does anyone know what could be causing this compile error?
2. What's a better way of writing this function?

Thanks in advance,
Nick


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