Skip to content

Add seed and thread related APIs #5

Description

@adsharma

The current wrapper is narrowly targeting pagerank and community detection.

It's missing a few things that the python API supports such as:

import networkit as nk

# Thread count (OpenMP threads used by all parallel algorithms)
nk.setNumberOfThreads(8)          # set to desired count
nk.getMaxNumberOfThreads()        # check how many cores are available
nk.getCurrentNumberOfThreads()    # check what's currently active

# Seed (NetworKit's global RNG, used by ParallelLeiden's randomize step)
nk.setSeed(42, False)
# second arg: whether to additionally mix in the thread id per-thread

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions