[eigen] row and col setZero in sparse matrices
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: [eigen] row and col setZero in sparse matrices
• From: Daniel Alves Paladim <daalpa@xxxxxxxxx>
• Date: Mon, 14 Apr 2014 14:43:50 +0100
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=oHuOYRq4+MYubxqM7tDiY+weDRWyvIEzD3j7ybdmpow=; b=h1qh2NhWIUrCMyMILlQr32LdaOOV0X9LRmdnBMR+mEDXga/66wXaG71q72wFm42qbc cMG47DivvzETtF1jLv6R9p4w8Mur+eXL3MqhbcqCPpu4B69PBDzz/UGTCPO9yY08/UOr TwX0u8OOq1EvAHJQLwiAJBOOupwhrsYzKM08JEyZnX+loFNvlaJ8o1llbNWQZ+TjfOBh KnzKG2C5YI4EvlzlBWVYVus/vqBRKFt7foUIIYkjh8zkDFWLbATUtRjudmgoBt4zwnXh +CFUXQGLJvWrS8UN+BuGjSlMbTXpOUbk3NwrOeg+KkcalY4XtTlzqRKZWgs6w5PgAaHO kTpQ==

Good evening,

I write to ask whether you have considered implementing the method setZero for rows and columns of sparse matrices. As far as I understand, we can't do,
A.col(index).setZero(); // A is sparse

This would be very useful to set a known value in a system of equations,
b-=value*A.col(dof);
A.col(dof).setZero();
A.row(dof).setZero();
A.coeffRef(dof,dof)=1.0;
b(dof)=value;

Regards,
Daniel

 Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/