bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def conductor_range(self): """ Return the range of conductors that are covered by the database. OUTPUT: - ``int`` - smallest cond - ``int`` - largest conductor plus one EXAMPLES:: sage: from sage.databases.cremona import LargeCremonaDatabase # optional - database_cremona_ellcurve sage: c = LargeCremonaDatabas... | def conductor_range(self): """ Return the range of conductors that are covered by the database. OUTPUT: tuple of ints (N1,N2+1) where N1 is the smallest and N2 the largest conductor for which the database is complete. EXAMPLES:: sage: from sage.databases.cremona import LargeCremonaDatabase # optional - database_c... | 462,200 |
def _init_allgens(self, ftpdata, largest_conductor=0): """ Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database. """ if self.read_only: raise RuntimeError, "The database must not be read_only." files = os.listdir(ftpdata) files.sort() name = "allgens" c = _map[nam... | def _init_allgens(self, ftpdata, largest_conductor=0): """ Initialize the allgens table by reading the corresponding ftpdata files and importing them into the database. """ if self.read_only: raise RuntimeError, "The database must not be read_only." files = os.listdir(ftpdata) files.sort() name = "allgens" c = _map[nam... | 462,201 |
def is_submodule(self, other): """ Return True if self is a submodule of other. EXAMPLES:: sage: M = FreeModule(ZZ,3) sage: V = M.ambient_vector_space() sage: X = V.span([[1/2,1/2,0],[1/2,0,1/2]], ZZ) sage: Y = V.span([[1,1,1]], ZZ) sage: N = X + Y sage: M.is_submodule(X) False sage: M.is_submodule(Y) False sage: Y.i... | def is_submodule(self, other): """ Return True if self is a submodule of other. EXAMPLES:: sage: M = FreeModule(ZZ,3) sage: V = M.ambient_vector_space() sage: X = V.span([[1/2,1/2,0],[1/2,0,1/2]], ZZ) sage: Y = V.span([[1,1,1]], ZZ) sage: N = X + Y sage: M.is_submodule(X) False sage: M.is_submodule(Y) False sage: Y.i... | 462,202 |
def is_submodule(self, other): """ Return True if self is a submodule of other. EXAMPLES:: sage: M = FreeModule(ZZ,3) sage: V = M.ambient_vector_space() sage: X = V.span([[1/2,1/2,0],[1/2,0,1/2]], ZZ) sage: Y = V.span([[1,1,1]], ZZ) sage: N = X + Y sage: M.is_submodule(X) False sage: M.is_submodule(Y) False sage: Y.i... | def is_submodule(self, other): """ Return True if self is a submodule of other. EXAMPLES:: sage: M = FreeModule(ZZ,3) sage: V = M.ambient_vector_space() sage: X = V.span([[1/2,1/2,0],[1/2,0,1/2]], ZZ) sage: Y = V.span([[1,1,1]], ZZ) sage: N = X + Y sage: M.is_submodule(X) False sage: M.is_submodule(Y) False sage: Y.i... | 462,203 |
def _singular_init_(self, singular=singular_default): """ Return a newly created Singular ring matching this ring. """ if not can_convert_to_singular(self): raise TypeError, "no conversion of this ring to a Singular ring defined" if self.ngens()==1: _vars = str(self.gen()) if "*" in _vars: # 1.000...000*x _vars = _var... | def _singular_init_(self, singular=singular_default): """ Return a newly created Singular ring matching this ring. """ if not can_convert_to_singular(self): raise TypeError, "no conversion of this ring to a Singular ring defined" if self.ngens()==1: _vars = '(%s)'%self.gen() if "*" in _vars: # 1.000...000*x _vars = _v... | 462,204 |
def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | 462,205 |
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R. | def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R. | 462,206 |
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R. | def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R. | 462,207 |
def library_interact(f): """ This is a decorator for using interacts in the Sage library. EXAMPLES:: sage: @interacts.decorator.library_interact ... def f(n=5): print n ... sage: f() # an interact appears <html>...</html> """ @sage_wraps(f) def library_wrapper(): # Maybe program around bug (?) in the notebook: html(... | def library_interact(f): """ This is a decorator for using interacts in the Sage library. EXAMPLES:: sage: @interacts.library.library_interact ... def f(n=5): print n ... sage: f() # an interact appears <html>...</html> """ @sage_wraps(f) def library_wrapper(): # Maybe program around bug (?) in the notebook: html("<... | 462,208 |
def demo(n=tuple(range(10)), m=tuple(range(10))): """ This is a demo interact that sums two numbers. INPUT: - `n` -- integer slider - `m` -- integer slider EXAMPLES:: sage: interacts.decorator.demo() <html>...</html> """ print n+m | def demo(n=tuple(range(10)), m=tuple(range(10))): """ This is a demo interact that sums two numbers. INPUT: - `n` -- integer slider - `m` -- integer slider EXAMPLES:: sage: interacts.library.demo() <html>...</html> """ print n+m | 462,209 |
def is_overfull(self): r""" Tests whether the current graph is overfull. | def is_overfull(self): r""" Tests whether the current graph is overfull. | 462,210 |
def is_overfull(self): r""" Tests whether the current graph is overfull. | def is_overfull(self): r""" Tests whether the current graph is overfull. | 462,211 |
def is_overfull(self): r""" Tests whether the current graph is overfull. | def is_overfull(self): r""" Tests whether the current graph is overfull. | 462,212 |
def upgrade(): """ Download and build the latest version of Sage. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. This upgrades to the latest version of core packages (optional packages are not automatically upgraded). This will not work on systems that don't... | def upgrade(): """ Download and build the latest version of Sage. You must have an internet connection. Also, you will have to restart Sage for the changes to take affect. This upgrades to the latest version of core packages (optional packages are not automatically upgraded). This will not work on systems that don't... | 462,213 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (\`$ or \$`), because o... | 462,214 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | 462,215 |
def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | def process_dollars(s): r"""nodetex Replace dollar signs with backticks. More precisely, do a regular expression search. Replace a plain dollar sign ($) by a backtick (`). Replace an escaped dollar sign (\$) by a dollar sign ($). Don't change a dollar sign preceded or followed by a backtick (`$ or $`), because of s... | 462,216 |
def process_mathtt(s, embedded=False): r"""nodetex Replace \mathtt{BLAH} with either \verb|BLAH| (in the notebook) or BLAH (from the command line). INPUT: - ``s`` - string, in practice a docstring - ``embedded`` - boolean (optional, default False) This function is called by :func:`format`, and if in the notebook, it... | def process_mathtt(s, embedded=False): r"""nodetex Replace \\mathtt{BLAH} with either \\verb|BLAH| (in the notebook) or BLAH (from the command line). INPUT: - ``s`` - string, in practice a docstring - ``embedded`` - boolean (optional, default False) This function is called by :func:`format`, and if in the notebook, ... | 462,217 |
def _sympy_(self): """ Converts pi to sympy pi. EXAMPLES:: sage: import sympy sage: sympy.pi == pi # indirect doctest True """ import sympy return sympy.pi | def _sympy_(self): """ Converts pi to sympy pi. EXAMPLES:: sage: import sympy sage: sympy.pi == pi # indirect doctest True """ import sympy return sympy.pi | 462,218 |
def replace_parens(x): r""" A map from '(' to open_symbol and ')' to close_symbol and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_parens sage: replace_parens('(') 1 sage: replace_parens(')') 0 sage: replace_parens(1) Traceback (most recent call last): ... ValueError """ ... | def replace_parens(x): r""" A map from ``'('`` to ``open_symbol`` and ``')'`` to ``close_symbol`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_symbols`. INPUT: - ``x`` -- either an opening or closing... | 462,219 |
def replace_symbols(x): r""" A map from open_symbol to '(' and close_symbol to ')' and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_symbols sage: replace_symbols(1) '(' sage: replace_symbols(0) ')' sage: replace_symbols(3) Traceback (most recent call last): ... ValueError... | def replace_symbols(x): r""" A map from ``open_symbol`` to ``'('`` and ``close_symbol`` to ``')'`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_parens`. INPUT: - ``x`` -- either ``open_symbol`` or ``... | 462,220 |
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete. EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyc... | 462,221 |
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck... | 462,222 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 462,223 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 462,224 |
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos`` | 462,225 |
def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non crossing partitions Thanks to Mathieu Dutour for describing the bijection. EXAMPLES:: sage: DyckWord([]).to_noncrossing_partition() [] sage: DyckWord([1, 0]).to_noncrossing_partition() [[1]] sage: DyckWord([1, 1, 0, 0]).to_noncrossing_... | def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non-crossing partitions. Thanks to Mathieu Dutour for describing the bijection. EXAMPLES:: sage: DyckWord([]).to_noncrossing_partition() [] sage: DyckWord([1, 0]).to_noncrossing_partition() [[1]] sage: DyckWord([1, 1, 0, 0]).to_noncrossing... | 462,226 |
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | 462,227 |
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word | 462,228 |
def a_statistic(self): """ Returns the a-statistic for the Dyck word correspond to the area of the Dyck path. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(1,0)` and '0's represent steps in the direction `(0,1)`. The... | def a_statistic(self): """ Returns the a-statistic for the Dyck word corresponding to the area of the Dyck path. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(1,0)` and '0's represent steps in the direction `(0,1)`. ... | 462,229 |
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | 462,230 |
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word. One can view a balanced Dyck word as a lattice path from `(0,0)` to `(n,n)` in the first quadrant by letting '1's represent steps in the direction `(0,1)` and '0's represent steps in the direct... | 462,231 |
def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: DyckWords(0).list() [[]] sage: DyckWords(1).list() [[1, 0]] sage: DyckWords(2).list() [[1, 0, 1, 0], [1, 1, 0, 0]] """ return list(self) | def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: DyckWords(0).list() [[]] sage: DyckWords(1).list() [[1, 0]] sage: DyckWords(2).list() [[1, 0, 1, 0], [1, 1, 0, 0]] """ return list(self) | 462,232 |
def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: [ w for w in DyckWords(0) ] [[]] sage: [ w for w in DyckWords(1) ] [[1, 0]] sage: [ w for w in DyckWords(2) ] [[1, 0, 1, 0], [1, 1, 0, 0]] sage: len([ 'x' for _ in DyckWords(5) ]) 42 """ if... | def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses. EXAMPLES:: sage: [ w for w in DyckWords(0) ] [[]] sage: [ w for w in DyckWords(1) ] [[1, 0]] sage: [ w for w in DyckWords(2) ] [[1, 0, 1, 0], [1, 1, 0, 0]] sage: len([ 'x' for _ in DyckWords(5) ]) 42 """ if... | 462,233 |
def from_noncrossing_partition(ncp): r""" converts a non-crossing partition to a Dyck word TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossin... | def from_noncrossing_partition(ncp): r""" Converts a non-crossing partition to a Dyck word. TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossi... | 462,234 |
def _repr_(self): """ The printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0 0 1 ... | def _repr_(self): """ The printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0 0 1 ... | 462,235 |
def _repr_(self): """ The default printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0... | def _repr_(self): """ The default printing representation of self. EXAMPLES:: sage: V = VectorSpace(QQ,5) sage: U = V.submodule([ V.gen(i) - V.gen(0) for i in range(1,5) ]) sage: print U # indirect doctest Vector space of degree 5 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -1] [ 0 1 0 0 -1] [ 0... | 462,236 |
def _subdivide_palp(self, new_rays, verbose): r""" Subdivide ``self`` adding ``new_rays`` one by one. | def _subdivide_palp(self, new_rays, verbose): r""" Subdivide ``self`` adding ``new_rays`` one by one. | 462,237 |
def _subdivide_palp(self, new_rays, verbose): r""" Subdivide ``self`` adding ``new_rays`` one by one. | def _subdivide_palp(self, new_rays, verbose): r""" Subdivide ``self`` adding ``new_rays`` one by one. | 462,238 |
def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | def edge_cut(self, s, t, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns a minimum edge cut between vertices `s` and `t` represented by a list of edges. | 462,239 |
def _call_(self, x): r""" TEST:: | def _call_(self, x): r""" TEST:: | 462,240 |
def _discrete_log(self,x): # EVEN DUMBER IMPLEMENTATION! u = [y for y in self.list() if y.element() == x] if len(u) == 0: raise TypeError, "Not in group" if len(u) > 1: raise NotImplementedError return u[0] | def _discrete_log(self,x): # EVEN DUMBER IMPLEMENTATION! u = [y for y in self.list() if y.element() == x] if len(u) == 0: raise TypeError, "Not in group" if len(u) > 1: raise NotImplementedError return u[0] | 462,241 |
def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line. NOTES: * Evaluating on a vertex returns `A\vec{x}+b` * Evaluating on a ray returns `A\vec{r}`. Only the sign or whether it is zero is meaningful. * Evaluating on a line returns `A\vec{l}`. Only whether it is zero or not... | def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line. NOTES: * Evaluating on a vertex returns `A\vec{x}+b` * Evaluating on a ray returns `A\vec{r}`. Only the sign or whether it is zero is meaningful. * Evaluating on a line returns `A\vec{l}`. Only whether it is zero or not... | 462,242 |
def is_inequality(self): """ Returns True since this is, by construction, an inequality. | def is_inequality(self): """ Returns True since this is, by construction, an inequality. | 462,243 |
def interior_contains(self, Vobj): """ Tests whether the interior of the halfspace (excluding its boundary) defined by the inequality contains the given vertex/ray/line. | def interior_contains(self, Vobj): If you pass a vector, it is assumed to be the coordinate vector of a point:: sage: P = Polyhedron(vertices=[[1,1],[1,-1],[-1,1],[-1,-1]]) sage: p = vector(ZZ, [1,0] ) sage: [ ieq.interior_contains(p) for ieq in P.inequality_generator() ] [True, True, True, False] """ try: if Vobj.is... | 462,244 |
def is_equation(self): """ Tests if this object is an equation. By construction, it must be. | def is_equation(self): """ Tests if this object is an equation. By construction, it must be. | 462,245 |
def is_vertex(self): """ Tests if this object is a vertex. By construction it always is. | def is_vertex(self): """ Tests if this object is a vertex. By construction it always is. | 462,246 |
def is_ray(self): """ Tests if this object is a ray. Always True by construction. | def is_ray(self): """ Tests if this object is a ray. Always True by construction. | 462,247 |
def is_line(self): """ Tests if the object is a line. By construction it must be. | def is_line(self): """ Tests if the object is a line. By construction it must be. | 462,248 |
def identity(self): """ Returns the identity projection. | def identity(self): """ Returns the identity projection. | 462,249 |
def identity(self): """ Returns the identity projection. | def identity(self): """ Returns the identity projection. | 462,250 |
def __call__(self, x, check=True): """ Convert ``x`` to an element of this multivariate polynomial ring, possibly non-canonically. EXAMPLES: | def __call__(self, x, check=True): """ Convert ``x`` to an element of this multivariate polynomial ring, possibly non-canonically. EXAMPLES: | 462,251 |
def eliminate_linear_variables(self, maxlength=3, skip=lambda lm,tail: False): """ Return a new system where "linear variables" are eliminated. | def eliminate_linear_variables(self, maxlength=3, skip=lambda lm,tail: False): """ Return a new system where "linear variables" are eliminated. | 462,252 |
def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | 462,253 |
def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | 462,254 |
def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | def is_cyclic_ordered(x1,x2,x3): return ( (x1 < x2 and x2 < x3) or (x2 < x3 and x3 < x1) or (x3 < x1 and x1 < x2)) | 462,255 |
def __init__(self, x, y, r1, r2, angle, s1, s2, options): """ Initializes base class Arc. | def __init__(self, x, y, r1, r2, angle, s1, s2, options): """ Initializes base class Arc. | 462,256 |
def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | def get_minmax_data(self): """ Returns a dictionary with the bounding box data. | 462,257 |
def _allowed_options(self): """ Return the allowed options for the Arc class. | def _allowed_options(self): """ Return the allowed options for the Arc class. | 462,258 |
def _repr_(self): """ String representation of Arc primitive. | def _repr_(self): """ String representation of Arc primitive. | 462,259 |
def plot3d(self): r""" TESTS: | def plot3d(self): r""" TESTS: | 462,260 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,261 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,262 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,263 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,264 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,265 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,266 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,267 |
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self. | 462,268 |
def is_planar(self, on_embedding=None, kuratowski=False, set_embedding=False, set_pos=False): """ Returns True if the graph is planar, and False otherwise. This wraps the reference implementation provided by John Boyer of the linear time planarity algorithm by edge addition due to Boyer Myrvold. (See reference code in ... | def is_planar(self, on_embedding=None, kuratowski=False, set_embedding=False, set_pos=False): Multi-edged and looped graphs are partially supported:: sage: G = Graph({0:[1,1]}, multiedges=True) sage: G.is_planar() True sage: G.is_planar(on_embedding={}) Traceback (most recent call last): ... NotImplementedError: Cann... | 462,269 |
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ... | def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ... | 462,270 |
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ... | def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ... | 462,271 |
def __init__(self, data, check=True): r""" Construction of a Lyndon word. | def __init__(self, data, check=True): r""" Construction of a Lyndon word. | 462,272 |
def __init__(self, data, check=True): r""" Construction of a Lyndon word. | def __init__(self, data, check=True): r""" Construction of a Lyndon word. | 462,273 |
def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | def __init__(self, *args, **kwargs): """ Construct a substitution box (S-box) for a given lookup table `S`. | 462,274 |
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix with nonnegative real entries such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose ... | 462,275 |
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | 462,276 |
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | 462,277 |
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch... | 462,278 |
def get_colors(self, list): """ Parameters: list: an iterable collection of values which can be cast into colors -- typically an RGB triple, or an RGBA 4-tuple Returns: a list of single parameters which can be passed into the set_color method of the Triangle or SmoothTriangle objects generated by this factory. TESTS:... | def get_colors(self, list): """ Parameters: list: an iterable collection of values which can be cast into colors -- typically an RGB triple, or an RGBA 4-tuple Returns: a list of single parameters which can be passed into the set_color method of the Triangle or SmoothTriangle objects generated by this factory. TESTS:... | 462,279 |
def __call__(self, *args): """ Coerces the element into the ring. You may pass a vector in the ambient space, an element of the base_ring, or an argument list of integers (or half-integers for the spin types) which are the components of a vector in the ambient space. INPUT: - ``x`` - a ring element to be coerced; o... | def __call__(self, *args): """ Coerces the element into the ring. You may pass a vector in the ambient space, an element of the base_ring, or an argument list of integers (or half-integers for the spin types) which are the components of a vector in the ambient space. INPUT: - ``x`` - a ring element to be coerced; o... | 462,280 |
def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self. EXAMPLES:: sage: rs = Tableau([[1,2,3],[4,5]]).row_stabilizer() sage: rs.order() == factorial(3)*factorial(2) True sage: PermutationGroupElement([(1,3,2),(4,5)]) in rs True sage: PermutationGroupElement([(1,4)]) in ... | def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self. EXAMPLES:: sage: rs = Tableau([[1,2,3],[4,5]]).row_stabilizer() sage: rs.order() == factorial(3)*factorial(2) True sage: PermutationGroupElement([(1,3,2),(4,5)]) in rs True sage: PermutationGroupElement([(1,4)]) in ... | 462,281 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,282 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,283 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,284 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,285 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,286 |
def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | def vectors_by_length(self, bound): """ Returns a list of short vectors together with their values. This is a naive algorithm which uses the Cholesky decomposition, but does not use the LLL-reduction algorithm. INPUT: bound -- an integer >= 0 OUTPUT: A list L of length (bound + 1) whose entry L[i] is a list of all v... | 462,287 |
def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (20... | def _limit_latex_(self, f, x, a): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hos... | 462,288 |
def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (20... | def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f = function('f',x) sage: _limit_latex_(0, f, x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (2009-... | 462,289 |
def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (20... | def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (20... | 462,290 |
def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | def _integrate_latex_(self, f, x, *args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integr... | 462,291 |
def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f = function('f',x) sage: _integrate_latex_(0,f,x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f(x),... | 462,292 |
def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(0... | 462,293 |
def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | 462,294 |
def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | def _integrate_latex_(*args): r""" Return LaTeX expression for integration of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _integrate_latex_ sage: var('x,a,b') (x, a, b) sage: f(x) = function('f',x) sage: _integrate_latex_(f(x),x) '\\int f\\left(x\\right)\\,{d x}' sage: _integrate_latex_(f... | 462,295 |
def _laplace_latex_(*args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AUTHORS:... | def _laplace_latex_(self, *args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AU... | 462,296 |
def _laplace_latex_(*args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f(t) = function('f',t) sage: _laplace_latex_(f(t),t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AUTHORS:... | def _laplace_latex_(*args): r""" Return LaTeX expression for Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _laplace_latex_ sage: var('s,t') (s, t) sage: f = function('f',t) sage: _laplace_latex_(0,f,t,s) '\\mathcal{L}\\left(f\\left(t\\right), t, s\\right)' AUTHORS: - ... | 462,297 |
def _inverse_laplace_latex_(*args): r""" Return LaTeX expression for inverse Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _inverse_laplace_latex_ sage: var('s,t') (s, t) sage: F(s) = function('F',s) sage: _inverse_laplace_latex_(F(s),s,t) '\\mathcal{L}^{-1}\\left(F\\le... | def _inverse_laplace_latex_(self, *args): r""" Return LaTeX expression for inverse Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _inverse_laplace_latex_ sage: var('s,t') (s, t) sage: F(s) = function('F',s) sage: _inverse_laplace_latex_(F(s),s,t) '\\mathcal{L}^{-1}\\left... | 462,298 |
def _inverse_laplace_latex_(*args): r""" Return LaTeX expression for inverse Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _inverse_laplace_latex_ sage: var('s,t') (s, t) sage: F(s) = function('F',s) sage: _inverse_laplace_latex_(F(s),s,t) '\\mathcal{L}^{-1}\\left(F\\le... | def _inverse_laplace_latex_(*args): r""" Return LaTeX expression for inverse Laplace transform of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _inverse_laplace_latex_ sage: var('s,t') (s, t) sage: F = function('F',s) sage: _inverse_laplace_latex_(0,F,s,t) '\\mathcal{L}^{-1}\\left(F\\left(s... | 462,299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.