Skip to content

Commit

Permalink
Add basic docstrings to Array class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Jul 14, 2022
1 parent 4635f81 commit 649bd10
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions galois/_domains/_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,44 +116,79 @@ def _view_without_verification(cls):

@property
def name(cls) -> str:
"""
The name of the Galois field or Galois ring.
"""
return cls._name

@property
def characteristic(cls) -> int:
r"""
The characteristic :math:`p` of the Galois field :math:`\mathrm{GF}(p^m)` or :math:`p^e` of the Galois ring
:math:`\mathrm{GR}(p^e, m)`.
"""
return cls._characteristic

@property
def degree(cls) -> int:
r"""
The degree :math:`m` of the Galois field :math:`\mathrm{GF}(p^m)` or Galois ring :math:`\mathrm{GR}(p^e, m)`.
"""
return cls._degree

@property
def order(cls) -> int:
r"""
The order :math:`p^m` of the Galois field :math:`\mathrm{GF}(p^m)` or :math:`p^{em}` of the Galois ring
:math:`\mathrm{GR}(p^e, m)`.
"""
return cls._order

@property
def irreducible_poly(cls) -> Poly:
"""
The irreducible polynomial of the Galois field or Galois ring.
"""
return cls._irreducible_poly

@property
def primitive_element(cls) -> Array:
"""
A primitive element of the Galois field or Galois ring.
"""
return cls(cls._primitive_element)

@property
def dtypes(cls) -> List[np.dtype]:
"""
List of valid integer :obj:`numpy.dtype` values that are compatible with this Galois field or Galois ring.
"""
return cls._dtypes

@property
def display_mode(cls) -> Literal["int", "poly", "power"]:
"""
The current element representation of the Galois field or Galois ring.
"""
return cls._display_mode

@property
def ufunc_mode(cls) -> Literal["jit-lookup", "jit-calculate", "python-calculate"]:
"""
The current compilation mode of the Galois field or Galois ring.
"""
return cls._ufunc_mode

@property
def ufunc_modes(cls) -> List[str]:
"""
All supported compilation modes of the Galois field or Galois ring.
"""
return cls._ufunc_modes

@property
def default_ufunc_mode(cls) -> Literal["jit-lookup", "jit-calculate", "python-calculate"]:
"""
The default compilation mode of the Galois field or Galois ring.
"""
return cls._default_ufunc_mode

0 comments on commit 649bd10

Please sign in to comment.