Skip to content

Commit 24b1394

Browse files
Prerak SinghPrerak Singh
authored andcommitted
bug fix
1 parent 4036995 commit 24b1394

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

pydatastructs/graphs/meson.build

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ python.install_sources(
1919
py_include = include_directories('../utils/_backend/cpp')
2020

2121
python.extension_module(
22-
'_graph',
23-
'_backend/cpp/graph.cpp',
24-
include_directories: py_include,
22+
'_nodes',
23+
'_backend/cpp/nodes.cpp',
2524
install: true,
26-
subdir: 'pydatastructs/graphs/_backend/cpp'
25+
subdir: 'pydatastructs/utils/_backend/cpp'
2726
)
2827

2928
python.extension_module(
30-
'_algorithms',
31-
'_backend/cpp/algorithms.cpp',
32-
include_directories: py_include,
29+
'_graph_utils',
30+
'_backend/cpp/graph_utils.cpp',
3331
install: true,
34-
subdir: 'pydatastructs/graphs/_backend/cpp'
32+
subdir: 'pydatastructs/utils/_backend/cpp'
3533
)
3634

3735
subdir('tests')

pydatastructs/utils/__init__.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55
testing_util,
66
)
77

8+
from ._backend.cpp import _graph_utils
9+
10+
AdjacencyListGraphNode = _graph_utils.AdjacencyListGraphNode
11+
AdjacencyMatrixGraphNode = _graph_utils.AdjacencyMatrixGraphNode
12+
GraphNode = _graph_utils.GraphNode
13+
GraphEdge = _graph_utils.GraphEdge
14+
815
from .misc_util import (
916
TreeNode,
1017
MAryTreeNode,
1118
LinkedListNode,
1219
BinomialTreeNode,
13-
AdjacencyListGraphNode,
14-
AdjacencyMatrixGraphNode,
15-
GraphEdge,
1620
Set,
1721
CartesianTreeNode,
1822
RedBlackTreeNode,
@@ -25,5 +29,11 @@
2529
)
2630
from .testing_util import test
2731

32+
__all__.extend([
33+
'AdjacencyListGraphNode',
34+
'AdjacencyMatrixGraphNode',
35+
'GraphNode',
36+
'GraphEdge',
37+
])
2838
__all__.extend(misc_util.__all__)
2939
__all__.extend(testing_util.__all__)

0 commit comments

Comments
 (0)