EIGEN_DONT_INLINE Scalar* setrand_ublas_coord(const Coordinates& coords, const Values& vals) { using namespace boost; using namespace boost::numeric; using namespace boost::numeric::ublas; coordinate_matrix aux(SIZE,SIZE); for (int i=0; i mat(aux); return 0;//&mat(coords[0].
| 462 | return 0;//&mat(coords[0].x(), coords[0].y()); |
| 463 | }*/ |
| 464 | EIGEN_DONT_INLINE Scalar* setrand_ublas_genvec(const Coordinates& coords, const Values& vals) |
| 465 | { |
| 466 | using namespace boost; |
| 467 | using namespace boost::numeric; |
| 468 | using namespace boost::numeric::ublas; |
| 469 | |
| 470 | // ublas::vector<coordinate_vector<Scalar> > foo; |
| 471 | generalized_vector_of_vector<Scalar, row_major, ublas::vector<coordinate_vector<Scalar> > > aux(SIZE,SIZE); |
| 472 | for (int i=0; i<coords.size(); ++i) |
| 473 | { |
| 474 | aux(coords[i].x(), coords[i].y()) += vals[i]; |
| 475 | } |
| 476 | CHECK_MEM; |
| 477 | compressed_matrix<Scalar,row_major> mat(aux); |
| 478 | return 0;//&mat(coords[0].x(), coords[0].y()); |
| 479 | } |
| 480 | #endif |
| 481 | |
| 482 | #ifndef NOMTL |