Skip to content

Commit 33eedc2

Browse files
paths: update for fixes in libsemigroups
1 parent 935532e commit 33eedc2

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/knuth-bendix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ construct *kb*. This function triggers a full enumeration of *kb*.
207207
>>> kb = KnuthBendix(congruence_kind.twosided, p)
208208
>>> kb.number_of_classes()
209209
+∞
210-
>>> list(knuth_bendix.normal_forms(kb).min(1).max(3))
210+
>>> list(knuth_bendix.normal_forms(kb).min(1).max(2))
211211
['a', 'b', 'c', 'aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']
212212
)pbdoc");
213213

src/paths.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ length in a given range.
684684
size_t min,
685685
int_or_constant<size_t> max,
686686
paths::algorithm algrthm) {
687-
return number_of_paths(wg, source, target, min, to_int<size_t>(max));
687+
return number_of_paths(
688+
wg, source, target, min, to_int<size_t>(max), algrthm);
688689
},
689690
py::arg("wg"),
690691
py::arg("source"),

tests/test_paths.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,22 @@ def test_paths_number_of_paths():
140140
assert paths.number_of_paths_algorithm(wg, 0) == paths.algorithm.acyclic
141141
assert paths.number_of_paths(wg, 0) == POSITIVE_INFINITY
142142
# source, min, max
143-
assert paths.number_of_paths(wg, 0, 0, 10) == 1023
143+
assert paths.number_of_paths(wg, 0, 0, 9) == 1023
144144
# source, target, min, max
145-
assert paths.number_of_paths(wg, 0, 1, 0, 10) == 511
145+
assert paths.number_of_paths(wg, 0, 1, 0, 9) == 511
146146

147147
assert paths.number_of_paths_algorithm(wg, 1) == paths.algorithm.acyclic
148148
assert paths.number_of_paths(wg, 1) == POSITIVE_INFINITY
149149
# source, min, max
150-
assert paths.number_of_paths(wg, 1, 0, 10) == 1023
150+
assert paths.number_of_paths(wg, 1, 0, 9) == 1023
151151
assert paths.number_of_paths(wg, 1, 0, POSITIVE_INFINITY) == POSITIVE_INFINITY
152152

153153
assert paths.number_of_paths_algorithm(wg, 2) == paths.algorithm.acyclic
154-
assert paths.number_of_paths_algorithm(wg, 2, 0, 10) == paths.algorithm.dfs
154+
assert paths.number_of_paths_algorithm(wg, 2, 0, 9) == paths.algorithm.dfs
155155
assert paths.number_of_paths_algorithm(wg, 2, 0, POSITIVE_INFINITY) == paths.algorithm.trivial
156156
assert paths.number_of_paths(wg, 2) == POSITIVE_INFINITY
157157
# source, min, max
158-
assert paths.number_of_paths(wg, 2, 0, 10) == 10
158+
assert paths.number_of_paths(wg, 2, 0, 9) == 10
159159
assert (
160-
paths.number_of_paths_algorithm(wg, 2, 2, 10, POSITIVE_INFINITY) == paths.algorithm.trivial
160+
paths.number_of_paths_algorithm(wg, 2, 2, 9, POSITIVE_INFINITY) == paths.algorithm.trivial
161161
)

0 commit comments

Comments
 (0)