Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
74672c6
order: add support for LenLexCmp
james-d-mitchell Aug 17, 2026
283d91e
order: support RPOCmp
codex Aug 17, 2026
1d77799
order: support RevRPOCmp
codex Aug 17, 2026
f7c892c
order: support RevLexCmp
codex Aug 17, 2026
2685ab6
order: support RevLenLexCmp
codex Aug 17, 2026
881f7a7
order: support WrCmp
codex Aug 17, 2026
3279885
order: support RevWrCmp
codex Aug 17, 2026
584149d
order: support WtLenLexCmp
codex Aug 17, 2026
09d7136
order: support RevWtLenLexCmp
codex Aug 17, 2026
01762eb
order: support WtLexCmp
codex Aug 17, 2026
9207b37
order: support RevWtLexCmp
codex Aug 17, 2026
fe10bac
order: support LenWtLexCmp
codex Aug 17, 2026
050e8dc
order: support RevLenWtLexCmp
codex Aug 17, 2026
db10e1d
dnr: disable lint warning
james-d-mitchell Aug 19, 2026
da59f43
order: reorg file
james-d-mitchell Aug 19, 2026
f5b6c08
Doc fixes
james-d-mitchell Aug 19, 2026
50cef20
order: final doc fixes
james-d-mitchell Aug 19, 2026
dd53aad
Suppress lint warning
james-d-mitchell Aug 19, 2026
427d276
Updates from code review
james-d-mitchell Aug 20, 2026
80961a0
order: doc further improve the wording
james-d-mitchell Aug 20, 2026
fde8a42
order: remove unused header
james-d-mitchell Aug 20, 2026
767976a
order: reorganise tests
codex Aug 20, 2026
2dd6a3b
Apply suggestions from code review
james-d-mitchell Aug 20, 2026
7013125
Format + lint
james-d-mitchell Aug 20, 2026
6386af0
order: allow strings for all Default Cmp structs
codex Aug 20, 2026
ea43b3d
order: remove deprecated enum value from doctest
james-d-mitchell Aug 20, 2026
ae2663e
lint + format
james-d-mitchell Aug 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions docs/source/data-structures/order/functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
..
Copyright (c) 2026 Joseph Edwards, J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

Functions for orders
====================

This page contains the documentation for functions that compare lists of
integers ``list[int]`` or strings ``str`` with respect to certain reduction
orderings.

.. important::

The following functions are deprecated in v1.5.0 and will be removed v2.0.0:

* ``lexicographical_compare``, please use :any:`lex_cmp` instead.
* ``recursive_path_compare`` please use :any:`rev_rpo_cmp` instead.
* ``shortlex_compare`` please use :any:`lenlex_cmp` instead.

Contents
--------

.. autosummary::
:signatures: short

len_wt_lex_cmp
lenlex_cmp
lex_cmp
rev_len_wt_lex_cmp
rev_lenlex_cmp
rev_lex_cmp
rev_rpo_cmp
rev_wr_cmp
rev_wt_lenlex_cmp
rev_wt_lex_cmp
rpo_cmp
wr_cmp
wt_lenlex_cmp
wt_lex_cmp

Full API
--------

.. autofunction:: len_wt_lex_cmp

.. autofunction:: lenlex_cmp

.. autofunction:: lex_cmp

.. autofunction:: rev_len_wt_lex_cmp

.. autofunction:: rev_lenlex_cmp

.. autofunction:: rev_lex_cmp

.. autofunction:: rev_rpo_cmp

.. autofunction:: rev_wr_cmp

.. autofunction:: rev_wt_lenlex_cmp

.. autofunction:: rev_wt_lex_cmp

.. autofunction:: rpo_cmp

.. autofunction:: wr_cmp

.. autofunction:: wt_lenlex_cmp

.. autofunction:: wt_lex_cmp
85 changes: 24 additions & 61 deletions docs/source/data-structures/order/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,33 @@
Orders
======

This page contains the documentation for several functions for comparing words
or strings with respect to certain reduction orderings.
This page contains the documentation for classes and several functions for
comparing words (i.e. lists of integers ``list[int]`` or strings ``str``) with
respect to certain reduction orderings.

.. seealso::

- :any:`Order`
- :any:`Alphabet`

.. important::

The following functions are deprecated in v1.5.0 and will be removed v2.0.0:

* ``lexicographical_compare``, please use :any:`lex_cmp` instead.
* ``recursive_path_compare`` please use :any:`rev_rpo_cmp` instead.
* ``shortlex_compare`` please use :any:`lenlex_cmp` instead.

Contents
--------

.. autosummary::
:signatures: short

len_wt_lex_cmp
lenlex_cmp
lex_cmp
rev_len_wt_lex_cmp
rev_lenlex_cmp
rev_lex_cmp
rev_rpo_cmp
rev_wr_cmp
rev_wt_lenlex_cmp
rev_wt_lex_cmp
rpo_cmp
wr_cmp
wt_lenlex_cmp
wt_lex_cmp

Full API
--------

.. autofunction:: len_wt_lex_cmp

.. autofunction:: lenlex_cmp

.. autofunction:: lex_cmp

.. autofunction:: rev_len_wt_lex_cmp

.. autofunction:: rev_lenlex_cmp

.. autofunction:: rev_lex_cmp

.. autofunction:: rev_rpo_cmp

.. autofunction:: rev_wr_cmp

.. autofunction:: rev_wt_lenlex_cmp

.. autofunction:: rev_wt_lex_cmp

.. autofunction:: rpo_cmp

.. autofunction:: wr_cmp

.. autofunction:: wt_lenlex_cmp

.. autofunction:: wt_lex_cmp
The classes and functions in ``libsemigroups_pybind11`` for comparing words
are described on the following pages:

.. toctree::
:maxdepth: 1

lex-cmp
rev-lex-cmp
lenlex-cmp
rev-lenlex-cmp
rpo-cmp
rev-rpo-cmp
wr-cmp
rev-wr-cmp
wt-lenlex-cmp
rev-wt-lenlex-cmp
wt-lex-cmp
rev-wt-lex-cmp
len-wt-lex-cmp
rev-len-wt-lex-cmp
functions
35 changes: 35 additions & 0 deletions docs/source/data-structures/order/len-wt-lex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The LenWtLexCmp class
=====================

.. autoclass:: LenWtLexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~LenWtLexCmp
LenWtLexCmp.__call__
LenWtLexCmp.alphabet
LenWtLexCmp.copy
LenWtLexCmp.init
LenWtLexCmp.weights

Full API
--------

.. autoclass:: LenWtLexCmp
:class-doc-from: init
:special-members: __call__
:members:
34 changes: 34 additions & 0 deletions docs/source/data-structures/order/lenlex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The LenLexCmp class
===================

.. autoclass:: LenLexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~LenLexCmp
LenLexCmp.__call__
LenLexCmp.alphabet
LenLexCmp.copy
LenLexCmp.init

Full API
--------

.. autoclass:: LenLexCmp
:class-doc-from: init
:special-members: __call__
:members:
34 changes: 34 additions & 0 deletions docs/source/data-structures/order/lex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The LexCmp class
================

.. autoclass:: LexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~LexCmp
LexCmp.__call__
LexCmp.alphabet
LexCmp.copy
LexCmp.init

Full API
--------

.. autoclass:: LexCmp
:class-doc-from: init
:special-members: __call__
:members:
35 changes: 35 additions & 0 deletions docs/source/data-structures/order/rev-len-wt-lex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The RevLenWtLexCmp class
========================

.. autoclass:: RevLenWtLexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~RevLenWtLexCmp
RevLenWtLexCmp.__call__
RevLenWtLexCmp.alphabet
RevLenWtLexCmp.copy
RevLenWtLexCmp.init
RevLenWtLexCmp.weights

Full API
--------

.. autoclass:: RevLenWtLexCmp
:class-doc-from: init
:special-members: __call__
:members:
34 changes: 34 additions & 0 deletions docs/source/data-structures/order/rev-lenlex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The RevLenLexCmp class
======================

.. autoclass:: RevLenLexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~RevLenLexCmp
RevLenLexCmp.__call__
RevLenLexCmp.alphabet
RevLenLexCmp.copy
RevLenLexCmp.init

Full API
--------

.. autoclass:: RevLenLexCmp
:class-doc-from: init
:special-members: __call__
:members:
34 changes: 34 additions & 0 deletions docs/source/data-structures/order/rev-lex-cmp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
..
Copyright (c) 2026 J. D. Mitchell

Distributed under the terms of the GPL license version 3.

The full license is in the file LICENSE, distributed with this software.

.. currentmodule:: libsemigroups_pybind11

The RevLexCmp class
===================

.. autoclass:: RevLexCmp
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~RevLexCmp
RevLexCmp.__call__
RevLexCmp.alphabet
RevLexCmp.copy
RevLexCmp.init

Full API
--------

.. autoclass:: RevLexCmp
:class-doc-from: init
:special-members: __call__
:members:
Loading
Loading