From 92987101ea56d1ba34a8f41b4752253aae04ec9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1nchez=20Yal=C3=AD?= Date: Thu, 23 Nov 2023 20:49:26 -0500 Subject: [PATCH] update readme --- README.md | 4 +- docs/index.rst | 119 +++++++++++++++++++++++++++++---- logo/{logo.svg => heading.svg} | 0 3 files changed, 107 insertions(+), 16 deletions(-) rename logo/{logo.svg => heading.svg} (100%) diff --git a/README.md b/README.md index d53e4a5..6a33481 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
- Logo + Logo @@ -105,5 +105,5 @@ If this library was useful to you in your research, please cite us. Following th ### APA ``` -Sánchez, A. (2023). Zmodn: Efficient Modulo Arithmetic with NumPy. +Sánchez, A. (2023). Zmodn: Efficient Modulo Arithmetic with NumPy. [Computer software]. https://github.com/asanchezyali/Zmodn ``` diff --git a/docs/index.rst b/docs/index.rst index 9b8f97b..5271782 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,20 +1,111 @@ -.. Zmodn documentation master file, created by - sphinx-quickstart on Thu Nov 23 16:31:16 2023. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. +.. image:: ../logo/heading.svg + :align: center -Welcome to Zmodn's documentation! -================================= +The :obj:`zmodn` package provides a class for representing integers modulo a given positive integer. This class can be used to applications such as cryptography and computer algebra. It is designed to be easy to use, and to provide a simple interface for working with modular arithmetic. -.. toctree:: - :maxdepth: 2 - :caption: Contents: +Features +-------- + +- Perform arithmetic operations (addition, subtraction, multiplication, division, power) on integers modulo a given positive integer. +- Compute the modular inverse of an integer modulo a given positive integer. +- Compute the inverse of a square matrix modulo a given positive integer. +- Compare two integers modulo a given positive integer. +- Access and modify the representatives of an integer modulo a given positive integer. + +Installation +------------ +The :obj:`zmodn` package can be installed using `pip `_. + +.. code-block:: bash + + $ pip install zmodn + +Basic Usage +----------- + +Here is a simple example of how to use Zmodn: + +.. code-block:: python + + import numpy as np + from zmodn import Zmodn + + # Create a Zmodn object with the representatives 2 and 3 modulo 5 + zmodn = Zmodn([2, 3], 5) + + # Add two Zmodn objects + zmodn_sum = zmodn + Zmodn([1, 4], 5) + + # Subtract two Zmodn objects + zmodn_difference = zmodn - Zmodn([1, 4], 5) + + # Multiply two Zmodn objects + zmodn_product = zmodn * Zmodn([1, 4], 5) + + # Divide two Zmodn objects + zmodn_quotient = zmodn / Zmodn([1, 4], 5) + + # Compute the modular inverse of a Zmodn object + zmodn_inverse = zmodn.mod_inv() + +Documentation +------------- + +For more detailed information about the features and usage of :obj:`zmodn`, please refer to the documentation. +License +------- +:obj:`zmodn` is licensed under the terms of the MIT license. See the license file for details. +Contact +------- -Indices and tables -================== +If you have any questions, comments, or issues, please feel free to contact us. -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +Contributing +------------ + +We welcome contributions to :obj:`zmodn` library! If you have an idea for a new feature or improvement, please feel free to create an issue or submit a pull request. + +To contribute to the :obj:`zmodn` library, you will need to: + +1. Fork the repository. +2. Create a new branch for your changes. +3. Make your changes to the code. +4. Add tests to ensure that your changes work correctly. +5. Push your branch to the fork. +6. Create a pull request to merge your changes into the main repository. +7. Please be sure to follow the coding style guide and add documentation for any new features or changes that you make. + +We appreciate your contributions to the zmodn library! + + +Citation +-------- + +If this library was useful to you in your research, please cite us. Following the `GitHub citation standards `_, here is the recommended citation. + +.. md-tab-set:: + + .. md-tab-item:: BibTeX + + .. code-block:: latex + + @software{Sanchez_Alejandro_2020, + title = {{Zmodn}: Efficient Modulo Arithmetic with NumPy}, + author = {Sánchez, Alejandro}, + month = {11}, + year = {2023}, + url = {https://github.com/asanchezyali/Zmodn}, + } + + .. md-tab-item:: APA + + .. code-block:: text + + Sánchez, A. (2023). Zmodn: Efficient Modulo Arithmetic with NumPy. [Computer software]. https://github.com/asanchezyali/Zmodn + + +.. toctree:: + :maxdepth: 2 + :caption: Contents: diff --git a/logo/logo.svg b/logo/heading.svg similarity index 100% rename from logo/logo.svg rename to logo/heading.svg