Dear all, I am using RcppArmadillo to deal with some matrix computations. Specifically I need to cholesky factorization of some symmetric matrices. I am generating random vectors using Rcpp and using them to construct symmetric matrices. I have an error stating that my matrix is not symmetric although it definitely should be. Here is the example I am working with (in R):
>x [1] -1.6683320 -0.8597148 >x%*%t(x) [,1] [,2] [1,] 2.783332 1.4342896 [2,] 1.434290 0.7391095 Apparently, it is a rounding-off error. Is there any way to ensure that x%*%t(x) gives an exactly symmetric matrix to use for cholesky factorization? I tried symmatu and symmatl but the error is still there. Thanks, Best, Takoua Jendoubi PhD student School of Public Health & Department of Surgery and Cancer Main address : Imperial College London | Room 171 | St Mary's Campus | Norfolk Place | London | W2 1PG |
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel