A sparse matrix $\mathbf{L}$ is formed by $\mathbf{L} = \mathbf{DKG}$.
- $\mathbf{D}$ is a sparse matrix of size $m \times n$.
- $\mathbf{G}$ is a sparse matrix of size $n \times m$.
- $\mathbf{K}$ is a diagonal matrix of size $n \times n$.
$\mathbf{L}$ needs to be formed many times based on the updated diagonal entries of $\mathbf{K}$. Both $\mathbf{D}$ and $\mathbf{G}$ never change.
Is there a faster way to form $\mathbf{L}$ without preforming two full sparse matrix multiplications?