Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and use algorithm for managing iterable #2521

Closed
wants to merge 2 commits into from

Conversation

alkino
Copy link
Member

@alkino alkino commented Sep 21, 2023

Algorithms:
void apply_to_first(iterable, value, function) apply function to the first value of iterable. If not found, do nothing.
void erase_first(iterable, value) erase the first value of the iterable.
THINGS enumerate(iterable) return a pair of index and value from an iterable forward.
THINGS renumerate(iterable) return a pair of index and value from an iterable backward.
THINGS reverse(iterable) return the value of iterable in a backward way.
THINGS range(iterable) return all the index from a vector forward.

All those algorithm are here to be use with range-based for loops.

@bbpbuildbot

This comment has been minimized.

@azure-pipelines
Copy link

✔️ 68401c0 -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@alkino alkino marked this pull request as ready for review September 21, 2023 23:59
@github-actions
Copy link
Contributor

NEURON ModelDB CI: launching for 68401c0 via its drop url

@azure-pipelines
Copy link

✔️ 359fc46 -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@github-actions
Copy link
Contributor

NEURON ModelDB CI: 68401c0 -> download reports from here

@pramodk pramodk requested a review from 1uc September 22, 2023 05:32
src/ivoc/ivocrand.cpp Outdated Show resolved Hide resolved
@azure-pipelines
Copy link

✔️ 7ffed3d -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@azure-pipelines
Copy link

✔️ e05d5b8 -> Azure artifacts URL

@alkino alkino changed the title Add and use enumerate/renumerate Add and use algorithm for managing iterable Sep 22, 2023
@alkino alkino deleted the branch cornu/remove_PtrList_List September 24, 2023 09:09
@alkino alkino closed this Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants