Interface types should be accepted as inputs / outputs to Functional algorithms
- Dominant language
- C++
- Stars
- 14
- Forks
- 34
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
Currently only proper collections can be passed as input (and output) collections in Functional algorithms. In some cases it might be useful to have the possibility to pass a `vector` of interface types instead, e.g.
```cpp
class TrackFinder : public k4FWCore::Transformer&)> {
// the rest
};
```
In some cases it might be possible to work around this, by simply accepting a vector of collections, e.g.
```cpp
class TrackFinder : public k4FWCore::Transformer&)> {
// the rest
};
```
However, that immediately limits the usability to exactly one of the potential types that are modeled by the interface and would require to pass multiple input vectors of collection (types). That would in turn require some more complicated logic in the implementation. Instead if it would be possible to simply pass the vector of interface objects, most of the logic could be externalized and would effectively amount to merging all the input collections into the interface vector. The actual algorithm could then most probably be implemented as a simple loop over that vector instead of having to collect it first.
Contributor guide
Research direction
Start by tracing how Functional algorithms currently accept input and output collections, then inspect the relevant tests or examples for Transformer signatures. Determine the design needed to accept vectors of interface types while preserving existing collection inputs, and verify the TrackFinder-style signatures and existing behavior with tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100