I could use some help understanding how to add vectors in ublas. Here is an example of my question:
ublas::vector<double> vec1(10) ; // create 1st vector with 10 elements
ublas::vector<double> vec2(10) ; // create 2nd vector with 10 elements
ublas::vector<double> vec3(10) ; // create 3rd vector with 10 elements
.
.
// Assume that the vectors "vec1" and "vec2" have been filled with random values
.
.
vec3 = vec1 +
vec2;
// add the first two vectors together
This should be fairly straight forward, right? Ublas has overloaded the
"+" operator for vectors so my last statement should be valid, right?
Yet when I compile I get an error message like this: error: ambiguous overload for 'operator+' in 'vec1 + vec2'
Anyone have any ideas why this is happening?
Help would be cool. Thanks.