Boost logo

Ublas :

From: John Reid (j.reid_at_[hidden])
Date: 2006-09-15 04:01:35


You probably need to change this line

> #include </home/jstoup/boost_1_33_1/boost/numeric/ublas/vector.hpp>

to this

> #include <boost/numeric/ublas/vector.hpp>

and add /home/jstoup/boost_1_33_1 to the list of directories your
compiler searches for header files.

HTH,
John.

Alion Sci wrote:
> What headers do I need? I thought I had that taken care of but
> apparently not. Here is my full code, it doesn't do anything yet because
> it is just test code. Once I figure this problem out then I can update
> my real project. Thanks.
>
>
>
>
> #include <cstdlib>
> #include <iostream>
> #include </home/jstoup/boost_1_33_1/boost/numeric/ublas/vector.hpp>
>
> *using* *namespace* boost::numeric ;
> *using* *namespace* std ;
>
> int main()
> {
> ublas::vector<double> rvect1(10) ;
> *for* ( int n=0 ; n < rvect1.size() ; ++n )
> {
> int y = rand() % 10;
> rvect1(n) = (double) (n*y+1) ;
> }
>
> ublas::vector<double> rvect2 = 3*rvect1 ;
> ublas::vector<double> rvect3(10);
>
> rvect1 = 2*rvect1;
> rvect2 = cbrt(rvect2);
> rvect3 = rvect1 + rvect2;
>
> cout << "=========================================================================================" << endl;
> cout << "rvect1 = " << rvect1 << endl;
> cout << "rvect2 = " << rvect2 << endl;
> cout << "rvect3 = " << rvect3 << endl;
> cout << "=========================================================================================" << endl;
>
> *return* 0;
> }
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas