matrix - what is the efficient way of implementing CholeskySolve in eigen without using intermediate matrices or buffers? -
i tried follows
l = l.triangularview<lower>(); x1 = (l*l.transpose()).llt().solve(y1);
where l,y1 input matrices , x1 output matrix.output came expected,but in case l matrix changes after execution of first statement.
don't want change l matrix.
suggestions.
you have llt factorization, apply l
's inverse twice:
x = l.triangularview<lower>().solve(y); x = l.triangularview<lower>().transpose().solve(x);
no temporary, performed in-place.
Comments
Post a Comment