♻️ Refactor functions to avoid the generateDensityMatrix flag #337
Labels
DD
Anything related to the DD package
enhancement
New feature or request
good first issue
Good for newcomers
I am not a fan of adding the
generateDensityMatrix
flag to a ton of functions.Unfortunately, C++ does not allow two functions that only differ in their return values. Otherwise it would be rather easy to get rid of this
generateDensityMatrix
parameter, which is only relevant for density matrices.One potential solution for this would be to refactor these methods in the following fashion:
This would allow for specializations of
Matrix * Matrix -> Matrix
andMatrix * Matrix -> Density Matrix
.Originally posted by @burgholzer in cda-tum/dd_package#72 (comment)
The text was updated successfully, but these errors were encountered: