Skip to content

Commit

Permalink
Generalize documentation of SVD to rectangular matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
jhyeon committed Oct 20, 2014
1 parent c92f440 commit aecbfea
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions src/linalg2.hpp
Expand Up @@ -171,9 +171,15 @@ def_hermitian_lapack(double, dsyev_, 3*N-1)
/**
* Singular value decomposition of M-by-N matrix m such that
*
* m == u * s.matrix().asDiagonal() * vh // LAPACK convention
* sigma.setZero(); sigma.diagonal() = s;
* m == u * sigma * vh // LAPACK convention
*
* and `(s >= 0).all()`. Elements of s are in descending order.
* and `(s >= 0).all()`. Elements of s are in descending order. The
* above decomposition can be put in the form
*
* m == u * s.matrix().asDiagonal() * vh
*
* if `M == N`.
*
* @tparam Scalar type of elements of m, u, and vh
* @tparam M number of rows in m
Expand Down Expand Up @@ -333,9 +339,15 @@ void diagonalize_symmetric
/**
* Singular value decomposition of M-by-N matrix m such that
*
* m == u * s.matrix().asDiagonal() * vh // LAPACK convention
* sigma.setZero(); sigma.diagonal() = s;
* m == u * sigma * vh // LAPACK convention
*
* and `(s >= 0).all()`. Elements of s are in ascending order.
* and `(s >= 0).all()`. Elements of s are in ascending order. The
* above decomposition can be put in the form
*
* m == u * s.matrix().asDiagonal() * vh
*
* if `M == N`.
*
* @tparam Scalar type of elements of m, u, and vh
* @tparam M number of rows in m
Expand Down Expand Up @@ -427,10 +439,16 @@ void reorder_diagonalize_symmetric
/**
* Singular value decomposition of M-by-N matrix m such that
*
* m == u.transpose() * s.matrix().asDiagonal() * v
* sigma.setZero(); sigma.diagonal() = s;
* m == u.transpose() * sigma * v
* // convention of Haber and Kane, Phys. Rept. 117 (1985) 75-263
*
* and `(s >= 0).all()`. Elements of s are in ascending order.
* and `(s >= 0).all()`. Elements of s are in ascending order. The
* above decomposition can be put in the form
*
* m == u.transpose() * s.matrix().asDiagonal() * v
*
* if `M == N`.
*
* @tparam Scalar type of elements of m, u, and v
* @tparam M number of rows in m
Expand All @@ -454,10 +472,16 @@ void fs_svd
/**
* Singular value decomposition of M-by-N *real* matrix m such that
*
* m == u.transpose() * s.matrix().asDiagonal() * v
* sigma.setZero(); sigma.diagonal() = s;
* m == u.transpose() * sigma * v
* // convention of Haber and Kane, Phys. Rept. 117 (1985) 75-263
*
* and `(s >= 0).all()`. Elements of s are in ascending order.
* and `(s >= 0).all()`. Elements of s are in ascending order. The
* above decomposition can be put in the form
*
* m == u.transpose() * s.matrix().asDiagonal() * v
*
* if `M == N`.
*
* @tparam M number of rows in m
* @tparam N number of columns in m
Expand Down

0 comments on commit aecbfea

Please sign in to comment.