What are the efficient options to perform matrix multiplications of the form A*B*A and A*B*A' ? I am particularly intereted in the case when A and B are Symmetric or Hermitian and when these multiplications are performed repeatedly inside a loop, such as
sum(A*B*A for B in Bset),
where Bset is an array of matrices.
Some time ago i found a post on this topic, but i am not able to retrive it anymore.
Unfortunately PDMats concerns real positive matrices only. I am interested in either real or complex positive matrices. As per the A*B*A' expression, PDmats decomposes the expression as A*L*L'A' using the Cholesky decomposition B=L*L' and uses low-level function rmul! in LinearAlgebra. I have tried and i don’t get a significant difference in computation time and exactly the same memory allocation.