Skip to content

nk_graph

NKGraph

Base class for networkit-based graph algorithms.

const_weights = None instance-attribute

dgm_graph = dgm_graph instance-attribute

directed = False instance-attribute

nk_graph = None instance-attribute

weighted = False instance-attribute

__init__(dgm_graph)

build()

Build networkit graph based on dgm graph.

set_const_weights(const_weights)

Sets a constant weight for each edge in the graph.

Parameters:

Name Type Description Default
const_weights number

Constant weights.

required

set_directed()

Sets if the networkkit graph is directed.

set_number_of_threads(number_of_threads)

Set number of threads used by Networkit.

Parameters:

Name Type Description Default
number_of_threads int

Number of threads.

required

set_weighted()

Sets if the networkkit graph can have edge weights not equal to 1.