Skip to content

Commit 252b70a

Browse files
james-d-mitchellJoseph-Edwards
authored andcommitted
doc: remove "::" from the doc
1 parent 5be6d94 commit 252b70a

6 files changed

Lines changed: 31 additions & 14 deletions

File tree

docs/source/main-algorithms/todd-coxeter/class/common.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ implemented in all of the classes :any:`Congruence`, :any:`Kambites`,
2222

2323
.. automethod:: ToddCoxeter.generating_pairs
2424

25+
.. automethod:: ToddCoxeter.kind
26+
2527
.. automethod:: ToddCoxeter.number_of_classes
2628

29+
.. automethod:: ToddCoxeter.number_of_generating_pairs
30+
2731
.. automethod:: ToddCoxeter.presentation
2832

2933
.. automethod:: ToddCoxeter.reduce

src/bipart.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,8 @@ of blocks in this partition.
419419
return Blocks(*(x.left_blocks_no_checks()));
420420
},
421421
R"pbdoc(
422+
:sig=(self: Bipartition) -> Blocks:
423+
422424
Returns a copy of the left blocks of a bipartition.
423425
424426
The *left blocks* of a bipartition is the partition of
@@ -437,6 +439,8 @@ function returns a :any:`Blocks` object representing this partition.
437439
return Blocks(*(x.right_blocks_no_checks()));
438440
},
439441
R"pbdoc(
442+
:sig=(self: Bipartition) -> Blocks:
443+
440444
Returns a copy of the right blocks of a bipartition.
441445
442446
The *right blocks* of a bipartition is the partition of

src/cong-common.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ the congruence represented by an instance of :any:`{name}`.
11651165
"kind",
11661166
[](detail::CongruenceCommon const& self) { return self.kind(); },
11671167
R"pbdoc(
1168-
:sig=(self: detail::CongruenceCommon) -> congruence_kind:
1168+
:sig=(self: Congruence | Kambites | KnuthBendix | ToddCoxeter) -> congruence_kind:
11691169
11701170
The kind of the congruence (1- or 2-sided).
11711171
@@ -1181,10 +1181,11 @@ This function returns the kind of the congruence represented by ``self``. See
11811181
congruence_kind
11821182
)pbdoc");
11831183

1184+
// The following does not appear in the doc, this is intentional.
11841185
thing.def("internal_generating_pairs",
11851186
&detail::CongruenceCommon::internal_generating_pairs,
11861187
R"pbdoc(
1187-
:sig=(self: detail::CongruenceCommon) -> list[list[int]]:
1188+
:sig=(self: Congruence | Kambites | KnuthBendix | ToddCoxeter) -> list[list[int]]:
11881189
11891190
Returns the generating pairs of the congruence.
11901191
@@ -1206,7 +1207,7 @@ the derived class.
12061207
thing.def("number_of_generating_pairs",
12071208
&detail::CongruenceCommon::number_of_generating_pairs,
12081209
R"pbdoc(
1209-
:sig=(self: detail::CongruenceCommon) -> int:
1210+
:sig=(self: Congruence | Kambites | KnuthBendix | ToddCoxeter) -> int:
12101211
12111212
Returns the number of generating pairs.
12121213

src/knuth-bendix.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,21 @@ redundant in this way, then ``None`` is returned.
332332
)pbdoc");
333333

334334
// Documented above
335-
m.def("knuth_bendix_redundant_rule",
336-
[](Presentation<std::string> const& p, std::chrono::milliseconds t)
337-
-> std::optional<std::pair<std::string, std::string>> {
338-
auto it = knuth_bendix::redundant_rule(p, t);
339-
if (it != p.rules.cend()) {
340-
return std::make_pair(*it, *(it + 1));
341-
}
342-
return {};
343-
});
335+
m.def(
336+
"knuth_bendix_redundant_rule",
337+
[](Presentation<std::string> const& p, std::chrono::milliseconds t)
338+
-> std::optional<std::pair<std::string, std::string>> {
339+
auto it = knuth_bendix::redundant_rule(p, t);
340+
if (it != p.rules.cend()) {
341+
return std::make_pair(*it, *(it + 1));
342+
}
343+
return {};
344+
},
345+
// Signature required to avoid generating any doc
346+
R"pbdoc(
347+
:sig=(p: Presentation, t: datetime.timedelta) -> tuple[list[int], list[int]] | tuple[str, str] | None:
348+
:only-document-once:
349+
)pbdoc");
344350
} // bind_knuth_bendix
345351

346352
template <typename Word, typename Rewriter>

src/todd-coxeter-impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ The values in this enum can be used as the argument for
119119
should be performed.)pbdoc")
120120
.value(
121121
"hlt",
122+
// JDM couldn't get the links to work in the following doc string.
122123
ToddCoxeterImpl_::options::lookahead_style::hlt,
123-
R"pbdoc( The lookahead will be done in HLT style by following the paths labelled by every relation from every node in the range specified by lookahead_extent::full or lookahead_extent::partial.)pbdoc")
124+
R"pbdoc(The lookahead will be done in HLT style by following the paths labelled by every relation from every node in the range specified by ``options.lookahead_extent.full`` or ``options.lookahead_extent.partial``.)pbdoc")
124125
.value(
125126
"felsch",
126127
ToddCoxeterImpl_::options::lookahead_style::felsch,

src/word-graph.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,8 @@ every node is the source of an edge with every possible label.
963963
py::arg("first_node"),
964964
py::arg("last_node"),
965965
R"pbdoc(
966-
Check if every node in a range has exactly WordGraph::out_degree out-edges.
966+
Check if every node in a range has exactly :any:`WordGraph.out_degree`
967+
out-edges.
967968
968969
This function returns ``True`` if every node in the range defined by
969970
*first_node* and *last_node* is complete, meaning that every such node is

0 commit comments

Comments
 (0)