Numerical Methods for Computational Science and Engineering€¦ · Numerical Methods for...

Post on 30-Apr-2020

17 views 0 download

transcript

Numerical Methods for

Computational Science and Engineering

Fall Semester 2017 (HS17)

Prof. Rima Alaifari, SAM, ETH Zurich

SparseMatrix<double> Asp(1000,1000);SparseMatrix<double,RowMajor> Bsp;

Asp.insert(i,j) = v_ij;

Asp.coeffRef(i,j) = v_ij;Asp.coeffRef(i,j) += w_ij;

Asp.makeCompressed();

triplets.reserve(nnz);