code stringlengths 17 6.64M |
|---|
class DisplayManager(SageObject):
_instance = None
def __init__(self):
'\n The Display Manager\n\n Used to decide what kind of rich output is best.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output import get_display_manager\n sage: get_display_manager()\n... |
class OutputBase(SageObject):
'\n Base class for all rich output containers.\n '
def _repr_(self):
"\n Return a string representation.\n\n OUTPUT:\n\n String.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_basic import OutputBase\n s... |
class OutputPlainText(OutputBase):
def __init__(self, plain_text):
"\n Plain Text Output\n\n INPUT:\n\n - ``plain_text`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a bytes (string in Python 2.x) or string (unicode in Python\n ... |
class OutputAsciiArt(OutputBase):
def __init__(self, ascii_art):
"\n ASCII Art Output\n\n INPUT:\n\n - ``ascii_art`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n conv... |
class OutputUnicodeArt(OutputBase):
def __init__(self, unicode_art):
"\n Unicode Art Output\n\n Similar to :class:`OutputAsciiArt` but using the entire\n unicode range.\n\n INPUT:\n\n - ``unicode_art`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. A... |
class OutputLatex(OutputBase):
def __init__(self, latex):
'\n LaTeX Output\n\n .. note::\n\n The LaTeX commands will only use a subset of LaTeX that\n can be displayed by MathJax.\n\n INPUT:\n\n - ``latex`` --\n :class:`~sage.repl.rich_output.buf... |
class OutputHtml(OutputBase):
def __init__(self, html):
"\n HTML Output\n\n INPUT:\n\n - ``html`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively, a\n string (bytes) can be passed directly which will then be converted\n into an :clas... |
class OutputImagePng(OutputBase):
def __init__(self, png):
'\n PNG Image\n\n .. NOTE::\n\n Every backend that is capable of displaying any kind of\n graphics is supposed to support the PNG format at least.\n\n INPUT:\n\n - ``png`` --\n :class:`~s... |
class OutputImageGif(OutputBase):
def __init__(self, gif):
'\n GIF Image (possibly animated)\n\n INPUT:\n\n - ``gif`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n con... |
class OutputImageJpg(OutputBase):
def __init__(self, jpg):
'\n JPEG Image\n\n INPUT:\n\n - ``jpg`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n converted into an\n ... |
class OutputImageSvg(OutputBase):
def __init__(self, svg):
'\n SVG Image\n\n INPUT:\n\n - ``svg`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n converted into an\n ... |
class OutputImagePdf(OutputBase):
def __init__(self, pdf):
'\n PDF Image\n\n INPUT:\n\n - ``pdf`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n converted into an\n ... |
class OutputImageDvi(OutputBase):
def __init__(self, dvi):
'\n DVI Image\n\n INPUT:\n\n - ``dvi`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`. Alternatively,\n a string (bytes) can be passed directly which will then be\n converted into an\n ... |
class OutputSceneJmol(OutputBase):
def __init__(self, scene_zip, preview_png):
'\n JMol Scene\n\n By our (Sage) convention, the actual scene is called ``SCENE``\n inside the zip archive.\n\n INPUT:\n\n - ``scene_zip`` -- string/bytes. The jmol scene (a zip archive).\n\n... |
class OutputSceneCanvas3d(OutputBase):
def __init__(self, canvas3d):
'\n Canvas3d Scene\n\n INPUT:\n\n - ``canvas3d`` -- string/bytes. The canvas3d data.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputSceneCanvas3d\n sage:... |
class OutputSceneThreejs(OutputBase):
def __init__(self, html):
"\n Three.js Scene\n\n INPUT:\n\n - ``html`` -- string/bytes. The Three.js HTML data.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputSceneThreejs\n sage: Outp... |
class OutputSceneWavefront(OutputBase):
def __init__(self, obj, mtl):
'\n Wavefront `*.obj` Scene\n\n The Wavefront format consists of two files, an ``.obj`` file\n defining the geometry data (mesh points, normal vectors, ...)\n together with a ``.mtl`` file defining texture d... |
class OutputVideoBase(OutputBase):
def __init__(self, video, loop=True):
'\n Abstract base class for rich video output\n\n INPUT:\n\n - ``video`` --\n :class:`~sage.repl.rich_output.buffer.OutputBuffer`.\n The video data.\n - ``loop`` -- boolean. Whether to r... |
class OutputVideoOgg(OutputVideoBase):
'\n Ogg video, Ogg Theora in particular\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoOgg\n sage: OutputVideoOgg.example()\n OutputVideoOgg container\n '
ext = '.ogv'
mimetype = 'video/ogg'
|
class OutputVideoWebM(OutputVideoBase):
'\n WebM video\n\n The video can be encoded using VP8, VP9 or an even more recent codec.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoWebM\n sage: OutputVideoWebM.example()\n OutputVideoWebM container\n ... |
class OutputVideoMp4(OutputVideoBase):
'\n MPEG 4 video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoMp4\n sage: OutputVideoMp4.example()\n OutputVideoMp4 container\n '
ext = '.mp4'
mimetype = 'video/mp4'
|
class OutputVideoFlash(OutputVideoBase):
'\n Flash video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoFlash\n sage: OutputVideoFlash.example()\n OutputVideoFlash container\n '
ext = '.flv'
mimetype = 'video/x-flv'
|
class OutputVideoMatroska(OutputVideoBase):
'\n Matroska Video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoMatroska\n sage: OutputVideoMatroska.example()\n OutputVideoMatroska container\n '
ext = '.mkv'
mimetype = 'video/x-matroska'
|
class OutputVideoAvi(OutputVideoBase):
'\n AVI video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoAvi\n sage: OutputVideoAvi.example()\n OutputVideoAvi container\n '
ext = '.avi'
mimetype = 'video/x-msvideo'
|
class OutputVideoWmv(OutputVideoBase):
'\n Windows Media Video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoWmv\n sage: OutputVideoWmv.example()\n OutputVideoWmv container\n '
ext = '.wmv'
mimetype = 'video/x-ms-wmv'
|
class OutputVideoQuicktime(OutputVideoBase):
'\n Quicktime video\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.output_catalog import OutputVideoQuicktime\n sage: OutputVideoQuicktime.example()\n OutputVideoQuicktime container\n '
ext = '.mov'
mimetype = 'video/quicktime... |
class Property(property):
def __init__(self, name, allowed_values, doc=None):
"\n Preference item\n\n INPUT:\n\n - ``name`` -- string. The name of the property.\n\n - ``allowed_values`` -- list/tuple/iterable of allowed values.\n\n - ``doc`` -- string (optional). The do... |
class PreferencesABC(SageObject):
def __init__(self, *args, **kwds):
"\n Preferences for displaying graphics\n\n These can be preferences expressed by the user or by the\n display backend. They are specified as keyword arguments.\n\n INPUT:\n\n - ``*args*`` -- positiona... |
class DisplayPreferences(PreferencesABC):
pass
|
class SequencePrettyPrinter(SageObject):
def __init__(self, *args, **kwds):
'\n Pretty Printer for Multiple Arguments.\n\n INPUT/OUTPUT:\n\n Same as :func:`pretty_print`, except that the number of\n arguments must be >= 2. Otherwise its not a sequence of things\n to pri... |
def pretty_print(*args, **kwds):
'\n Pretty print the arguments using rich output if available.\n\n This function is similar to ``print()``, except that a rich output\n representation such as ``ascii_art`` or Latex is printed instead of the\n string representation.\n\n Note that the output depends ... |
def show(*args, **kwds):
'\n Alias for ``pretty_print``.\n\n This function is an alias for :func:`pretty_print`.\n\n INPUT/OUTPUT:\n\n See :func:`pretty_print`. Except if the argument is a graph, in\n which case it is plotted instead.\n\n EXAMPLES::\n\n sage: show(1)\n 1\n '
... |
class TestOutputPlainText(OutputPlainText):
def __init__(self, *args, **kwds):
'\n Backend-specific subclass of the plain text output container.\n\n Backends must not influence how the display system constructs\n output containers, they can only control how the output\n contai... |
class TestObject(SageObject):
'\n Test object with both :meth:`_repr_` and :meth:`_rich_repr_`\n '
def _repr_(self):
"\n Return string representation\n\n OUTPUT:\n\n String.\n\n EXAMPLES::\n\n sage: from sage.repl.rich_output.test_backend import TestObject... |
class BackendTest(BackendBase):
def _repr_(self):
"\n Return the string representation\n\n OUTPUT:\n\n String.\n\n EXAMPLES::\n\n sage: display_manager = sage.repl.rich_output.get_display_manager()\n sage: backend = display_manager._backend\n s... |
def _check():
'\n Raise ``RuntimeError`` if ``user_globals`` has not been initialized.\n\n EXAMPLES::\n\n sage: import sage.repl.user_globals\n sage: sage.repl.user_globals._check()\n sage: sage.repl.user_globals.user_globals = None\n sage: sage.repl.user_globals._check()\n ... |
def get_globals():
'\n Return the dictionary of all user globals.\n\n EXAMPLES::\n\n sage: from sage.repl.user_globals import get_globals, initialize_globals\n sage: initialize_globals(sage.all)\n sage: get_globals()["Matrix"]\n <cyfunction matrix at ...>\n '
_check()
... |
def set_globals(g):
'\n Set the dictionary of all user globals to ``g``.\n\n INPUT:\n\n - ``g`` -- a dictionary. Typically, this will be some dictionary\n given by the user interface or just ``globals()``.\n\n EXAMPLES::\n\n sage: from sage.repl.user_globals import get_globals, set_globals... |
def initialize_globals(all, g=None):
'\n Set the user globals dictionary to ``g`` and assign everything\n which was imported in module ``all`` as global.\n\n INPUT:\n\n - ``all`` -- a module whose globals will be injected\n\n - ``g`` -- a dictionary, see :func:`set_globals`. If this is\n ``Non... |
def get_global(name):
'\n Return the value of global variable ``name``. Raise ``NameError``\n if there is no such global variable.\n\n INPUT:\n\n - ``name`` -- a string representing a variable name\n\n OUTPUT: the value of variable ``name``\n\n EXAMPLES::\n\n sage: from sage.repl.user_glo... |
def set_global(name, value):
'\n Assign ``value`` to global variable ``name``. This is equivalent\n to executing ``name = value`` in the global namespace.\n\n INPUT:\n\n - ``name`` -- a string representing a variable name\n\n - ``value`` -- a value to assign to the variable\n\n EXAMPLES::\n\n ... |
class AlgebraicClosureFiniteFieldElement(FieldElement):
"\n Element of an algebraic closure of a finite field.\n\n EXAMPLES::\n\n sage: F = GF(3).algebraic_closure()\n sage: F.gen(2)\n z2\n sage: type(F.gen(2))\n <class 'sage.rings.algebraic_closure_finite_field.AlgebraicC... |
class AlgebraicClosureFiniteField_generic(Field):
'\n Algebraic closure of a finite field.\n\n TESTS::\n\n sage: GF(3).algebraic_closure().cardinality()\n +Infinity\n\n sage: GF(3).algebraic_closure().is_finite()\n False\n '
def __init__(self, base_ring, name, category=No... |
class AlgebraicClosureFiniteField_pseudo_conway(WithEqualityById, AlgebraicClosureFiniteField_generic):
"\n Algebraic closure of a finite field, constructed using\n pseudo-Conway polynomials.\n\n EXAMPLES::\n\n sage: F = GF(5).algebraic_closure(implementation='pseudo_conway')\n sage: F.card... |
def AlgebraicClosureFiniteField(base_ring, name, category=None, implementation=None, **kwds):
"\n Construct an algebraic closure of a finite field.\n\n The recommended way to use this functionality is by calling the\n :meth:`~sage.rings.finite_rings.finite_field_base.FiniteField.algebraic_closure`\n m... |
class AsymptoticExpansionGenerators(SageObject):
'\n A collection of constructors for several common asymptotic expansions.\n\n A list of all asymptotic expansions in this database is available via tab\n completion. Type "``asymptotic_expansions.``" and then hit tab to see which\n expansions are avail... |
def _fundamental_constant_implicit_function_(phi):
"\n Return the fundamental constant `\\tau` occurring in the analysis of\n implicitly defined functions.\n\n For a function `y(z)` satisfying `y(z) = z \\Phi(y(z))`, the fundamental\n constant `\\tau` is the unique positive solution of the equation\n ... |
def _sa_coefficients_lambda_(K, beta=0):
'\n Return the coefficients `\\lambda_{k, \\ell}(\\beta)` used in singularity analysis.\n\n INPUT:\n\n - ``K`` -- an integer.\n\n - ``beta`` -- (default: `0`) the order of the logarithmic\n singularity.\n\n OUTPUT:\n\n A dictionary mapping pairs of i... |
class NoConvergenceError(RuntimeError):
'\n A special :python:`RuntimeError<library/exceptions.html#exceptions.RuntimeError>`\n which is raised when an algorithm does not converge/stop.\n '
|
class AsymptoticExpansion(CommutativeAlgebraElement):
"\n Class for asymptotic expansions, i.e., the elements of an\n :class:`AsymptoticRing`.\n\n INPUT:\n\n - ``parent`` -- the parent of the asymptotic expansion.\n\n - ``summands`` -- the summands as a\n :class:`~sage.data_structures.mutable_... |
class AsymptoticRing(Algebra, UniqueRepresentation, WithLocals):
"\n A ring consisting of :class:`asymptotic expansions <AsymptoticExpansion>`.\n\n INPUT:\n\n - ``growth_group`` -- either a partially ordered group (see\n :doc:`growth_group`) or a string\n describing such a growth group (see\n ... |
class AsymptoticRingFunctor(ConstructionFunctor):
"\n A :class:`construction functor <sage.categories.pushout.ConstructionFunctor>`\n for :class:`asymptotic rings <AsymptoticRing>`.\n\n INPUT:\n\n - ``growth_group`` -- a partially ordered group (see\n :class:`AsymptoticRing` or\n :doc:`growt... |
@total_ordering
class FractionWithFactoredDenominator(RingElement):
"\n This element represents a fraction with a factored polynomial\n denominator. See also its parent\n :class:`FractionWithFactoredDenominatorRing` for details.\n\n Represents a fraction with factored polynomial denominator (FFPD)\n ... |
class FractionWithFactoredDenominatorRing(UniqueRepresentation, Ring):
'\n This is the ring of fractions with factored denominator.\n\n INPUT:\n\n - ``denominator_ring`` -- the base ring (a polynomial ring)\n\n - ``numerator_ring`` -- (optional) the numerator ring; the default is\n the ``denomina... |
class FractionWithFactoredDenominatorSum(list):
'\n A list representing the sum of :class:`FractionWithFactoredDenominator`\n objects with distinct denominator factorizations.\n\n AUTHORS:\n\n - Alexander Raichev (2012-06-25)\n\n - Daniel Krenn (2014-12-01)\n '
def __repr__(self):
'... |
def diff_prod(f_derivs, u, g, X, interval, end, uderivs, atc):
"\n Take various derivatives of the equation `f = ug`,\n evaluate them at a point `c`, and solve for the derivatives of `u`.\n\n INPUT:\n\n - ``f_derivs`` -- a dictionary whose keys are all tuples of the form\n ``s + end``, where ``s`... |
def permutation_sign(s, u):
"\n This function returns the sign of the permutation on\n ``1, ..., len(u)`` that is induced by the sublist ``s`` of ``u``.\n\n .. NOTE::\n\n This function was intended for internal use and is deprecated now\n (:trac:`29465`).\n\n INPUT:\n\n - ``s`` -- a s... |
def subs_all(f, sub, simplify=False):
"\n Return the items of `f` substituted by the dictionaries\n of ``sub`` in order of their appearance in ``sub``.\n\n INPUT:\n\n - ``f`` -- an individual or list of symbolic expressions\n or dictionaries\n - ``sub`` -- an individual or list of dictionaries... |
def diff_all(f, V, n, ending=[], sub=None, sub_final=None, zero_order=0, rekey=None):
"\n Return a dictionary of representative mixed partial\n derivatives of `f` from order 1 up to order `n` with respect to the\n variables in `V`.\n\n The default is to key the dictionary by all nondecreasing sequence... |
def diff_op(A, B, AB_derivs, V, M, r, N):
"\n Return the derivatives `DD^{(l+k)}(A[j] B^l)` evaluated at a point\n `p` for various natural numbers `j, k, l` which depend on `r` and `N`.\n\n Here `DD` is a specific second-order linear differential operator\n that depends on `M` , `A` is a list of symbo... |
def diff_seq(V, s):
"\n Given a list ``s`` of tuples of natural numbers, return the\n list of elements of ``V`` with indices the elements of the elements\n of ``s``.\n\n INPUT:\n\n - ``V`` -- a list\n - ``s`` -- a list of tuples of natural numbers in the interval\n ``range(len(V))``\n\n ... |
def diff_op_simple(A, B, AB_derivs, x, v, a, N):
"\n Return `DD^(e k + v l)(A B^l)` evaluated at a point `p` for\n various natural numbers `e, k, l` that depend on `v` and `N`.\n\n Here `DD` is a specific linear differential operator that depends\n on `a` and `v` , `A` and `B` are symbolic functions, ... |
def direction(v, coordinate=None):
'\n Return ``[vv/v[coordinate] for vv in v]`` where\n ``coordinate`` is the last index of ``v`` if not specified otherwise.\n\n INPUT:\n\n - ``v`` -- a vector\n - ``coordinate`` -- (optional; default: ``None``) an index for ``v``\n\n EXAMPLES::\n\n sage:... |
def coerce_point(R, p):
'\n Coerce the keys of the dictionary ``p`` into the ring ``R``.\n\n .. WARNING::\n\n This method assumes that it is possible.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.asymptotics_multivariate_generating_functions import FractionWithFactoredDenominatorRing... |
class Variable(CachedRepresentation, SageObject):
"\n A class managing the variable of a growth group.\n\n INPUT:\n\n - ``var`` -- an object whose representation string is used as the\n variable. It has to be a valid Python identifier. ``var`` can\n also be a tuple (or other iterable) of such o... |
class PartialConversionValueError(ValueError):
'\n A special :python:`ValueError<library/exceptions.html#exceptions.ValueError>`\n which is raised when (partial) conversion fails.\n\n INPUT:\n\n - ``element`` -- a :class:`PartialConversionElement`\n\n The remaining argument passed on to\n :pytho... |
class PartialConversionElement(SageObject):
'\n A not converted element of a growth group.\n\n INPUT:\n\n - ``growth_group`` -- a group group\n\n - ``raw_element`` -- an object\n\n A :class:`PartialConversionElement` is an element ``growth_group(raw_element)``\n which usually appears in conjunct... |
def _is_lt_one_(self):
"\n Return whether this element is less than `1`.\n\n INPUT:\n\n Nothing.\n\n OUTPUT:\n\n A boolean.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.growth_group import GrowthGroup\n sage: G = GrowthGroup('x^ZZ'); x = G(x)\n sage: (x^42).is_lt_one(... |
def _log_(self, base=None):
'\n Return the logarithm of this element.\n\n INPUT:\n\n - ``base`` -- the base of the logarithm. If ``None``\n (default value) is used, the natural logarithm is taken.\n\n OUTPUT:\n\n A growth element.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.g... |
def _log_factor_(self, base=None, locals=None):
'\n Return the logarithm of the factorization of this\n element.\n\n INPUT:\n\n - ``base`` -- the base of the logarithm. If ``None``\n (default value) is used, the natural logarithm is taken.\n\n - ``locals`` -- a dictionary which may contain the... |
def _rpow_(self, base):
"\n Calculate the power of ``base`` to this element.\n\n INPUT:\n\n - ``base`` -- an element.\n\n OUTPUT:\n\n A growth element.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.growth_group import GrowthGroup\n sage: G = GrowthGroup('(QQ_+)^x * x^ZZ')\n ... |
class GenericGrowthElement(MultiplicativeGroupElement):
'\n A basic implementation of a generic growth element.\n\n Growth elements form a group by multiplication, and (some of) the\n elements can be compared to each other, i.e., all elements form a\n poset.\n\n INPUT:\n\n - ``parent`` -- a :cla... |
class GenericGrowthGroup(UniqueRepresentation, Parent, WithLocals):
"\n A basic implementation for growth groups.\n\n INPUT:\n\n - ``base`` -- one of SageMath's parents, out of which the elements\n get their data (``raw_element``).\n\n - ``category`` -- (default: ``None``) the category of the new... |
class AbstractGrowthGroupFunctor(ConstructionFunctor):
"\n A base class for the functors constructing growth groups.\n\n INPUT:\n\n - ``var`` -- a string or list of strings (or anything else\n :class:`Variable` accepts).\n\n - ``domain`` -- a category.\n\n EXAMPLES::\n\n sage: from sage... |
class DecreasingGrowthElementError(ValueError):
'\n A special :python:`ValueError<library/exceptions.html#exceptions.ValueError>`\n which is raised when a growth element is less than one.\n\n INPUT:\n\n - ``element`` -- a :class:`GenericGrowthElement`\n\n The remaining arguments are passed on to\n ... |
class MonomialGrowthElement(GenericGrowthElement):
"\n An implementation of monomial growth elements.\n\n INPUT:\n\n - ``parent`` -- a :class:`MonomialGrowthGroup`.\n\n - ``raw_element`` -- an element from the base ring of the parent.\n\n This ``raw_element`` is the exponent of the created monomi... |
class MonomialGrowthGroup(GenericGrowthGroup):
"\n A growth group dealing with powers of a fixed object/symbol.\n\n The elements :class:`MonomialGrowthElement` of this group represent powers\n of a fixed base; the group law is the multiplication, which corresponds\n to the addition of the exponents of... |
class MonomialGrowthGroupFunctor(AbstractGrowthGroupFunctor):
"\n A :class:`construction functor <sage.categories.pushout.ConstructionFunctor>`\n for :class:`monomial growth groups <MonomialGrowthGroup>`.\n\n INPUT:\n\n - ``var`` -- a string or list of strings (or anything else\n :class:`Variable... |
class ExponentialGrowthElement(GenericGrowthElement):
"\n An implementation of exponential growth elements.\n\n INPUT:\n\n - ``parent`` -- an :class:`ExponentialGrowthGroup`.\n\n - ``raw_element`` -- an element from the base ring of the parent.\n\n This ``raw_element`` is the base of the created ... |
class ExponentialGrowthGroup(GenericGrowthGroup):
"\n A growth group dealing with expressions involving a fixed\n variable/symbol as the exponent.\n\n The elements :class:`ExponentialGrowthElement` of this group\n represent exponential functions with bases from a fixed base\n ring; the group law is... |
class ExponentialGrowthGroupFunctor(AbstractGrowthGroupFunctor):
"\n A :class:`construction functor <sage.categories.pushout.ConstructionFunctor>`\n for :class:`exponential growth groups <ExponentialGrowthGroup>`.\n\n INPUT:\n\n - ``var`` -- a string or list of strings (or anything else\n :class:... |
class GenericNonGrowthElement(GenericGrowthElement):
'\n An element of :class:`GenericNonGrowthGroup`.\n '
def _lt_(self, other):
"\n Return ``False`` as elements are not comparable.\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.argument_groups import RootsOfUnityG... |
class GenericNonGrowthGroup(GenericGrowthGroup):
'\n A (abstract) growth group whose elements are all of the same growth `1`.\n\n See :class:`ExponentialNonGrowthGroup` for a concrete\n realization.\n '
@staticmethod
def _initial_category_(base):
'\n Return a category with whic... |
class ExponentialNonGrowthElement(GenericNonGrowthElement, ExponentialGrowthElement):
'\n An element of :class:`ExponentialNonGrowthGroup`.\n '
def _check_(self):
"\n Perform an additional check at the end of :meth:`__init__`.\n\n No check is performed for this class.\n\n T... |
class ExponentialNonGrowthGroup(GenericNonGrowthGroup, ExponentialGrowthGroup):
"\n A growth group whose base is an\n :mod:`argument group <sage.groups.misc_gps.argument_groups>`.\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.argument_groups import RootsOfUnityGroup\n sage: from sage.r... |
class ExponentialNonGrowthGroupFunctor(ExponentialGrowthGroupFunctor):
'\n A :class:`construction functor <sage.categories.pushout.ConstructionFunctor>`\n for :class:`ExponentialNonGrowthGroup`.\n '
_functor_name = 'ExponentialNonGrowthGroup'
def _apply_functor(self, base):
"\n Ap... |
class MonomialNonGrowthElement(GenericNonGrowthElement, MonomialGrowthElement):
'\n An element of :class:`MonomialNonGrowthGroup`.\n '
pass
|
class MonomialNonGrowthGroup(GenericNonGrowthGroup, MonomialGrowthGroup):
"\n A growth group whose base is an\n :mod:`imaginary group <sage.groups.misc_gps.imaginary_groups>`.\n\n EXAMPLES::\n\n sage: from sage.groups.misc_gps.imaginary_groups import ImaginaryGroup\n sage: from sage.rings.a... |
class MonomialNonGrowthGroupFunctor(MonomialGrowthGroupFunctor):
'\n A :class:`construction functor <sage.categories.pushout.ConstructionFunctor>`\n for :class:`MonomialNonGrowthGroup`.\n '
_functor_name = 'MonomialNonGrowthGroup'
def _apply_functor(self, base):
"\n Apply this fun... |
class GrowthGroupFactory(UniqueFactory):
"\n A factory creating asymptotic growth groups.\n\n INPUT:\n\n - ``specification`` -- a string.\n\n - keyword arguments are passed on to the growth group\n constructor.\n If the keyword ``ignore_variables`` is not specified, then\n ``ignore_vari... |
class CartesianProductFactory(UniqueFactory):
"\n Create various types of Cartesian products depending on its input.\n\n INPUT:\n\n - ``growth_groups`` -- a tuple (or other iterable) of growth groups.\n\n - ``order`` -- (default: ``None``) if specified, then this order\n is taken for comparing tw... |
class GenericProduct(CartesianProductPoset, GenericGrowthGroup):
"\n A Cartesian product of growth groups.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.growth_group import GrowthGroup\n sage: P = GrowthGroup('x^QQ')\n sage: L = GrowthGroup('log(x)^ZZ')\n sage: C = cartesia... |
class UnivariateProduct(GenericProduct):
'\n A Cartesian product of growth groups with the same variables.\n\n .. NOTE::\n\n A univariate product of growth groups is ordered\n lexicographically. This is motivated by the assumption\n that univariate growth groups can be ordered in a chai... |
class MultivariateProduct(GenericProduct):
'\n A Cartesian product of growth groups with pairwise disjoint\n (or equal) variable sets.\n\n .. NOTE::\n\n A multivariate product of growth groups is ordered by\n means of the product order, i.e. component-wise. This is\n motivated by the... |
def repr_short_to_parent(s):
"\n Helper method for the growth group factory, which converts a short\n representation string to a parent.\n\n INPUT:\n\n - ``s`` -- a string, short representation of a parent.\n\n OUTPUT:\n\n A parent.\n\n The possible short representations are shown in the exam... |
def parent_to_repr_short(P):
"\n Helper method which generates a short(er) representation string\n out of a parent.\n\n INPUT:\n\n - ``P`` -- a parent.\n\n OUTPUT:\n\n A string.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.misc import parent_to_repr_short\n sage: parent_t... |
def split_str_by_op(string, op, strip_parentheses=True):
"\n Split the given string into a tuple of substrings arising by\n splitting by ``op`` and taking care of parentheses.\n\n INPUT:\n\n - ``string`` -- a string.\n\n - ``op`` -- a string. This is used by\n :python:`str.split <library/stdty... |
def repr_op(left, op, right=None, latex=False):
"\n Create a string ``left op right`` with\n taking care of parentheses in its operands.\n\n INPUT:\n\n - ``left`` -- an element.\n\n - ``op`` -- a string.\n\n - ``right`` -- an element.\n\n - ``latex`` -- (default: ``False``) a boolean. If set,... |
def combine_exceptions(e, *f):
"\n Helper function which combines the messages of the given exceptions.\n\n INPUT:\n\n - ``e`` -- an exception.\n\n - ``*f`` -- exceptions.\n\n OUTPUT:\n\n An exception.\n\n EXAMPLES::\n\n sage: from sage.rings.asymptotic.misc import combine_exceptions\n... |
def substitute_raise_exception(element, e):
"\n Raise an error describing what went wrong with the substitution.\n\n INPUT:\n\n - ``element`` -- an element.\n\n - ``e`` -- an exception which is included in the raised error\n message.\n\n OUTPUT:\n\n Raise an exception of the same type as ``... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.