-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Explain what you would like to see improved and how.
I use RDataFrame from Python. This is very convenient and efficient, since calculations go in C++. However, a high-level object in Python (the same holds for C++) may use an equality comparison operator.
How it could be implemented:
- since there is a constructor of RDataFrame(tree name, file path), one may simply save the strings for the tree name and file path and compare those. This would give correct comparison right after the initialization.
- If RDataFrame is initialized from a class without a comparison operator, it is compared unequal. This would be similar to a Python lambda, which are not equal even with exactly same code.
The benefit: this may save computational power, since if there are two same RDataFrames, one can use only one of them (provided that the operations are indeed efficient, as the class promises).
A potential caveat would be if we define a column in one instance of the "same" RDataFrame and do not define that in another. In that case it would be easier to change the "equality state" of the RDataFrame after we make some operations with that.
ROOT version
any
Installation method
any
Operating system
any
Additional context
It would be useful to add equality comparison operators (normal in object-oriented world) to other ROOT classes as well (if those are missing). A remotely related issue was posted on the ROOT Forum.