Boost logo

Ublas :

From: Jack Nguyen (bluekite2000_at_[hidden])
Date: 2005-05-26 18:32:48


I use g++ an got a bunch of errors. I think I m not including proper
libs or I m not linking the correct libs. Any help is appreciated.
#include <iostream>
#include <boost/numeric/bindings/lapack/gesdd.hpp>
 #include<boost/numeric/bindings/traits/ublas_matrix.hpp>
 #include<boost/numeric/bindings/traits/ublas_vector.hpp>
 #include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
 #include "printmatrix.hpp"

 using namespace boost::numeric::bindings::lapack;
using namespace boost::numeric::ublas;
// using namespace std;
 using namespace print;
int main () {

  matrix<double> A (4,2);
 A(0,0)=2;
 A(0,1)=4;
 A(1,0)=1;
 A(1,1)=3;
 A(2,0)=0;
 A(2,1)=0;
 A(3,0)=0;
 A(3,1)=0;
 print_matrix(A);

 matrix<double> U(4,4);
 matrix<double> V(2,2);
  vector<double> S(8);
  gesdd(&A,&S,&U,&V);
// print_matrix(S);
// print_matrix(U);
// print_matrix(V);

 return 0;
}