Find and replace deprecated eigen coeffRef(...,...) += ... lines with Triplet

Alec Jacobson

April 26, 2013

weblog/

This is the vim find and replace command I used to switch from the legacy DynamicSparseMatrix command coeffRef to the new format using the Triplet class.
%s/\([^\.]*\).coeffRef(\([^,]*\),\([^)]*\)) *+= *\([^;]*\);/\1_IJV.push_back(Triplet<Scalar>(\2,\3,\4));/g