I want to calculate y' * diag(A' * B * A) * y
y
is aN * 1
vectorA
is am * N
matrix whereN >> m
B
is am * m
matrix, and B is a symmetric positive definite matrix, the Cholesky decompositionB = L * L'
is precomputed if it is needed.
Is it possible to calculate the above expression in O(N*m)
complexity?