Skip to content

Commit 4a4d293

Browse files
committed
feat: add igraph_rewiring_stats_t
1 parent 27e848b commit 4a4d293

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/codegen/internal_lib.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ from .types import (
4444
igraph_isocompat_t,
4545
igraph_isohandler_t,
4646
igraph_plfit_result_t,
47+
igraph_rewiring_stats_t,
4748
igraph_rng_t,
4849
igraph_rng_type_t,
4950
igraph_warning_handler_t,

src/igraph_ctypes/_internal/lib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
igraph_isocompat_t,
4545
igraph_isohandler_t,
4646
igraph_plfit_result_t,
47+
igraph_rewiring_stats_t,
4748
igraph_rng_t,
4849
igraph_rng_type_t,
4950
igraph_warning_handler_t,
@@ -1131,7 +1132,7 @@ def _load_libc():
11311132

11321133
igraph_rewire = _lib.igraph_rewire
11331134
igraph_rewire.restype = handle_igraph_error_t
1134-
igraph_rewire.argtypes = [POINTER(igraph_t), igraph_int_t, igraph_edge_type_sw_t, POINTER(igraph_t)]
1135+
igraph_rewire.argtypes = [POINTER(igraph_t), igraph_int_t, igraph_edge_type_sw_t, POINTER(igraph_rewiring_stats_t)]
11351136

11361137
igraph_induced_subgraph = _lib.igraph_induced_subgraph
11371138
igraph_induced_subgraph.restype = handle_igraph_error_t

src/igraph_ctypes/_internal/types.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,17 @@ class igraph_plfit_result_t(Structure):
399399
]
400400

401401

402+
class igraph_rewiring_stats_t(Structure):
403+
"""ctypes representation of an ``igraph_rewiring_stats_t`` object"""
404+
405+
_fields_ = [
406+
("successful_swaps", igraph_int_t),
407+
("_unused1", igraph_int_t),
408+
("_unused2", igraph_int_t),
409+
("_unused3", igraph_int_t),
410+
]
411+
412+
402413
igraph_rng_state_t = c_void_p
403414

404415

0 commit comments

Comments
 (0)