Dane Sabo 3299181c70 Auto sync: 2025-09-02 22:47:53 (10335 files changed)
M  lazy-lock.json

M  lua/custom/configs/lspconfig.lua

M  lua/custom/init.lua

A  lua/custom/journal.lua

A  nvim_venv/bin/Activate.ps1

A  nvim_venv/bin/activate

A  nvim_venv/bin/activate.csh

A  nvim_venv/bin/activate.fish
2025-09-02 22:47:53 -04:00

39 lines
860 B
Python

"""Trait for implementing domain elements. """
from sympy.utilities import public
@public
class DomainElement:
"""
Represents an element of a domain.
Mix in this trait into a class whose instances should be recognized as
elements of a domain. Method ``parent()`` gives that domain.
"""
__slots__ = ()
def parent(self):
"""Get the domain associated with ``self``
Examples
========
>>> from sympy import ZZ, symbols
>>> x, y = symbols('x, y')
>>> K = ZZ[x,y]
>>> p = K(x)**2 + K(y)**2
>>> p
x**2 + y**2
>>> p.parent()
ZZ[x,y]
Notes
=====
This is used by :py:meth:`~.Domain.convert` to identify the domain
associated with a domain element.
"""
raise NotImplementedError("abstract method")