rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
if viewer == "pdf": pdflatex = True if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"]
if pdflatex: engine = "pdflatex" else: engine = _Latex_prefs._option["engine"] if viewer == "pdf" and engine == "latex": engine = "pdflatex"
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
suffix = _run_latex_(tex_file, debug=debug, pdflatex=pdflatex, png=False)
suffix = _run_latex_(tex_file, debug=debug, engine=engine, png=False)
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
do_in_background=False, tiny=False, pdflatex=True):
do_in_background=False, tiny=False, pdflatex=True, engine='pdflatex'):
def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
- ``pdflatex`` - bool (default: False): use pdflatex.
- ``pdflatex`` - bool (default: True): use pdflatex. This option is deprecated. Use ``engine`` option instead. See below. - ``engine`` - 'latex', 'pdflatex', or 'xelatex' (default: 'pdflatex')
def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
pdflatex=pdflatex)
engine=engine)
def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
def repr_lincomb(symbols, coeffs): r""" Compute a latex representation of a linear combination of some formal symbols. INPUT: - ``symbols`` - list of symbols - ``coeffs`` - list of coefficients of the symbols OUTPUT: a string EXAMPLES:: sage: t = PolynomialRing(QQ, 't').0 sage: from sage.misc.latex import repr_...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
def print_or_typeset(object): r""" 'view' or 'print' the object depending on the situation. In particular, if in notebook mode with the typeset box checked, view the object. Otherwise, print the object. INPUT: object: anything EXAMPLES:: sage: sage.misc.latex.print_or_typeset(3) 3 sage: sage.misc.latex.EMBEDDED_MOD...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
def pretty_print (object): r""" Try to pretty print an object in an intelligent way. For graphics objects, this returns their default representation. For other objects, in the notebook, this calls the :func:`view` command, while from the command line, this produces an html string suitable for processing by jsMath. I...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
def pretty_print_default(enable=True): r""" Enable or disable default pretty printing. Pretty printing means rendering things so that jsMath or some other latex-aware front end can render real math. INPUT: - ``enable`` - bool (optional, default True). If True, turn on pretty printing; if False, turn it off. EXAMPL...
0ba327bff9f9e2dd4e53c3716295af7ddd946dea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0ba327bff9f9e2dd4e53c3716295af7ddd946dea/latex.py
**NOTE: precision loss if P,Q in the infinite disc INPUT: - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points) OUTPUT: the Coleman integrals \int_P^Q w_i for w_i basis elements
Computes the Coleman integrals on basis differentials INPUT: - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points) OUTPUT: the Coleman integrals \int_P^Q w_i for w_i basis elements
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
sage: K = pAdicField(11, 5) sage: x = polygen(K) sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16) sage: P = C.lift_x(2) sage: Q = C.lift_x(3) sage: C.coleman_integrals_on_basis(P, Q) (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*...
sage: K = pAdicField(11, 5) sage: x = polygen(K) sage: C = HyperellipticCurve(x^5 + 33/16*x^4 + 3/4*x^3 + 3/8*x^2 - 1/4*x + 1/16) sage: P = C.lift_x(2) sage: Q = C.lift_x(3) sage: C.coleman_integrals_on_basis(P, Q) (9*11 + 11^2 + 11^3 + 5*11^4 + O(11^5), 2*11 + 7*11^2 + 4*11^3 + 8*11^4 + O(11^5), 6 + 9*11 + 8*11^3 + 9*...
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
dim = 2*self.genus()
prec = K.precision_cap() g = self.genus() dim = 2*g
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
return self.tiny_integrals_on_basis(P,Q)
return self.tiny_integrals_on_basis(P,Q)
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
L = [f(R(PP[0]), R(PP[1])) for f in forms]
L = [f(PP[0], PP[1]) for f in forms]
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def coleman_integrals_on_basis(self, P, Q, algorithm=None): """
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
- w differential (if one of P,Q is Weierstrass, w must be odd)
- w differential (if one of P,Q is Weierstrass, w must be odd)
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
A simple example, integrating dx::
A simple example, integrating dx:
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
Yet another example::
Yet another example:
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
sage: HK.coleman_integral(w*x^3,S,P) 2*5^2 + 4*5^3 + 5^6 + 2*5^7 + O(5^8) sage: negP = HK(0,-3) sage: HK.coleman_integral(w, P,negP, algorithm='teichmuller') 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) sage: HK.coleman_integral(w, P, negP) 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) AUTHORS:
sage: HK.coleman_integral(w*x^3,S,P) 2*5^2 + 4*5^3 + 5^6 + 2*5^7 + O(5^8) sage: negP = HK(0,-3) sage: HK.coleman_integral(w, P,negP, algorithm='teichmuller') 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) sage: HK.coleman_integral(w, P, negP) 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) AUTHORS:
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
def curve_over_ram_extn(self,deg): """ self over Qp(p^(1/deg)) INPUT: - deg: the degree of the ramified extension OUTPUT: self over Qp(p^(1/deg))
3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3d26436b5a6a2d157eb8a8eec15fffa2f9b3a375/hyperelliptic_padic_field.py
sage: import operator
def derivative(self, ex, operator): """ EXAMPLES::
027af8145db6e23a98d3da9ca2d6b8b1492735c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/027af8145db6e23a98d3da9ca2d6b8b1492735c0/expression_conversions.py
sage: a = function('f', x).diff(x); a
sage: f = function('f') sage: a = f(x).diff(x); a
def derivative(self, ex, operator): """ EXAMPLES::
027af8145db6e23a98d3da9ca2d6b8b1492735c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/027af8145db6e23a98d3da9ca2d6b8b1492735c0/expression_conversions.py
sage: b = function('f', x).diff(x).diff(x)
sage: b = f(x).diff(x, x)
def derivative(self, ex, operator): """ EXAMPLES::
027af8145db6e23a98d3da9ca2d6b8b1492735c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/027af8145db6e23a98d3da9ca2d6b8b1492735c0/expression_conversions.py
args = ex.args()
args = ex.operands()
def derivative(self, ex, operator): """ EXAMPLES::
027af8145db6e23a98d3da9ca2d6b8b1492735c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/027af8145db6e23a98d3da9ca2d6b8b1492735c0/expression_conversions.py
return HeckeModuleElement.__mul__(self, other)
return element.HeckeModuleElement.__mul__(self, other)
def __mul__(self, other): r""" Calculate the product self * other.
0eb935c3778fcc6ae75e40ba4318bef331849165 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0eb935c3778fcc6ae75e40ba4318bef331849165/element.py
sage: c = c2 = 1
sage: c == c2 calling __eq__ defined in Metaclass True
def metaclass(name, bases): """ Creates a new class in this metaclass INPUT:: - name: a string - bases: a tuple of classes EXAMPLES:: sage: from sage.misc.test_class_pickling import metaclass, bar sage: c = metaclass("foo2", (object, bar,)) constructing class sage: c <class 'sage.misc.test_class_pickling.foo2'> sage...
1428cba495a66f5f52e20cb43835f61e683ccb4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1428cba495a66f5f52e20cb43835f61e683ccb4a/test_class_pickling.py
return matrix_space.MatrixSpace(ring, n, n, sparse).identity_matrix()
return matrix_space.MatrixSpace(ring, n, n, sparse)(1)
def identity_matrix(ring, n=0, sparse=False): r""" Return the `n \times n` identity matrix over the given ring. The default ring is the integers. EXAMPLES:: sage: M = identity_matrix(QQ, 2); M [1 0] [0 1] sage: M.parent() Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: M = identity_matrix(2); M [...
aed9ca519fe05998fd9566d370d8a785c9be44f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/aed9ca519fe05998fd9566d370d8a785c9be44f1/constructor.py
return matrix_space.MatrixSpace(ring, nrows, ncols, sparse).zero_matrix()
return matrix_space.MatrixSpace(ring, nrows, ncols, sparse)(0)
def zero_matrix(ring, nrows, ncols=None, sparse=False): r""" Return the `nrows \times ncols` zero matrix over the given ring. The default ring is the integers. EXAMPLES:: sage: M = zero_matrix(QQ, 2); M [0 0] [0 0] sage: M.parent() Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: M = zero_matrix(2...
aed9ca519fe05998fd9566d370d8a785c9be44f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/aed9ca519fe05998fd9566d370d8a785c9be44f1/constructor.py
if order is Infinity:
if order == 1: if isinstance(w, (tuple,str,list)): length = 'finite' elif isinstance(w, FiniteWord_class): length = sum(self._morph[a].length() * b for (a,b) in w.evaluation_dict().iteritems()) elif hasattr(w, '__iter__'): length = Infinity datatype = 'iter' elif w in self._domain.alphabet(): return self._morph[w] els...
def __call__(self, w, order=1, datatype='iter'): r""" Returns the image of ``w`` under self to the given order. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
if not isinstance(order, (int,Integer)) or order < 0 : raise TypeError, "order (%s) must be a positive integer or plus Infinity" % order
elif isinstance(order, (int,Integer)) and order > 1: return self(self(w, order-1),datatype=datatype)
def __call__(self, w, order=1, datatype='iter'): r""" Returns the image of ``w`` under self to the given order. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
elif order == 1: if isinstance(w, (tuple,str,list)): length = 'finite' elif isinstance(w, FiniteWord_class): length = sum(self._morph[a].length() * b for (a,b) in w.evaluation_dict().iteritems()) elif hasattr(w, '__iter__'): length = Infinity datatype = 'iter' elif w in self._domain.alphabet(): w = [w] length = 'finit...
else: raise TypeError, "order (%s) must be a positive integer or plus Infinity" % order
def __call__(self, w, order=1, datatype='iter'): r""" Returns the image of ``w`` under self to the given order. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
if not isinstance(self.codomain(),Words_all):
if not isinstance(self.codomain(), Words_all):
def is_prolongable(self, letter): r""" Returns ``True`` if ``self`` is prolongable on ``letter``. A morphism `\varphi` is prolongable on a letter `a` if `a` is a prefix of `\varphi(a)`. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
def is_prolongable(self, letter): r""" Returns ``True`` if ``self`` is prolongable on ``letter``. A morphism `\varphi` is prolongable on a letter `a` if `a` is a prefix of `\varphi(a)`. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
image = self(letter)
image = self.image(letter)
def is_prolongable(self, letter): r""" Returns ``True`` if ``self`` is prolongable on ``letter``. A morphism `\varphi` is prolongable on a letter `a` if `a` is a prefix of `\varphi(a)`. INPUT:
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
def letter_iterator(self, letter):
def _fixed_point_iterator(self, letter):
def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
sage: list(m.letter_iterator('b')) Traceback (most recent call last): ... TypeError: self must be prolongable on b sage: list(m.letter_iterator('a'))
sage: list(m._fixed_point_iterator('a'))
def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
sage: m = WordMorphism('a->aa,b->aac') sage: list(m.letter_iterator('a')) Traceback (most recent call last): ... TypeError: self (=WordMorphism: a->aa, b->aac) is not a endomorphism """ if not self.is_endomorphism(): raise TypeError, "self (=%s) is not a endomorphism"%self if not self.is_prolongable(letter=letter): ra...
The morphism must be prolongable on the letter:: sage: list(m._fixed_point_iterator('b')) Traceback (most recent call last): ... IndexError: pop from empty list The morphism must be an endomorphism:: sage: m = WordMorphism('a->ac,b->aac') sage: list(m._fixed_point_iterator('a')) Traceback (most recent call last): ....
def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
for a in self(w.pop(0)):
for a in self.image(w.pop(0)):
def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
w.extend(self(w[0]))
w.extend(self.image(w[0]))
def letter_iterator(self, letter): r""" Returns an iterator of the letters of the fixed point of ``self`` starting with ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
image = self(letter)
image = self.image(letter)
def fixed_point(self, letter): r""" Returns the fixed point of ``self`` beginning by the given ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
w = self.codomain()(self.letter_iterator(letter), datatype='iter')
w = self.codomain()(self._fixed_point_iterator(letter), datatype='iter')
def fixed_point(self, letter): r""" Returns the fixed point of ``self`` beginning by the given ``letter``.
63ef5a16a7bf336ae877bde43a56785e2ceb33e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/63ef5a16a7bf336ae877bde43a56785e2ceb33e0/morphism.py
""" return Vobj.evaluated_on(self)
If you pass a vector, it is assumed to be the coordinate vector of a point:: sage: ineq.eval( vector(ZZ, [3,2]) ) -4 """ try: return Vobj.evaluated_on(self) except AttributeError: return self.A() * Vobj + self.b()
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...
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
is_inequality.__doc__ = Hrepresentation.is_inequality.__doc__
def is_inequality(self): """ Returns True since this is, by construction, an inequality.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
"""
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_vector(): return self.polyhedron()...
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.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
is_equation.__doc__ = Hrepresentation.is_equation.__doc__
def is_equation(self): """ Tests if this object is an equation. By construction, it must be.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
is_vertex.__doc__ = Vrepresentation.is_vertex.__doc__
def is_vertex(self): """ Tests if this object is a vertex. By construction it always is.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
is_ray.__doc__ = Vrepresentation.is_ray.__doc__
def is_ray(self): """ Tests if this object is a ray. Always True by construction.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
is_line.__doc__ = Vrepresentation.is_line.__doc__
def is_line(self): """ Tests if the object is a line. By construction it must be.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
Returns the identity projection.
Returns the identity projection of the polyhedron.
def identity(self): """ Returns the identity projection.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
identity.__doc__ = projection_func_identity.__doc__
def identity(self): """ Returns the identity projection.
4f94440726307f6fb686e67d7e25c1ce5bba86fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4f94440726307f6fb686e67d7e25c1ce5bba86fe/polyhedra.py
"""
r"""
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b/graph_generators.py
Let q be an integer and let m_1,m_2,...m_k be a set of positive integers. Let n=q+m_1+...+m_k. The Fuzzy Ball graph with partition m_1,m_2,...,m_k and q extra vertices is the graph constructed from the graph G=K_n by attaching, for each i=1,2,...,k, a new vertex a_i to m_i distinct vertices of G. For given positive ...
Let `q` be an integer and let `m_1,m_2,...,m_k` be a set of positive integers. Let `n=q+m_1+...+m_k`. The Fuzzy Ball graph with partition `m_1,m_2,...,m_k` and `q` extra vertices is the graph constructed from the graph `G=K_n` by attaching, for each `i=1,2,...,k`, a new vertex `a_i` to `m_i` distinct vertices of `G`....
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b/graph_generators.py
Pick positive integers m and k and a nonnegative integer q. All the FuzzyBallGraphs constructed from partitions of m with k parts should be cospectral with respect to the normalized
Pick positive integers `m` and `k` and a nonnegative integer `q`. All the FuzzyBallGraphs constructed from partitions of `m` with `k` parts should be cospectral with respect to the normalized
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e5d2008ccbbff33a4cf9a0b611f8b5da0eaafb9b/graph_generators.py
This function is an automatic generated pexpect wrapper around the Singular
This function is an automatically generated pexpect wrapper around the Singular
def _sage_doc_(self): """ EXAMPLES:: sage: 'groebner' in singular.groebner._sage_doc_() True """ if not nodes: generate_docstring_dictionary()
ace25cb0c3f892cc7739094ca7ca5e3c40d314e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ace25cb0c3f892cc7739094ca7ca5e3c40d314e6/singular.py
P1 = P[0]; P2 = P[1]
P1 = P[0] P2 = P[1] if is_Integer(P1) and is_Integer(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) P2 = R(P2) return JacobianMorphism_divisor_class_field(self, tuple([P1,P2])) if is_Integer(P1) and is_Polynomial(P2): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) return JacobianMorphism_divisor_clas...
def __call__(self, P): r""" Returns a rational point P in the abstract Homset J(K), given: 0. A point P in J = Jac(C), returning P; 1. A point P on the curve C such that J = Jac(C), where C is an odd degree model, returning [P - oo]; 2. A pair of points (P, Q) on the curve C such that J = Jac(C), returning [P-Q]; 2. A...
65e7fac5d669b56aef576bb330d519b8f4e98fc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/65e7fac5d669b56aef576bb330d519b8f4e98fc0/jacobian_homset.py
for i in xrange(0, l - 2):
for i in xrange(0, l-1):
def is_square_free(self): r""" Returns True if self does not contain squares, and False otherwise. EXAMPLES:: sage: W = Words('123') sage: W('12312').is_square_free() True sage: W('31212').is_square_free() False sage: W().is_square_free() True """ l = self.length() if l < 2: return True suff = self for i in xrange(0,...
3658b791e2b5b907102d4fefa6fe3f5b9cf578f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/3658b791e2b5b907102d4fefa6fe3f5b9cf578f7/finite_word.py
Return a list of the edges of the graph as triples (u,v,l) where u and v are vertices and l is a label.
Return a list of edges. Each edge is a triple (u,v,l) where u and v are vertices and l is a label. If the parameter ``labels`` is False then a list of couple (u,v) is returned where u and v are vertices.
def edges(self, labels=True, sort=True, key=None): r""" Return a list of the edges of the graph as triples (u,v,l) where u and v are vertices and l is a label.
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
def edge_boundary(self, vertices1, vertices2=None, labels=True):
def edge_boundary(self, vertices1, vertices2=None, labels=True, sort=True):
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
sage: G = graphs.PetersenGraph()
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
""" vertices1 = [v for v in vertices1 if v in self] output = []
sage: G.edge_boundary([2], [0]) [(0, 2, {})] """ vertices1 = set([v for v in vertices1 if v in self])
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
output.extend(self.outgoing_edge_iterator(vertices1,labels=labels))
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
output = [e for e in output if e[1] in vertices2]
vertices2 = set([v for v in vertices2 if v in self]) output = [e for e in self.outgoing_edge_iterator(vertices1,labels=labels) if e[1] in vertices2]
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
output = [e for e in output if e[1] not in vertices1] return output
output = [e for e in self.outgoing_edge_iterator(vertices1,labels=labels) if e[1] not in vertices1]
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
output.extend(self.edge_iterator(vertices1,labels=labels)) output2 = []
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
for e in output: if e[0] in vertices1: if e[1] in vertices2: output2.append(e) elif e[0] in vertices2: output2.append(e)
vertices2 = set([v for v in vertices2 if v in self]) output = [e for e in self.edge_iterator(vertices1,labels=labels) if (e[0] in vertices1 and e[1] in vertices2) or (e[1] in vertices1 and e[0] in vertices2)]
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
for e in output: if e[0] in vertices1: if e[1] not in vertices1: output2.append(e) elif e[0] not in vertices1: output2.append(e) return output2
output = [e for e in self.edge_iterator(vertices1,labels=labels) if e[1] not in vertices1 or e[0] not in vertices1] if sort: output.sort() return output
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an ...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only.
Returns an iterator over edges. The iterator returned is over the edges incident with any vertex given in the parameter ``vertices``. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only.
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
- ``vertices`` - (default: None) a vertex, a list of vertices or None
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
- ``ignore_direction`` - (default False) only applies
- ``ignore_direction`` - bool (default: False) - only applies
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
for e in self._backend.iterator_out_edges(vertices, labels): yield e for e in self._backend.iterator_in_edges(vertices, labels): yield e
from itertools import chain return chain(self._backend.iterator_out_edges(vertices, labels), self._backend.iterator_in_edges(vertices, labels))
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
for e in self._backend.iterator_out_edges(vertices, labels): yield e
return self._backend.iterator_out_edges(vertices, labels)
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
for e in self._backend.iterator_edges(vertices, labels): yield e def edges_incident(self, vertices=None, labels=True): """ Returns a list of edges incident with any vertex given. If vertices
return self._backend.iterator_edges(vertices, labels) def edges_incident(self, vertices=None, labels=True, sort=True): """ Returns incident edges to some vertices. If ``vertices` is a vertex, then it returns the list of edges incident to that vertex. If ``vertices`` is a list of vertices then it returns the list of a...
def edge_iterator(self, vertices=None, labels=True, ignore_direction=False): """ Returns an iterator over the edges incident with any vertex given. If the graph is directed, iterates over edges going out only. If vertices is None, then returns an iterator over all edges. If self is directed, returns outgoing edges only...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
- ``label`` - if False, each edge is a tuple (u,v) of vertices.
- ``vertices`` - object (default: None) - a vertex, a list of vertices or None. - ``labels`` - bool (default: True) - if False, each edge is a tuple (u,v) of vertices. - ``sort`` - bool (default: True) - if True the returned list is sorted.
def edges_incident(self, vertices=None, labels=True): """ Returns a list of edges incident with any vertex given. If vertices is None, returns a list of all edges in graph. For digraphs, only lists outward edges. INPUT: - ``label`` - if False, each edge is a tuple (u,v) of vertices. EXAMPLES:: sage: graphs.Peter...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
v = list(self.edge_boundary(vertices, labels=labels)) v.sort() return v
if sort: return sorted(self.edge_iterator(vertices=vertices,labels=labels)) return list(self.edge_iterator(vertices=vertices,labels=labels))
def edges_incident(self, vertices=None, labels=True): """ Returns a list of edges incident with any vertex given. If vertices is None, returns a list of all edges in graph. For digraphs, only lists outward edges. INPUT: - ``label`` - if False, each edge is a tuple (u,v) of vertices. EXAMPLES:: sage: graphs.Peter...
e92672ad33fbb51945fec0fd0603282fca8d5783 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e92672ad33fbb51945fec0fd0603282fca8d5783/generic_graph.py
"""
r"""
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
7d7db5252f36fea2d87565cac78d6b6e8b3c44b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7d7db5252f36fea2d87565cac78d6b6e8b3c44b4/graph_generators.py
Let q be an integer and let m_1,m_2,...m_k be a set of positive integers. Let n=q+m_1+...+m_k. The Fuzzy Ball graph with partition m_1,m_2,...,m_k and q extra vertices is the graph constructed from the graph G=K_n by attaching, for each i=1,2,...,k, a new vertex a_i to m_i distinct vertices of G. For given positive ...
Let `q` be an integer and let `m_1,m_2,...,m_k` be a set of positive integers. Let `n=q+m_1+...+m_k`. The Fuzzy Ball graph with partition `m_1,m_2,...,m_k` and `q` extra vertices is the graph constructed from the graph `G=K_n` by attaching, for each `i=1,2,...,k`, a new vertex `a_i` to `m_i` distinct vertices of `G`....
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
7d7db5252f36fea2d87565cac78d6b6e8b3c44b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7d7db5252f36fea2d87565cac78d6b6e8b3c44b4/graph_generators.py
Pick positive integers m and k and a nonnegative integer q. All the FuzzyBallGraphs constructed from partitions of m with k parts should be cospectral with respect to the normalized
Pick positive integers `m` and `k` and a nonnegative integer `q`. All the FuzzyBallGraphs constructed from partitions of `m` with `k` parts should be cospectral with respect to the normalized
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
7d7db5252f36fea2d87565cac78d6b6e8b3c44b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7d7db5252f36fea2d87565cac78d6b6e8b3c44b4/graph_generators.py
this function is not called) is n=15, but it might have to be
this function is not called) is ``n=15``, but it might have to be
def set_precision(n): r""" Set the global NTL real number precision. This has a massive effect on the speed of mwrank calculations. The default (used if this function is not called) is n=15, but it might have to be increased if a computation fails. In this case, one must recreate the mwrank curve from scratch after ...
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
- `n` (long) -- real precision used for floating point
- ``n`` (long) -- real precision used for floating point
def set_precision(n): r""" Set the global NTL real number precision. This has a massive effect on the speed of mwrank calculations. The default (used if this function is not called) is n=15, but it might have to be increased if a computation fails. In this case, one must recreate the mwrank curve from scratch after ...
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
.. note:: This change is global and affects all of Sage.
.. warning:: This change is global and affects *all* of Sage.
def set_precision(n): r""" Set the global NTL real number precision. This has a massive effect on the speed of mwrank calculations. The default (used if this function is not called) is n=15, but it might have to be increased if a computation fails. In this case, one must recreate the mwrank curve from scratch after ...
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
curve using the Curvedata class from eclib, called here an 'mwrank
curve using the ``Curvedata`` class from ``eclib``, called here an 'mwrank
def set_precision(n): r""" Set the global NTL real number precision. This has a massive effect on the speed of mwrank calculations. The default (used if this function is not called) is n=15, but it might have to be increased if a computation fails. In this case, one must recreate the mwrank curve from scratch after ...
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$. If strictly less than 5 invariants are given, then the first ones are set to 0, so, e.g., ``[3,4] means `a_1=a_2=a_3=0` and `a_4=3`, `a_6=4`. INPUT: - `ainvs` (list or tuple) -- a list of <= 5 integers, the coefficients o...
``ainvs``, which is a list of 5 or less *integers* `a_1`, `a_2`, `a_3`, `a_4`, and `a_5`. See the docstring of this class for full documentation.
def __init__(self, ainvs, verbose=False): r""" Create the mwrank elliptic curve with invariants ``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
This example illustrates that omitted $a$-invariants default to $0$:: sage: e = mwrank_EllipticCurve([3, -4]) sage: e y^2 = x^3 + 3*x - 4 sage: e.ainvs() [0, 0, 0, 3, -4] The entries of the input list are coerced to :class:`int`. If this is impossible then an error is raised:: sage: e = mwrank_EllipticCurve([3, -4....
def __init__(self, ainvs, verbose=False): r""" Create the mwrank elliptic curve with invariants ``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
if not isinstance(ainvs, list) and len(ainvs) <= 5: raise TypeError, "ainvs must be a list of length at most 5."
if not isinstance(ainvs, (list,tuple)) or not len(ainvs) <= 5: raise TypeError, "ainvs must be a list or tuple of length at most 5."
def __init__(self, ainvs, verbose=False): r""" Create the mwrank elliptic curve with invariants ``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
def __init__(self, ainvs, verbose=False): r""" Create the mwrank elliptic curve with invariants ``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
raise TypeError, "ainvs must be a list of integers."
raise TypeError, "ainvs must be a list or tuple of integers."
def __init__(self, ainvs, verbose=False): r""" Create the mwrank elliptic curve with invariants ``a_invs``, which is a list of `\leq 5` \emph{integers} `a_1`, `a_2`, `a_3`, `a_4`, and `a_`$.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
Set the verbosity of printing of output by the 2-descent and
Set the verbosity of printing of output by the :meth:`two_descent()` and
def set_verbose(self, verbose): """ Set the verbosity of printing of output by the 2-descent and other functions.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
- `verbose` (int) -- if positive, print lots of output when
- ``verbose`` (int) -- if positive, print lots of output when
def set_verbose(self, verbose): """ Set the verbosity of printing of output by the 2-descent and other functions.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
sage: E.saturate()
sage: E.saturate()
def set_verbose(self, verbose): """ Set the verbosity of printing of output by the 2-descent and other functions.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
Returns the underlying _Curvedata class for this mwrank elliptic curve.
Returns the underlying :class:`_Curvedata` class for this mwrank elliptic curve.
def _curve_data(self): r""" Returns the underlying _Curvedata class for this mwrank elliptic curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
- ``verbose`` (bool, default True) -- print what mwrank is doing - ``selmer_only`` (bool, default False) -- selmer_only switch
- ``verbose`` (bool, default ``True``) -- print what mwrank is doing. - ``selmer_only`` (bool, default ``False``) -- ``selmer_only`` switch.
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
quartic point search - ``second_limit`` (int, default 8) -- bound on `\log `max(|x|,|z|)`, i.e. logarithmic
quartic point search. - ``second_limit`` (int, default 8) -- bound on `\log \max(|x|,|z|)`, i.e. logarithmic.
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
quartic search. n_aux=-1 causes default (8) to be used.
quartic search. ``n_aux=-1`` causes default (8) to be used.
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py
- ``second_descent`` (bool, default True) -- (only relevant
- ``second_descent`` (bool, default ``True``) -- (only relevant
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve.
1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py