diff --git a/vcg/math/lin_algebra.h b/vcg/math/lin_algebra.h index be86063e..01eeb108 100644 --- a/vcg/math/lin_algebra.h +++ b/vcg/math/lin_algebra.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.16 2007/01/29 00:18:20 pietroni +-added some explicit CASTs in order to avoid warning if one use float instead of double as ScalarType + Revision 1.15 2006/09/29 08:36:10 cignoni Added missing typedef for gcc compiing @@ -47,6 +50,7 @@ Added initial disclaimer #define __VCGLIB_LINALGEBRA_H #include +#include namespace vcg { @@ -233,8 +237,8 @@ namespace vcg /*! - * Given a matrix Am×n, this routine computes its singular value decomposition, - * i.e. A=U·W·VT. The matrix A will be destroyed! + * Given a matrix Amxn, this routine computes its singular value decomposition, + * i.e. A=UxWxVT. The matrix A will be destroyed! * (This is the implementation described in Numerical Recipies). * \param A the matrix to be decomposed * \param W the diagonal matrix of singular values W, stored as a vector W[1...N] @@ -427,7 +431,6 @@ namespace vcg } if (its == max_iters) { - printf("no convergence in %d SingularValueDecomposition iterations\n", max_iters); convergence = false; } x = W[l]; // Shift from bottom 2-by-2 minor. @@ -593,11 +596,11 @@ namespace vcg /*! - * Solves A·X = B for a vector X, where A is specified by the matrices Um×n, - * Wn×1 and Vn×n as returned by SingularValueDecomposition. - * No input quantities are destroyed, so the routine may be called sequentially with different b’s. - * \param x is the output solution vector (xn×1) - * \param b is the input right-hand side (bn×1) + * Solves AxX = B for a vector X, where A is specified by the matrices Umxn, + * Wnx1 and Vnxn as returned by SingularValueDecomposition. + * No input quantities are destroyed, so the routine may be called sequentially with different bxs. + * \param x is the output solution vector (xnx1) + * \param b is the input right-hand side (bnx1) */ template static void SingularValueBacksubstitution(const MATRIX_TYPE &U,