Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A armawrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FSL
  • armawrap
  • Merge requests
  • !22

Rf/svd error

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Paul McCarthy requested to merge rf/svd-error into master Dec 17, 2020
  • Overview 0
  • Commits 5
  • Changes 9

Issue #1 (closed) highlighted the fact that, while the armawrap implementation of NEWMAT::SVD does crash when given a matrix with less rows than columms (which preserves compatibility with the behaviour of the original NEWMAT::SVD function), it crashes in a different, unintentional manner.

This patch adds an explicit check, to make the crash and error message more interpretable.

It also turns out that the arma::svd and arma::svd_econ functions behave slightly differently, in that arma::svd returns U as a square matrix of shape (X.n_rows, X.n_rows), whereas arma::svd_econ truncates U to have the same shape as the input matrix X (which is the desired behaviour, as this is what the original NEWMAT::SVD function did).

So this MR also removes the explicit truncation of the matrix U, which was only necessary when arma::svd was being used.

Edited Dec 17, 2020 by Paul McCarthy
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: rf/svd-error