-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from oscarbenjamin/pr_generic_rings
Initial bindings for generic rings
- Loading branch information
Showing
23 changed files
with
4,499 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
**_gr** -- generic rings (unstable interface) | ||
=============================================================================== | ||
|
||
.. note:: | ||
This module provides a preliminary experimental interface for FLINT's | ||
generic rings. This is largely untested and the interface should be | ||
considered unstable. In future the generic rings code will be integrated | ||
with the rest of python-flint and this module may be removed. For now it | ||
provides access to many FLINT types that are not wrapped yet in the rest of | ||
python-flint. | ||
|
||
The generic rings module provides access to the generic rings interface in | ||
FLINT. Usage of this interface consists of creating a context object to | ||
represent a particular domain and then using that context object to create | ||
elements of that domain. For example to create a context for polynomials in two | ||
variables over the Gaussian integers :math:`\mathbb{Z}[i][x,y]` we would do:: | ||
|
||
>>> from flint.types._gr import gr_fmpzi_ctx, gr_gr_mpoly_ctx | ||
>>> ctx = gr_gr_mpoly_ctx.new(gr_fmpzi_ctx, ["x", "y"]) | ||
>>> ctx.gens() | ||
[x, y] | ||
>>> ctx.gens_recursive() | ||
[I, x, y] | ||
>>> I, x, y = ctx.gens_recursive() | ||
>>> p = (x + y + I)**2 | ||
>>> p | ||
x^2 + 2*x*y + (2*I)*x + y^2 + (2*I)*y - 1 | ||
|
||
Some domains such as ``gr_fmpzi_ctx`` are global and do not need to be created. | ||
Others such as ``gr_gr_mpoly_ctx`` are created using :meth:`gr_ctx.new`. | ||
|
||
.. autoclass :: flint.types._gr.gr_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_scalar_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_poly_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_mpoly_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr._gr_fmpz_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr._gr_fmpq_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr._gr_fmpzi_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr._gr_fexpr_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_nmod_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_fmpz_mod_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_fq_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_fq_nmod_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_fq_zech_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_nf_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_nf_fmpz_poly_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_real_qqbar_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_qqbar_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_real_ca_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_ca_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_real_algebraic_ca_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_algebraic_ca_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_extended_ca_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_real_float_arf_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_float_acf_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_real_arb_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_complex_acb_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_gr_poly_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_gr_mpoly_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr_series_ctx | ||
:members: | ||
:undoc-members: | ||
.. autoclass :: flint.types._gr.gr | ||
:members: | ||
:inherited-members: | ||
:undoc-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ coverage | |
pytest-cov | ||
sphinx | ||
sphinx-rtd-theme | ||
furo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
from flint.flintlib.types.mpoly cimport ordering_t | ||
|
||
cdef class flint_ctx: | ||
pass | ||
|
||
cdef class flint_elem: | ||
pass | ||
|
||
|
Oops, something went wrong.