pathcensus.core package

Submodules

pathcensus.core.graph module

Simple JIT-compiled graph class for calculating path census.

pathcensus.core.parallel module

Internal routines for path/cycle counting.

pathcensus.core.parallel.count_paths_parallel(graph: Graph, batch_size: int = 10, min_di: bool = True, shuffle: bool = True) Tuple[ndarray, ndarray][source]

Count paths and cycles using parallel algorithm.

Parameters
  • graph – Compiled pathcensus.core.graph.Graph instance.

  • batch_size – Number of edges processed in one batch. Usually should not be very large, but also cannot be too small. The default value often works quite well.

  • min_di – Should di < dj rule for iterating over edges be used. See pathcensus.PathCensus.count_paths() for details. Almost always should be set to True. The argument is used mostly for testing purposes.

  • shuffle – Should rows of the edge array be first reshuffled randomly. This often improves performance by decreasing the likelihood of concurrent accesses to the same elements of the edge array by different threads.

pathcensus.core.random module

Numba random number generator utilities.

pathcensus.core.random.set_numba_seed(seed: int) None[source]

Set seed for Numba random numbers generator.

pathcensus.core.types module

Core types used by compiled code.

Module contents