Re: [eigen] Clarification on the documentation for SparseSelfAdjointView::RankUpdate |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Clarification on the documentation for SparseSelfAdjointView::RankUpdate
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 17 Jun 2011 09:43:54 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=Gb35+Lgmk0bAZk8X/TpmmdcQUjEWZ0LUkPaSXklktIc=; b=uQ+9pC9nK+pv3Rl7gAC3YObDRzumVptv/aP9w9nhpM8PKiKVysyB7fMIE5AvhYHaDU orIh3Lv+rxTeDH0X/DtIY7r94aSE4+u0q9gz6xACsxdPuh4CBxNU84D55+LXPRWhgBjk 5l8T2L20Zno4zx0W0Yo7AWtFqFIMGvvMqndaA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=lS6wDgLeC8Nu224u8rJeoLM2PkVdhH4BRse79NLYQ2qzz8HPaLeznLgfM0H5fSdJA0 DXv36O9jO196Z/prJrJYnvxPUs+bICQ3qOcjGfz57I2UV7T1dbIKQ1iR7TabrTD72gjF ieN8iDcSK4UxjIIZXINw6D/kLMMyK3uxRqvgc=
answered there:
http://forum.kde.org/viewtopic.php?f=74&t=95552&sid=a52d201181d55e50c3105c1213caddaf
gael
On Thu, Jun 16, 2011 at 11:41 PM, Douglas Bates <bates@xxxxxxxxxxxxx> wrote:
> The documentation for this method states
>
>
> /** Perform a symmetric rank K update of the selfadjoint matrix \c *this:
> * \f$ this = this + \alpha ( u u^* ) \f$ where \a u is a vector or matrix.
> *
> * \returns a reference to \c *this
> *
> * Note that it is faster to set alpha=0 than initializing the
> matrix to zero
> * and then keep the default value alpha=1.
> *
> * To perform \f$ this = this + \alpha ( u^* u ) \f$ you can simply
> * call this function with u.adjoint().
> */
>
> The second-last paragraph is what has confused me. I want to evaluate
> the Lower triangle of Z.adjoint() * ZLam so I am doing it as
>
> SparseMatrix<double> ZtZ;
> ZtZ.selfadjointView<Lower>().rankUpdate(Z.adjoint(),
> 0.).rankUpdate(Z.adjoint());
>
> Is that what is meant - that I should do the
> .rankUpdate(Zlam.adjoint(), 0) then do the rankUpdate(Zlam.adjoint())?
>
> A second question, if I may: What would be an effective way of
> evaluating, as a sparse matrix, (I + Z'Z)? I think I would want to
> initialize the result to the identity then apply the rankUpdate method
> but I want to be sure that I don't accidentally create a dense, square
> matrix along the way.
>
>
>