I really think all these functions should not return `RCP<const DenseMatrix>`, but rather should accept a third parameter `DenseMatrix &C` (no const) and fill it in.