Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/custom-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: |
git clone --depth 1 --branch ${{ inputs.branch }} https://github.com/${{ inputs.fork }}.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-eigen && sudo make install -j8
ccache -s

# Build libsemigroups_pybind11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-eigen && sudo make install -j8
ccache -s

# Build libsemigroups_pybind11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: |
git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-eigen && sudo make install -j8
ccache -s

# Build libsemigroups_pybind11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-eigen && sudo make install -j8
ccache -s

# Build libsemigroups_pybind11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
git clone --depth 1 --branch main https://github.com/libsemigroups/libsemigroups.git
cd libsemigroups
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-hpcombi && sudo make install -j8
./autogen.sh && ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" --disable-eigen && sudo make install -j8
ccache -s

# Build libsemigroups_pybind11
Expand Down
11 changes: 10 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import sys
from pathlib import Path

from libsemigroups_pybind11 import LIBSEMIGROUPS_HPCOMBI_ENABLED

########################################################################
# sphinx options
########################################################################
Expand Down Expand Up @@ -155,6 +157,7 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.ifconfig",
"sphinxcontrib.bibtex",
"sphinx_copybutton",
"sphinx.ext.doctest",
Expand Down Expand Up @@ -193,9 +196,15 @@

############ intersphinx ############

# Thhe locations and names of other projects that should be linked to in this
# The locations and names of other projects that should be linked to in this
# documentation.
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}


def setup(app):
"""Function to import LIBSEMIGROUPS_HPCOMBI_ENABLED macro from
libsemigroups"""
app.add_config_value("LIBSEMIGROUPS_HPCOMBI_ENABLED", LIBSEMIGROUPS_HPCOMBI_ENABLED, "env")
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ This page describes the functionality for various partial transformations in
pperm
transf
helpers

.. ifconfig:: LIBSEMIGROUPS_HPCOMBI_ENABLED

See also :any:`hpcombi.PTransf16`.
41 changes: 41 additions & 0 deletions docs/source/data-structures/hpcombi/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
..
Copyright (c) 2021-2024 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

HPCombi
=======

This page describes the functionality from ``HPCombi`` available in
``libsemigroups_pybind11``. This functionality is only available if
:any:`LIBSEMIGROUPS_HPCOMBI_ENABLED` is ``True``.

.. py:attribute:: LIBSEMIGROUPS_HPCOMBI_ENABLED
:type: bool

This variable indicates whether or not the version of ``libsemigroups``
being used by ``libsemigroups_pybind11`` was compiled with ``HPCombi``
enabled.

.. ifconfig:: LIBSEMIGROUPS_HPCOMBI_ENABLED

.. toctree::
:maxdepth: 1

perm16
pperm16
ptransf16
transf16
vect16

.. ifconfig:: not LIBSEMIGROUPS_HPCOMBI_ENABLED

.. warning::

It appears that the version of ``libsemigroups`` used with
``libsemigroups_pybind11`` was not compiled with ``HPCombi`` enabled
and so none of the functionality of ``HPCombi`` is available.
66 changes: 66 additions & 0 deletions docs/source/data-structures/hpcombi/perm16.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
..
Copyright (c) 2025 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.hpcombi

The Perm16 class
================

.. ifconfig:: not LIBSEMIGROUPS_HPCOMBI_ENABLED

.. warning::

It appears that the version of ``libsemigroups`` used with
``libsemigroups_pybind11`` was not compiled with ``HPCombi`` enabled
and so none of the functionality of ``HPCombi`` is available.

.. ifconfig:: LIBSEMIGROUPS_HPCOMBI_ENABLED

.. autoclass:: Perm16
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~Perm16
Perm16.copy
Perm16.cycles_partition
Perm16.elementary_transposition
Perm16.inverse
Perm16.inverse_arr
Perm16.inverse_cycl
Perm16.inverse_find
Perm16.inverse_pow
Perm16.inverse_ref
Perm16.inverse_sort
Perm16.left_weak_leq
Perm16.left_weak_leq_length
Perm16.left_weak_leq_ref
Perm16.lehmer
Perm16.lehmer_arr
Perm16.lehmer_ref
Perm16.length
Perm16.length_arr
Perm16.length_ref
Perm16.nb_cycles
Perm16.nb_cycles_ref
Perm16.nb_cycles_unroll
Perm16.nb_descents
Perm16.nb_descents_ref
Perm16.one
Perm16.unrankSJT
Perm16.validate

Full API
--------

.. autoclass:: Perm16
:class-doc-from: init
:members:
37 changes: 37 additions & 0 deletions docs/source/data-structures/hpcombi/pperm16.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
..
Copyright (c) 2025 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.hpcombi

The PPerm16 class
=================

.. ifconfig LIBSEMIGROUPS_HPCOMBI_ENABLED

.. autoclass:: PPerm16
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~PPerm16
PPerm16.copy
PPerm16.inverse_ref
PPerm16.left_one
PPerm16.one
PPerm16.right_one
PPerm16.validate

Full API
--------

.. autoclass:: PPerm16
:class-doc-from: init
:members:
51 changes: 51 additions & 0 deletions docs/source/data-structures/hpcombi/ptransf16.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
..
Copyright (c) 2025 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.hpcombi

The PTransf16 class
===================

.. ifconfig LIBSEMIGROUPS_HPCOMBI_ENABLED

.. autoclass:: PTransf16
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~PTransf16
PTransf16.copy
PTransf16.domain_bitset
PTransf16.domain_mask
PTransf16.fix_points_bitset
PTransf16.fix_points_mask
PTransf16.image_bitset
PTransf16.image_mask
PTransf16.image_mask_ref
PTransf16.largest_fix_point
PTransf16.largest_moved_point
PTransf16.left_one
PTransf16.nb_fix_points
PTransf16.one
PTransf16.rank
PTransf16.rank_cmpestrm
PTransf16.rank_ref
PTransf16.right_one
PTransf16.smallest_fix_point
PTransf16.smallest_moved_point
PTransf16.validate

Full API
--------

.. autoclass:: PTransf16
:class-doc-from: init
:members:
34 changes: 34 additions & 0 deletions docs/source/data-structures/hpcombi/transf16.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
..
Copyright (c) 2025 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.hpcombi

The Transf16 class
==================

.. ifconfig LIBSEMIGROUPS_HPCOMBI_ENABLED

.. autoclass:: Transf16
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~Transf16
Transf16.copy
Transf16.one
Transf16.validate

Full API
--------

.. autoclass:: Transf16
:class-doc-from: init
:members:
43 changes: 43 additions & 0 deletions docs/source/data-structures/hpcombi/vect16.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
..
Copyright (c) 2025 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.hpcombi

The Vect16 class
================

.. ifconfig LIBSEMIGROUPS_HPCOMBI_ENABLED

.. autoclass:: Vect16
:doc-only:

Contents
--------

.. autosummary::
:signatures: short

~Vect16
Vect16.copy
Vect16.eval16
Vect16.first_diff
Vect16.first_non_zero
Vect16.first_zero
Vect16.is_permutation
Vect16.last_diff
Vect16.last_non_zero
Vect16.last_zero
Vect16.less_partial
Vect16.partial_sums
Vect16.sum

Full API
--------

.. autoclass:: Vect16
:class-doc-from: init
:members:
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ We would like to thank the authors and contributors of these projects!
data-structures/constants/index
data-structures/elements/index
data-structures/enums/index
data-structures/hpcombi/index
data-structures/order/index
data-structures/presentations/index
data-structures/suffix-trees/index
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
library_dirs=libsemigroups_info["library_dirs"],
language="c++",
libraries=["semigroups"],
extra_compile_args=["-fpermissive", "-flax-vector-conversions"],
)
]

Expand Down
Loading
Loading