tcbrindle / flux

A C++20 library for sequence-orientated programming
https://tristanbrindle.com/flux/
Boost Software License 1.0
441 stars 28 forks source link

Feat/cartesian power and map #163

Closed isaacy2012 closed 5 months ago

isaacy2012 commented 5 months ago

(Update of #162 with finalised name cartesian_power and cartesian_power_map)

Attempts to partially address #138 regarding the cartesian_power, cartesian_power_map functionalities.

Implementation centers around replacing std::get<I>(self.bases_) in cartesian_product with self.base_ for cartesian_power.

Moves common logic across cartesian_product, cartesian_power and their map variants to a common base trait class cartesian_base with enum selectors for [product/power] and [tuple/map].

tcbrindle commented 5 months ago

Hi @isaacy2012, it looks like this PR is using the "repeat" names, did you intend to change them back to "power"? :)

isaacy2012 commented 5 months ago

Hi @isaacy2012, it looks like this PR is using the "repeat" names, did you intend to change them back to "power"? :)

Oops sorry, forgot to push the revert :)

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (19e87a3) 97.99% compared to head (4f02c0d) 98.06%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #163 +/- ## ========================================== + Coverage 97.99% 98.06% +0.06% ========================================== Files 66 69 +3 Lines 2392 2424 +32 ========================================== + Hits 2344 2377 +33 + Misses 48 47 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tcbrindle commented 5 months ago

Other than one change that I really should have noticed earlier (sorry!) and a tiny super-pedantic one, I think this is done!

The only thing left would be some (placeholder) documentation in docs/reference/adaptors.rst now that the name is finalised, but I can do that if you like because Sphinx can be really fussy about things.

tcbrindle commented 5 months ago

@isaacy2012 are you happy for me to merge this?

isaacy2012 commented 5 months ago

@isaacy2012 are you happy for me to merge this?

Yep, sounds good. Thanks for all your help and feedback :)

tcbrindle commented 5 months ago

@isaacy2012 are you happy for me to merge this?

Yep, sounds good. Thanks for all your help and feedback :)

Thank you for working on it! It's very much appreciated