Re: [eigen] symmetrize the eigne way |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] symmetrize the eigne way
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 25 Jan 2010 10:06:14 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=/ikVdl2WOu/122iVmqrb335jSxr0xswxpmGyXBCpQuM=; b=fJxMS2xHmssjzdrRdTPqTXap/Yz4zLhCYPVsJ9asivw3ycbV40ZUvYahmaZyJyDLRe IyaJhMmpMUshoMh3FJnsN/nuVEx5JrVqQYVrGWE1p3iNV788wI6FEJLmgvsF1yr6uEyb 4iGV5wVKbL2gf4N/52+0tTS8954tNrB2k1Tzw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=AKVbISR/pIWV7afWc2+zEEYF042ZWiD4yoMGFGrm7J7EtMZOQKl0CYniK4L1bNyR8n seGDrnPIwpnoK3+pF1pPRcL09Su//tmN01gnLHzlN2uguZQgAucpPi5ayH3TKeSSN+qP pTKUqIIh38S6NoHEAqsEaa6RxXiw5uMKibcp8=
2010/1/25 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>
> Suppose i want to create a selfadjoint matrix this way:
> for (j = 0; j < n; ++j)
> for (i = j+1; i < n; ++i)
> s(i,j) = s(j,i);
>
> How could i do that using Eigen? I've thought about :
> s.template triangularView<StrictlyLower>() = s.template triangularView<StrictlyUpper>().transpose();
>
> But this wont compile:
> Eigen/src/Core/TriangularMatrix.h:425: error: no matching function for call to ‘Eigen::Matrix<double, 33331, 33331, 0, 33331, 33331>::copyCoeff(int&, int&, const Eigen::TriangularView<Eigen::Transpose<Eigen::Matrix<double, 33331, 33331, 0, 33331, 33331> >, 9u>&)’
OK how about:
s.template triangularView<StrictlyLower>() = s.transpose();
I think the more general problem with what you tried is that we don't
support syntax using triangular views on both sides. IIRC?
Benoit
>
> ++
> --
> Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
> http://www.freehackers.org/thomas
>
>
>
>