[df] Document copying behaviour of VariationsFor - #22992
Conversation
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 7e389ad. |
| When calling \ref ROOT::RDF::Experimental::VariationsFor "VariationsFor()", the input value held by the RResultPtr is | ||
| copied N times (one per variation) to create the corresponding varied values with an initial state (which will be | ||
| updated accordingly when the computation graph runs). As a consequence, if the action being run takes an input user value | ||
| which may be modified in place, e.g. \ref Hist(std::shared_ptr<ROOT::Experimental::RHistEngine<BinContentType>>, const ColumnNames_t &), | ||
| the nominal value will be the user-provided one, whereas the varied values will be fresh copies of the nominal one. |
There was a problem hiding this comment.
I don't understand this proposed addition, I think it's too technical and complicated.
| When calling \ref ROOT::RDF::Experimental::VariationsFor "VariationsFor()", the input value held by the RResultPtr is | |
| copied N times (one per variation) to create the corresponding varied values with an initial state (which will be | |
| updated accordingly when the computation graph runs). As a consequence, if the action being run takes an input user value | |
| which may be modified in place, e.g. \ref Hist(std::shared_ptr<ROOT::Experimental::RHistEngine<BinContentType>>, const ColumnNames_t &), | |
| the nominal value will be the user-provided one, whereas the varied values will be fresh copies of the nominal one. | |
| When calling \ref ROOT::RDF::Experimental::VariationsFor "VariationsFor()", the input value held by the RResultPtr is | |
| copied N times (one per variation) to create the corresponding varied values. | |
| As a consequence, if the action being run takes an input user value, | |
| e.g. \ref Hist(std::shared_ptr<ROOT::Experimental::RHistEngine<BinContentType>>, const ColumnNames_t &), | |
| the nominal value will be the user-provided one, whereas the varied values will be fresh copies. |
There was a problem hiding this comment.
Just to clarify, you mean that after your suggestion the proposed addition becomes not too technical and complicated, right? I'm not 100% sure if you mean that or that the whole section should just be removed completely.
There was a problem hiding this comment.
Yes sorry, it wasn't 100% clear to me either 😅 the suggestion tries to point to the parts that I find hard to understand and removing them makes it clearer for me, but not sure if their omission leaves things out (that I didn't understand in the first place)
Addresses #22956 (review)