[eigen] Re: JacobiSVD API changed and functionality expanded

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2010/10/8 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Hi,
>
> just a quick note --- more details will follow in beta2 announcement.
> JacobiSVD's API just changed a lot, see the new class documentation
> (currently in the source until online docs get updated).
>
> template params: JacobiSVD<MatrixType, QRPreconditioner>
>
> the QRPreconditioner param is optional, so you can ignore it. But you
> can also set it to other values to get something faster / smaller
> executable etc, at the cost of less safety and accuracy.
>
> The biggest API change is that if you want U or V, you not have to
> tell it explicitly at runtime, when you compute the decomposition.
> The biggest feature addition is that you can now get thin U / V.
>
> Examples:
> JacobiSVD<MatrixXf> svd(matrix); // compute only singular values, no U, no V
> JacobiSVD<MatrixXf> svd(matrix, ComputeThinU | ComputeFullV); //
> compute thin U and full V

ah wait... the latter line won't work because the default
FullPivHouseholderQRPreconditioner doesn't allow to get thin
unitaries. OK, that's the last nail in its coffin as default
QRPreconditioner. Switching to ColPivHousholderQRPreconditioner as
default... in the meanwhile you can do:

JacobiSVD<MatrixXf, ColPivHousholderQRPreconditioner> svd(matrix,
ComputeThinU | ComputeFullV);

Benoit

> Upcoming: solve(), which will allow to get rid of our crappy,
> borrowed-from-elsewhere SVD class.
>
> Benoit
>



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