Re: [eigen] Cholesky on mapped matrices? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
(side note completely unrelated to the original topic)
If feels weird to use n[0] just to dereference a pointer, no ? I would use *n instead.
greetings,
--
Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
http://www.freehackers.org/thomas
In data giovedì 10 giugno 2010 02:08:45, Ben Goodrich ha scritto:
> void my_LDLt(const double *A, const int *n, double *D, double *L) {
> Map<MatrixXd> AA(A, n[0], n[0]);
> LDLT<MatrixXd> AA_factored = AA.ldlt();
> Map<VectorXd>(D,n[0]) = AA_factored.vectorD();
> Map<MatrixXd>(L,n[0],n[0]) = AA_factored.matrixL();