differt_core.rt.AllPathsFromCompleteGraphChunksIter

differt_core.rt.AllPathsFromCompleteGraphChunksIter#

class AllPathsFromCompleteGraphChunksIter#

Bases: object

An iterator over all paths in a complete graph, as array chunks.

Methods

count()

Count the number of elements in this iterator by consuming it.

Detailed documentation

count()#

Count the number of elements in this iterator by consuming it.

This is much faster that counting the number of elements using Python code.

Returns:

The number of elements that this iterator contains.

Return type:

int

Warning

This iterator provides len, which returns the current remaining length of this iterator, without consuming it, and will also be faster as it does not need to perform any iteration.