algorithm
Algorithm
Bases: ABC, PropertyMixin
Base class for graph algorithms implementation. Intended for use by a backend (third party) library as the basis for algorithmic solutions.
Before applying algorithms from the library, it is necessary to create an internal graph representation that will meet the requirements of the library.
run()
abstractmethod
Run algorithm.
NKAlgorithm
Bases: Algorithm, ABC
Abstract base class for running networkit-based algorithms.
graph = graph.dgm_graph
instance-attribute
nk_graph = graph.nk_graph
instance-attribute
__init__(graph)
Pass either a preconfigured dgm.graph.NKGraph or a Networkit graph. Alternatively, you can pas a dgm.graph.Graph and a networkit graph will be created using a default template.
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 |