-
Notifications
You must be signed in to change notification settings - Fork 4
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
Сделать итератор склейки более эффективным #16
Labels
Comments
izvolov
added a commit
that referenced
this issue
Dec 20, 2014
izvolov
added a commit
that referenced
this issue
Dec 20, 2014
izvolov
added a commit
that referenced
this issue
Jan 4, 2015
izvolov
added a commit
that referenced
this issue
Jan 4, 2015
izvolov
added a commit
that referenced
this issue
Jan 4, 2015
izvolov
added a commit
that referenced
this issue
Jan 8, 2015
izvolov
added a commit
that referenced
this issue
Aug 9, 2015
izvolov
added a commit
that referenced
this issue
Nov 18, 2015
izvolov
added a commit
that referenced
this issue
Dec 24, 2015
izvolov
added a commit
that referenced
this issue
Dec 25, 2015
izvolov
added a commit
that referenced
this issue
Dec 25, 2015
izvolov
added a commit
that referenced
this issue
Dec 25, 2015
izvolov
added a commit
that referenced
this issue
Jan 2, 2016
izvolov
added a commit
that referenced
this issue
Jan 2, 2016
izvolov
added a commit
that referenced
this issue
Dec 13, 2016
izvolov
added a commit
that referenced
this issue
Oct 22, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
В случае, если диапазоны, из которых формируется итератор склейки, — произвольного доступа, — можно и сам итератор склейки сделать итератором произвольного доступа.
Для этого нужно внутри итератора склейки хранить два индекса — индекс текущего диапазона в массиве диапазонов и индекс элемента в текущем диапазоне.
Также можно завести переменную — количество элементов до конца склеенного диапазона. Тогда можно будет за O(1) вычислять расстояние между итераторами.
The text was updated successfully, but these errors were encountered: