| 269 | |
| 270 | #ifndef NOGOOGLE |
| 271 | EIGEN_DONT_INLINE Scalar* setrand_eigen_google_dense(const Coordinates& coords, const Values& vals) |
| 272 | { |
| 273 | using namespace Eigen; |
| 274 | SparseMatrix<Scalar> mat(SIZE,SIZE); |
| 275 | { |
| 276 | RandomSetter<SparseMatrix<Scalar>, GoogleDenseHashMapTraits> setter(mat); |
| 277 | for (int i=0; i<coords.size(); ++i) |
| 278 | setter(coords[i].x(), coords[i].y()) += vals[i]; |
| 279 | CHECK_MEM; |
| 280 | } |
| 281 | return &mat.coeffRef(coords[0].x(), coords[0].y()); |
| 282 | } |
| 283 | |
| 284 | EIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals) |
| 285 | { |