Top "Iterator" questions

An iterator is an object-oriented programming pattern that allows traversal through a collection, agnostic of the actual implementation or object addresses in physical memory.

"On-line" (iterator) algorithms for estimating statistical median, mode, skewness, kurtosis?

Is there an algorithm to estimate the median, mode, skewness, and/or kurtosis of set of values, but that does …

algorithm statistics iterator median
Iterating over a container of unique_ptr's

How does one access unique_ptr elements of a container (via an iterator) without taking ownership away from the container? …

c++ iterator containers unique-ptr
When to use or not use iterator() in the django ORM

This is from the django docs on the queryset iterator() method: A QuerySet typically caches its results internally so that …

python django orm iterator django-queryset
How do I iterate over an entire MongoDB collection using mongojs?

I'm using mongojs and I'm trying to iterate over all elements in a collection index = 0 db.keys.find({}, {uid: 1, _id: 0}).…

javascript mongodb coffeescript iterator mongojs
Why does defining __getitem__ on a class make it iterable in python?

Why does defining __getitem__ on a class make it iterable? For instance if I write: class b: def __getitem__(self, …

python iterator overloading
How can I traverse a file system with a generator?

I'm trying to create a utility class for traversing all the files in a directory, including those within subdirectories and …

python recursion iterator generator yield
How to traverse/iterate a Dataset in Spark Java?

I am trying to traverse a Dataset to do some string similarity calculations like Jaro winkler or Cosine Similarity. I …

java apache-spark iterator apache-spark-2.0 apache-spark-dataset
What's the use of yield break?

Possible Duplicate: What does “yield break;” do in C#? Can anyone see a use for the "yield break" statement that …

c# yield iterator
Find element position in a Java TreeMap

I am working with a TreeMap of Strings TreeMap<String, String>, and using it to implement a Dictionay …

java dictionary iterator treemap sortedmap
How to Iterate Through Values in Properties File in Java

so I was wondering if anyone knew how I would go about reading in mutliple values from a key, delimiting …

java properties iterator arraylist delimited-text