Draft: Cleanup: Make Adapters functors fully composition-friendly
Address #433, with the intent of removing cpp implementation of functors MIN
, MAX
and SUM
from Adapters.h
and define them using composition based on MIN_ELEMENT
, MAX_ELEMENT
, SUM_RANGE
functors respectively.
A consideration has to be done with the ambivalence of functionalities for SUM
functor receiving either a Functor
or a Predicate
as argument.
Following comment #433 (comment 6257699), it will change the logic also of the other functors belonging to Adapters namespace, in favor of composition logic, i.e. every functor that is implemented wrapping another functor could be simplified decomposing this nested structure (apart for few cases...).
Needs !3224 (merged), Moore!1953 (closed)
Will require changes on Moore, and probably other projects...
TODO:
-
MIN
,MAX
andSUM
functors were already designed for v2 Particle, it would be nice to make them work for SOA collections also using composition -> MakeBasicsFromComposite
,DescendantsFromComposite
,GenerationFromComposite
also for v2 -
Fix TestFunctors