Re: [eigen] Setting diagonal of a sparse matrix

[ Thread Index | Date Index | More Archives ]

Dear Brad,

while I'm not an expert on sparse Eigen,
the documentation clearly says <>

    	If the diagonal entries are written, then all diagonal entries must already exist, otherwise an assertion will be raised.

Putting a S.setIdentity() before assigning solves the problem.
Whether there is a better way, I don't know.

Best regards,

Mail converted by MHonArc 2.6.19+