All Questions
Tagged with ienumerable or iterator
433 questions
1
vote
0
answers
60
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take IV
(See the previous iteration here.)
This time, I have incorporated the answer from YawarRaza7349.
Now, my code looks like this:
...
3
votes
3
answers
237
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take III
(See the next iteration here.)
(See the previous iteration here.)
This time, I have incorporated a nice answer from Simon Forsberg.
Now, my code looks like this:
...
1
vote
1
answer
70
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order, Take II
(See the previous iteration here.)
(See the next iteration here.)
This time, I improved the iterator such that there is no chance of numeric overflow when computing the total number of iterations. To ...
4
votes
1
answer
98
views
IndexTupleIterator.java: an iterator that generates index tuples in lexicographic order
(See the next iteration here.)
Intro
This time, I have an Iterator<List<Integer>> implementation that generates list index tuples in lexicographic order....
6
votes
2
answers
87
views
STL style iterator template for arbitrary trees in C++20
In different code bases I regularly encounter tree data structures of different design and usually need to traverse it at some point. I finally got tired of writing yet another iterative traversal by ...
3
votes
1
answer
143
views
Recursively iterate over every object in an object graph looking for specific types
I have an object graph which contains two types of objects that I care about:
Link objects that contain an ID and a reference to the object with that ID.
...
5
votes
1
answer
184
views
Odometer in Rust
I am trying to implement an odometer in Rust. This should a be an iterator that yields items of type [u16; N] and it should be generic over const ...
2
votes
3
answers
148
views
A dynamic array with an iterator compatible with std::sort
I wrote a Vector (dynamic array) class with an iterator usable with std::sort() . It seems to pass my tests.
I wondering about the issues one can spot on this ...
3
votes
0
answers
504
views
Iterate internal array for a VBA class
After spending a considerable amount of time poking at the internals of the Collection class, I have discovered 2 methods to iterate a private internal array within ...
1
vote
1
answer
406
views
Finding highly correlated variables in a dataframe by evaluating its correlation matrix's values
I read data from Excel into a Pandas DataFrame, so that every column represents a different variable, and every row represents a different sample. I made the function below to identify potential ...
4
votes
3
answers
198
views
Improving efficiency of Rust algorithm ported from Python generator
I'm learning Rust by solving ProjectEuler problems.
To this end, I am trying to port a solution to problem 88 (link) in Python that heavily relies on generators to Rust (which doesn't have generators)....
0
votes
1
answer
124
views
Extend iterators with until() function
I want to extend generic iterators with a convenience function until() that works like an inversion of take_while().
Here is the ...
4
votes
2
answers
204
views
Max Stack implementation in C++ involving iterators
The tricky thing was keeping copies of list iterators in a tree map and managing both together. I'm not handling invalid input cases (like popping an empty stack) in this code. I am following Google C+...
3
votes
2
answers
980
views
Convert Rankine temperatures to Celsius
I have this Python Package called ToTemp under development for precise Temperature Conversions and currently thinking in changing the method's implementation to be ...
4
votes
2
answers
579
views
2D Matrix in C++
I wanted to play with a two-dimensional generic data container in C++ and explore different methods of traversals: using closures and iterators. I'd like a review of it.
...