Page MenuHomeHEPForge

Change EvtComplex to std::complex
Open, NormalPublic


C++ now provides implementation of complex numbers (std::complex) and we should update code to use it instead of private implementation in EvtComplex.

As a test, I tried to see whether we can do it in chunks without having to deal with all code at the same time. For that, adding additional constructor and assignment operator from std::complex, converting EvtVector4C to std::complex and adding a bunch of methods to EvtVector4C to allow co-existence of std::complex and EvtComplex would allow a good part of code to be converted class-by-class with the possibility to compile and test at any point.

I have an initial trial available locally, but we should wait with this change until we handle variables renaming and have full test suite.

Event Timeline

kreps triaged this task as Normal priority.Sep 14 2021, 11:21 AM
kreps created this task.
kreps created this object with visibility "Public (No Login Required)".
kreps created this object with edit policy "Restricted Project (Project)".

Additional info, in EvtVector4C I had to add two more copies of multiplication operator between EvtVector4C and complex number, the constructor from EvtComplex and set methods working with EvtComplex and doubles (otherwise call with doubles would be ambiguous as conversion to both complex numbers is possible).