@@ -122,6 +122,7 @@ This function returns the index of the child of the node with index
122122 &AhoCorasick::height,
123123 py::arg (" i" ),
124124 R"pbdoc(
125+ :sig=(self: AhoCorasick, i: int) -> int:
125126Calculate the height of a node.
126127
127128:param i: the index of the node whose height is sought
@@ -171,6 +172,8 @@ This function Returns the number of nodes in the trie.
171172 py::overload_cast<index_type>(&AhoCorasick::signature, py::const_),
172173 py::arg (" i" ),
173174 R"pbdoc(
175+ :sig=(self: AhoCorasick, i: int) -> list[int]:
176+
174177Find the signature of a node
175178
176179Return the the signature of the node with index *i*. Recall that the
@@ -190,6 +193,8 @@ the unique path from the root to :math:`n`.
190193 &AhoCorasick::suffix_link,
191194 py::arg (" current" ),
192195 R"pbdoc(
196+ :sig=(self: AhoCorasick, current: int) -> int:
197+
193198Calculate the index of the suffix link of a node.
194199
195200Calculate the index of a suffix link of a node. Recall that the *suffix link* of
@@ -215,6 +220,8 @@ the longest proper suffix of :math:`W` contained in the trie.
215220 py::arg (" current" ),
216221 py::arg (" a" ),
217222 R"pbdoc(
223+ :sig=(self: AhoCorasick, current: int, a: int) -> int:
224+
218225Traverse the trie using suffix links where necessary.
219226
220227This function traverses the trie using suffix links where necessary, behaving
@@ -244,6 +251,8 @@ trie.
244251 &AhoCorasick::throw_if_node_index_not_active,
245252 py::arg (" i" ),
246253 R"pbdoc(
254+ :sig=(self: AhoCorasick, i: int) -> None:
255+
247256Check if an index corresponds to a node currently in the trie.
248257
249258:param i: the index to validate
@@ -262,6 +271,8 @@ Check if an index corresponds to a node currently in the trie.
262271 &AhoCorasick::throw_if_node_index_out_of_range,
263272 py::arg (" i" ),
264273 R"pbdoc(
274+ :sig=(self: AhoCorasick, i: int) -> None:
275+
265276Check if an index corresponds to a node.
266277
267278This function checks if the given index *i* corresponds to the index of a
@@ -286,13 +297,18 @@ node; either active or inactive.
286297 },
287298 py::arg (" i" ),
288299 R"pbdoc(
300+ :sig=(self: AhoCorasick, i: int) -> bool:
301+
289302Check if a node is terminal (by index).
290303
291304This function checks if the node with index *i* is terminal or not.
292305
293306:param i: the index.
294307:type i: int
295308
309+ :returns: Whether or not the node is terminal
310+ :rtype: bool
311+
296312:raises LibsemigroupsError:
297313 if *i* does not correspond to the index of a node; that is, if *i* is
298314 larger than the size of the container storing the indices of nodes.
0 commit comments