Ok, I fixed some of my mistakes but it now appears the overloaded
operators aren't being seen so I must be missing another header or
something. Once again here's the code compiled under VS.NET, debug,
boost version 1_29_0, with the resultant error messages following.
#include <iostream>
#include
#include
int main()
{
using namespace boost::numeric::ublas;
matrix<double> m1(3, 3), m2(3, 3);
for(unsigned int i = 0; i < std::min(m1.size1(), m2.size1());
++i)
for(unsigned int j = 0; j < std::min(m1.size2(), m2.size2());
++j)
m1(i, j) = m2(i, j) = 3 * i + j;
std::cout << m1 + m2 << std::endl;
std::cout << m1 - m2 << std::endl;
std::cin.get();
return EXIT_SUCCESS;
}
c:\Documents and Settings\Agiato\My Documents\Visual Studio
Projects\test5\matrixAddSub.cpp(15): error C2679: binary '<<' : no
operator found which takes a right-hand operand of
type 'boost::numeric::ublas::matrix_binary_traits::result_ty
pe' (or there is no acceptable conversion)
with
[
E1=boost::numeric::ublas::matrix,
E2=boost::numeric::ublas::matrix,
F=boost::numeric::ublas::scalar_plus::value_type,boost::numeric::ublas::matrix>::value_type>
]
c:\Documents and Settings\Agiato\My Documents\Visual Studio
Projects\test5\matrixAddSub.cpp(17): error C2679: binary '<<' : no
operator found which takes a right-hand operand of
type 'boost::numeric::ublas::matrix_binary_traits::result_ty
pe' (or there is no acceptable conversion)
with
[
E1=boost::numeric::ublas::matrix,
E2=boost::numeric::ublas::matrix,
F=boost::numeric::ublas::scalar_minus::value_type,boost::numeric::ublas::matrix::value_type>
]
Thanks to all for their help!
Jon Agiato
JonAgiato@nyc.rr.com