Generators & Iterators
Most of the time, these generators are used internally, if you want to extend Condorcet (like creating a new Vote Method). Because they can work transparently with billions of votes and their external data handler. But for most use, you prefer working with a native array in memory. However, they are in the public API and can be used similarly to classical method.
Election->getVotesListGenerator()
Election->getVotesValidUnderConstraintGenerator()
Election->getVotesList()
// Works exactly as $election->getVotesList() but returns a generator instead. Provide the same objects and logic.
$election->getVotesListGenerator();
// Works exactly as $election->getVotesList() with an additional filter of invalid votes under constraints. It's returning a generator instead. Provide the same objects and logic.
$election->getVotesValidUnderConstraintGenerator(); // It's also the favorite method for voting method modules implementation.