rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
Return the number of the `n`-th partial convergent, computed | Return the numerator of the `n`-th partial convergent, computed | def pn(self, n): """ Return the number of the `n`-th partial convergent, computed using the recurrence. EXAMPLES:: sage: c = continued_fraction(pi); c [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 3] sage: c.pn(0), c.qn(0) (3, 1) sage: len(c) 14 sage: c.pn(13), c.qn(13) (245850922, 78256779) """ if n < -2: raise ValueE... | 434bed096693e8a29dd37764ec14acec270fb285 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/434bed096693e8a29dd37764ec14acec270fb285/contfrac.py |
Return the (unique) field of all contiued fractions. | Return the (unique) field of all continued fractions. | def ContinuedFractionField(): """ Return the (unique) field of all contiued fractions. EXAMPLES:: sage: ContinuedFractionField() Field of all continued fractions """ return CFF | 434bed096693e8a29dd37764ec14acec270fb285 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/434bed096693e8a29dd37764ec14acec270fb285/contfrac.py |
return HeckeModuleElement.__mul__(self, other) | return element.HeckeModuleElement.__mul__(self, other) | def __mul__(self, other): r""" Calculate the product self * other. | 86d3f3cea3bb8ee0514d0c96d814d0312220ab5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/86d3f3cea3bb8ee0514d0c96d814d0312220ab5d/element.py |
be overfull if : - `n` is odd - It satisfies `2m > (n-1)\Delta(G)`, where `\Delta(G)` denotes the maximal degree of a vertex in `G` | be overfull if: - `n` is odd - It satisfies `2m > (n-1)\Delta(G)`, where `\Delta(G)` denotes the maximum degree among all vertices in `G`. | def is_overfull(self): r""" Tests whether the current graph is overfull. | 5a08a4b6797353b1df4b3cac50929d60c46dbc2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5a08a4b6797353b1df4b3cac50929d60c46dbc2a/generic_graph.py |
EXAMPLE: A complete graph is overfull if and only if its number of vertices is odd:: | EXAMPLES: A complete graph of order `n > 1` is overfull if and only if `n` is odd:: | def is_overfull(self): r""" Tests whether the current graph is overfull. | 5a08a4b6797353b1df4b3cac50929d60c46dbc2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5a08a4b6797353b1df4b3cac50929d60c46dbc2a/generic_graph.py |
return (self.order() % 2 == 1) and \ (2*self.size() > max(self.degree())*(self.order()-1)) | return (self.order() % 2 == 1) and ( 2 * self.size() > max(self.degree()) * (self.order() - 1)) | def is_overfull(self): r""" Tests whether the current graph is overfull. | 5a08a4b6797353b1df4b3cac50929d60c46dbc2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5a08a4b6797353b1df4b3cac50929d60c46dbc2a/generic_graph.py |
key = (polynomial, polynomial.base_ring(), name, embedding, embedding.parent() if embedding is not None else None) | key = (polynomial, polynomial.base_ring(), name, latex_name, embedding, embedding.parent() if embedding is not None else None) | def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over ... | 50ecaddcdf6c090021a32699362c67dd9c57cb0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/50ecaddcdf6c090021a32699362c67dd9c57cb0e/number_field.py |
def QuadraticField(D, names, check=True, embedding=True, latex_name=None): | def QuadraticField(D, names, check=True, embedding=True, latex_name='sqrt'): | def QuadraticField(D, names, check=True, embedding=True, latex_name=None): r""" Return a quadratic field obtained by adjoining a square root of `D` to the rational numbers, where `D` is not a perfect square. INPUT: - ``D`` - a rational number - ``names`` - variable name - ``check`` - bool (default: True) - ``... | 50ecaddcdf6c090021a32699362c67dd9c57cb0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/50ecaddcdf6c090021a32699362c67dd9c57cb0e/number_field.py |
root. | or upper half plane root. | def QuadraticField(D, names, check=True, embedding=True, latex_name=None): r""" Return a quadratic field obtained by adjoining a square root of `D` to the rational numbers, where `D` is not a perfect square. INPUT: - ``D`` - a rational number - ``names`` - variable name - ``check`` - bool (default: True) - ``... | 50ecaddcdf6c090021a32699362c67dd9c57cb0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/50ecaddcdf6c090021a32699362c67dd9c57cb0e/number_field.py |
We can give the generator a special name for latex:: | By default, quadratic fields come with a nice latex representation:: sage: K.<a> = QuadraticField(-7) sage: latex(a) \sqrt{-7} sage: latex(1/(1+a)) -\frac{1}{8} \sqrt{-7} + \frac{1}{8} sage: K.latex_variable_name() '\\sqrt{-7}' We can provide our own name as well:: | def QuadraticField(D, names, check=True, embedding=True, latex_name=None): r""" Return a quadratic field obtained by adjoining a square root of `D` to the rational numbers, where `D` is not a perfect square. INPUT: - ``D`` - a rational number - ``names`` - variable name - ``check`` - bool (default: True) - ``... | 50ecaddcdf6c090021a32699362c67dd9c57cb0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/50ecaddcdf6c090021a32699362c67dd9c57cb0e/number_field.py |
occured. Please put there the version of sageq at the time of deprecation. | occurred. Please put there the version of sage at the time of deprecation. | def deprecation(message, version=None): r""" Issue a deprecation warning. INPUT: - ``message`` - an explanation why things are deprecated and by what it should be replaced. - ``version`` - (optional) on which version and when the deprecation occured. Please put there the version of sageq at the time of deprecation. ... | b59b61b90da8eb2d3c2f86164af7ce77b3bda33d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b59b61b90da8eb2d3c2f86164af7ce77b3bda33d/misc.py |
A wrapper around methods or functions wich automatically print the correct | A wrapper around methods or functions which automatically print the correct | sage: def bar(): | b59b61b90da8eb2d3c2f86164af7ce77b3bda33d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b59b61b90da8eb2d3c2f86164af7ce77b3bda33d/misc.py |
if options['labels']: | if options.get('labels', False): | def _render_on_subplot(self, subplot): """ TESTS: | 8a6b271e90b8643a7d5b590ff9a0e4a598e44a34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8a6b271e90b8643a7d5b590ff9a0e4a598e44a34/contour_plot.py |
if options['colorbar']: | if options.get('colorbar', False): | def _render_on_subplot(self, subplot): """ TESTS: | 8a6b271e90b8643a7d5b590ff9a0e4a598e44a34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8a6b271e90b8643a7d5b590ff9a0e4a598e44a34/contour_plot.py |
dict(contours=[-1e307, 0, 1e307], cmap=cmap, fill=True, labels=False, **options))) | dict(contours=[-1e307, 0, 1e307], cmap=cmap, fill=True, **options))) | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | 8a6b271e90b8643a7d5b590ff9a0e4a598e44a34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8a6b271e90b8643a7d5b590ff9a0e4a598e44a34/contour_plot.py |
contours=[0], cmap=[bordercol], fill=False, labels=False, **options))) | contours=[0], cmap=[bordercol], fill=False, **options))) | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth,**options): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax),... | 8a6b271e90b8643a7d5b590ff9a0e4a598e44a34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8a6b271e90b8643a7d5b590ff9a0e4a598e44a34/contour_plot.py |
sage: [ value, edges, [ setA, setB ]] = g.max_cut(vertices=True) sage: value == 5*6 | sage: [ value, edges, [ setA, setB ]] = g.max_cut(vertices=True) sage: value == 5*6 | def max_cut(self, value_only=True, use_edge_labels=True, vertices=False, solver=None, verbose=0): r""" Returns a maximum edge cut of the graph. For more information, see the `Wikipedia article on cuts <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: (bsetA == setA and bsetB == setB ) or ((bsetA == setB and bsetB == setA )) | sage: (bsetA == setA and bsetB == setB ) or ((bsetA == setB and bsetB == setA )) | def max_cut(self, value_only=True, use_edge_labels=True, vertices=False, solver=None, verbose=0): r""" Returns a maximum edge cut of the graph. For more information, see the `Wikipedia article on cuts <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.max_cut() | sage: g.max_cut() | def max_cut(self, value_only=True, use_edge_labels=True, vertices=False, solver=None, verbose=0): r""" Returns a maximum edge cut of the graph. For more information, see the `Wikipedia article on cuts <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.flow(1,2) | sage: g.flow(1,2) | def flow(self, x, y, value_only=True, integer=False, use_edge_labels=True, vertex_bound=False, solver=None, verbose=0): r""" Returns a maximum flow in the graph from ``x`` to ``y`` represented by an optimal valuation of the edges. For more information, see the `Wikipedia article on maximum flow <http://en.wikipedia.org... | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: b.flow(('00',1),('00',2)) | sage: b.flow(('00',1),('00',2)) | def flow(self, x, y, value_only=True, integer=False, use_edge_labels=True, vertex_bound=False, solver=None, verbose=0): r""" Returns a maximum flow in the graph from ``x`` to ``y`` represented by an optimal valuation of the edges. For more information, see the `Wikipedia article on maximum flow <http://en.wikipedia.org... | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.dominating_set(value_only=True) | sage: g.dominating_set(value_only=True) | def dominating_set(self, independent=False, value_only=False, solver=None, verbose=0): r""" Returns a minimum dominating set of the graph represented by the list of its vertices. For more information, see the `Wikipedia article on dominating sets <http://en.wikipedia.org/wiki/Dominating_set>`_. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: len(g.dominating_set()) | sage: len(g.dominating_set()) | def dominating_set(self, independent=False, value_only=False, solver=None, verbose=0): r""" Returns a minimum dominating set of the graph represented by the list of its vertices. For more information, see the `Wikipedia article on dominating sets <http://en.wikipedia.org/wiki/Dominating_set>`_. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: len(g.dominating_set(independent=True)) | sage: len(g.dominating_set(independent=True)) | def dominating_set(self, independent=False, value_only=False, solver=None, verbose=0): r""" Returns a minimum dominating set of the graph represented by the list of its vertices. For more information, see the `Wikipedia article on dominating sets <http://en.wikipedia.org/wiki/Dominating_set>`_. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.edge_connectivity() | sage: g.edge_connectivity() | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: [ value, edges, [ setA, setB ]] = g.edge_connectivity(vertices=True) sage: print value | sage: [ value, edges, [ setA, setB ]] = g.edge_connectivity(vertices=True) sage: print value | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: len(setA) == 1 or len(setB) == 1 | sage: len(setA) == 1 or len(setB) == 1 | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: cut.add_edges(edges) sage: cut.is_isomorphic(graphs.StarGraph(4)) | sage: cut.add_edges(edges) sage: cut.is_isomorphic(graphs.StarGraph(4)) | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: min(g.degree()) >= g.edge_connectivity() | sage: min(g.degree()) >= g.edge_connectivity() | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: minimum = min([l for u,v,l in tree.edge_iterator()]) sage: [value, [(u,v,l)]] = tree.edge_connectivity(value_only=False, use_edge_labels=True) sage: l == minimum | sage: minimum = min([l for u,v,l in tree.edge_iterator()]) sage: [value, [(u,v,l)]] = tree.edge_connectivity(value_only=False, use_edge_labels=True) sage: l == minimum | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.vertex_connectivity() | sage: g.vertex_connectivity() | def vertex_connectivity(self, value_only=True, sets=False, solver=None, verbose=0): r""" Returns the vertex connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: [value, cut, [ setA, setB ]] = g.vertex_connectivity(sets=True) sage: len(setA) == 1 or len(setB) == 1 | sage: [value, cut, [ setA, setB ]] = g.vertex_connectivity(sets=True) sage: len(setA) == 1 or len(setB) == 1 | def vertex_connectivity(self, value_only=True, sets=False, solver=None, verbose=0): r""" Returns the vertex connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: [val, [cut_vertex]] = tree.vertex_connectivity(value_only=False) sage: tree.degree(cut_vertex) > 1 | sage: [val, [cut_vertex]] = tree.vertex_connectivity(value_only=False) sage: tree.degree(cut_vertex) > 1 | def vertex_connectivity(self, value_only=True, sets=False, solver=None, verbose=0): r""" Returns the vertex connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.layout_graphviz() | sage: g.layout_graphviz() | def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.plot(layout = "graphviz") | sage: g.plot(layout = "graphviz") | def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.plot(layout = "graphviz", prog = "dot") sage: g.plot(layout = "graphviz", prog = "neato") sage: g.plot(layout = "graphviz", prog = "twopi") sage: g.plot(layout = "graphviz", prog = "fdp") | sage: g.plot(layout = "graphviz", prog = "dot") sage: g.plot(layout = "graphviz", prog = "neato") sage: g.plot(layout = "graphviz", prog = "twopi") sage: g.plot(layout = "graphviz", prog = "fdp") | def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
sage: g.plot(layout = "graphviz", prog = "circo") | sage: g.plot(layout = "graphviz", prog = "circo") | def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph. | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py |
solution is not SymbolisEquation (as happens for example for | solution is not SymbolicEquation (as happens for example for | def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False): """ Solves a 1st or 2nd order linear ODE via maxima. Including IVP and BVP. *Use* ``desolve? <tab>`` *if the output in truncated in notebook.* INPUT: - ``de`` - an expression or equation representing the ODE - ``dvar`` - the dependent... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
- ``ivar`` - (optional) the independent variable (hereafter called x), which must be specified if there is more than one independent variable in the equation. | - ``ivar`` - (optional) the independent variable (hereafter called x), which must be specified if there is more than one independent variable in the equation. | def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False): """ Solves a 1st or 2nd order linear ODE via maxima. Including IVP and BVP. *Use* ``desolve? <tab>`` *if the output in truncated in notebook.* INPUT: - ``de`` - an expression or equation representing the ODE - ``dvar`` - the dependent... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
""" | r""" | def desolve_system_strings(des,vars,ics=None): """ Solves any size system of 1st order ODE's. Initials conditions are optional. INPUT: de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = [... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = ["s","x","y"], where s is the independent variable and x,y the dependent variables) ics -- a list of numbers representing initial condit... | - ``de`` - a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") - ``vars`` - a list of strings representing the variables (eg, vars = ["s","x","y"], where s is the independent variable and x,y the dependent variables) - ``ics`` - a list of numbers representing in... | def desolve_system_strings(des,vars,ics=None): """ Solves any size system of 1st order ODE's. Initials conditions are optional. INPUT: de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = [... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
The given ics sets the initial values of the dependent vars in maxima, so subsequent ODEs involving these variables will have these initial conditions automatically imposed. EXAMPLES: | The given ics sets the initial values of the dependent vars in maxima, so subsequent ODEs involving these variables will have these initial conditions automatically imposed. EXAMPLES:: | def desolve_system_strings(des,vars,ics=None): """ Solves any size system of 1st order ODE's. Initials conditions are optional. INPUT: de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = [... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
Now type show(P1), show(P2) to view these. | Now type show(P1), show(P2) to view these. | def desolve_system_strings(des,vars,ics=None): """ Solves any size system of 1st order ODE's. Initials conditions are optional. INPUT: de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = [... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
AUTHORS: David Joyner (3-2006, 8-2007) | AUTHORS: - David Joyner (3-2006, 8-2007) | def desolve_system_strings(des,vars,ics=None): """ Solves any size system of 1st order ODE's. Initials conditions are optional. INPUT: de -- a list of strings representing the ODEs in maxima notation (eg, de = "diff(f(x),x,2)=diff(f(x),x)+sin(x)") vars -- a list of strings representing the variables (eg, vars = [... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
""" | r""" | def eulers_method(f,x0,y0,h,x1,method="table"): """ This implements Euler's method for finding numerically the solution of the 1st order ODE ``y' = f(x,y)``, ``y(a)=c``. The "x" column of the table increments from ``x0`` to ``x1`` by ``h`` (so ``(x1-x0)/h`` must be an integer). In the "y" column, the new y-value equals... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
""" | r""" | def eulers_method_2x2(f,g, t0, x0, y0, h, t1,method="table"): """ This implements Euler's method for finding numerically the solution of the 1st order system of two ODEs ``x' = f(t, x, y), x(t0)=x0.`` ``y' = g(t, x, y), y(t0)=y0.`` The "t" column of the table increments from `t_0` to `t_1` by `h` (so `\\frac{t_1-t_0... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
""" | r""" Plots solution of ODE | def eulers_method_2x2_plot(f,g, t0, x0, y0, h, t1): """ This plots the soln in the rectangle ``(xrange[0],xrange[1]) x (yrange[0],yrange[1])`` and plots using Euler's method the numerical solution of the 1st order ODEs `x' = f(t,x,y)`, `x(a)=x_0`, `y' = g(t,x,y)`, `y(a) = y_0`. *For pedagogical purposes only.* EXAMPL... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
`\\theta''+\\sin(\\theta)=0`, `\\theta(0)=\\frac 34`, `\\theta'(0) = | `\theta''+\sin(\theta)=0`, `\theta(0)=\frac 34`, `\theta'(0) = | def eulers_method_2x2_plot(f,g, t0, x0, y0, h, t1): """ This plots the soln in the rectangle ``(xrange[0],xrange[1]) x (yrange[0],yrange[1])`` and plots using Euler's method the numerical solution of the 1st order ODEs `x' = f(t,x,y)`, `x(a)=x_0`, `y' = g(t,x,y)`, `y(a) = y_0`. *For pedagogical purposes only.* EXAMPL... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
``(P[0]+P[1]).show()`` to plot `(t,\\theta(t))` and `(t,\\theta'(t))`:: sage: from sage.calculus.desolvers import eulers_method_2x2_plot | ``(P[0]+P[1]).show()`` to plot `(t,\theta(t))` and `(t,\theta'(t))`:: | def eulers_method_2x2_plot(f,g, t0, x0, y0, h, t1): """ This plots the soln in the rectangle ``(xrange[0],xrange[1]) x (yrange[0],yrange[1])`` and plots using Euler's method the numerical solution of the 1st order ODEs `x' = f(t,x,y)`, `x(a)=x_0`, `y' = g(t,x,y)`, `y(a) = y_0`. *For pedagogical purposes only.* EXAMPL... | a5e01917e5cb3eb9aa0a8033daad14821fe571aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a5e01917e5cb3eb9aa0a8033daad14821fe571aa/desolvers.py |
sage: F = e.formal_group().group_law(5); F t1 + O(t1^5) + (1 - 2*t1^4 + O(t1^5))*t2 + (-4*t1^3 + O(t1^5))*t2^2 + (-4*t1^2 - 30*t1^4 + O(t1^5))*t2^3 + (-2*t1 - 30*t1^3 + O(t1^5))*t2^4 + O(t2^5) sage: i = e.formal_group().inverse(5) | sage: e.formal_group().group_law(5) t1 + O(t1^5) + (1 - 2*t1^4 + O(t1^5))*t2 + (-4*t1^3 + O(t1^5))*t2^2 + (-4*t1^2 - 30*t1^4 + O(t1^5))*t2^3 + (-2*t1 - 30*t1^3 + O(t1^5))*t2^4 + O(t2^5) sage: e = EllipticCurve('14a1') sage: ehat = e.formal() sage: ehat.group_law(3) t1 + O(t1^3) + (1 - t1 - 4*t1^2 + O(t1^3))*t2 + (-4*t... | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py |
O(t^5) | O(t^7) | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py |
t1 + O(t1^4) + (1 + O(t1^4))*t2 + (-4*t1^3 + O(t1^4))*t2^2 + (-4*t1^2 + O(t1^4))*t2^3 + O(t2^4) | t1 + O(t1^4) + (1 + O(t1^4))*t2 + (2*t1^3 + O(t1^4))*t2^2 + (2*t1^2 + O(t1^4))*t2^3 + O(t2^4) Test for trac ticket 9646:: sage: P.<a1, a2, a3, a4, a6> = PolynomialRing(ZZ, 5) sage: E = EllipticCurve(list(P.gens())) sage: F = E.formal().group_law(prec = 4) sage: t2 = F.parent().gen() sage: t1 = F.parent().base_ring().... | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py |
if prec == 1: return R2(O(t2)) elif prec == 2: return R2(t1+t2 - self.curve().a1()*t1*t2) | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py | |
w = self.w(prec) | w = self.w(prec+1) | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py |
lam = sum([tsum(n)*w[n] for n in range(3,prec)]) w1 = R1(w, prec) | lam = sum([tsum(n)*w[n] for n in range(3,prec+1)]) w1 = R1(w, prec+1) | def group_law(self, prec=10): r""" The formal group law. INPUT: - ``prec`` - integer (default 10) OUTPUT: a power series with given precision in ZZ[[ ZZ[['t1']],'t2']] DETAILS: Return the formal power series .. math:: F(t_1, t_2) = t_1 + t_2 - a_1 t_1 t_2 - \cdots to precision `O(t^{prec})` of page 115 of [S... | a2c4453ffa3bb0d609bb14cd8559e945722298b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a2c4453ffa3bb0d609bb14cd8559e945722298b2/formal_group.py |
ValueError: polys (=[x - y, x*y]) must be homogeneous of the same degree | ValueError: polys (=[x - y, x*y]) must be of the same degree sage: H([x-1, x*y+x]) Traceback (most recent call last): ... ValueError: polys (=[x - 1, x*y + x]) must be homogeneous | def _repr_defn(self): """ This function is used internally for printing. | dc35fa9eb362e4e3522047a61d883aeec38a347f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/dc35fa9eb362e4e3522047a61d883aeec38a347f/morphism.py |
deg = self.defining_polynomials()[0].degree() for poly in self.defining_polynomials(): if (poly.degree() != deg) or not poly.is_homogeneous(): raise ValueError, "polys (=%s) must be homogeneous of the same degree"%polys | polys = self.defining_polynomials() try: d = polys[0].degree() except AttributeError: polys = [f.lift() for f in polys] if not all([f.is_homogeneous() for f in polys]): raise ValueError, "polys (=%s) must be homogeneous"%polys degs = [f.degree() for f in polys] if not all([d==degs[0] for d in degs[1:]]): raise ValueEr... | def __init__(self, parent, polys, check=True): SchemeMorphism_on_points.__init__(self, parent, polys, check) if check: # morphisms from projective space are always given by # homogeneous polynomials of the same degree deg = self.defining_polynomials()[0].degree() for poly in self.defining_polynomials(): if (poly.degree... | dc35fa9eb362e4e3522047a61d883aeec38a347f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/dc35fa9eb362e4e3522047a61d883aeec38a347f/morphism.py |
f_l_dict = {(None,None):[(tuple([x]),tuple(self._vertex_face_indexset([x]))) | f_l_dict = {(None,tuple(range(self.n_Hrepresentation()))):[(tuple([x]),tuple(self._vertex_face_indexset([x]))) | def face_lattice(self): """ Computes the face-lattice poset. Elements are tuples of (vertices, facets) - i.e. this keeps track of both the vertices in each face, and all the facets containing them. | bdb331416d79f2f16dad258d2fb80722f0f71db8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bdb331416d79f2f16dad258d2fb80722f0f71db8/polyhedra.py |
tuple(range(self.n_Hrepresentation())))) | None)) | def face_lattice(self): """ Computes the face-lattice poset. Elements are tuples of (vertices, facets) - i.e. this keeps track of both the vertices in each face, and all the facets containing them. | bdb331416d79f2f16dad258d2fb80722f0f71db8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bdb331416d79f2f16dad258d2fb80722f0f71db8/polyhedra.py |
.. note:: Reference for the Sturm bound that we use in the definition of of this function: J. Sturm, On the congruence of modular forms, Number theory (New York, 1984-1985), Springer, Berlin, 1987, pp. 275-280. Useful Remark: | sage: CuspForms(Gamma1(144), 3).sturm_bound() 3457 sage: CuspForms(DirichletGroup(144).1^2, 3).sturm_bound() 73 sage: CuspForms(Gamma0(144), 3).sturm_bound() 73 REFERENCE: - [Sturm] J. Sturm, On the congruence of modular forms, Number theory (New York, 1984-1985), Springer, Berlin, 1987, pp. 275-280. NOTE:: | def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is... | 7cfc69b99a5e57fd68044d80a9e5bb2180a14c73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7cfc69b99a5e57fd68044d80a9e5bb2180a14c73/space.py |
`s \geq` the sturm bound for `\Gamma_0` at | `s \geq` the Sturm bound for `\Gamma_0` at | def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is... | 7cfc69b99a5e57fd68044d80a9e5bb2180a14c73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7cfc69b99a5e57fd68044d80a9e5bb2180a14c73/space.py |
self.__sturm_bound = self.group().sturm_bound(self.weight())+1 | self.__sturm_bound = G.sturm_bound(self.weight())+1 | def sturm_bound(self, M=None): r""" For a space M of modular forms, this function returns an integer B such that two modular forms in either self or M are equal if and only if their q-expansions are equal to precision B (note that this is 1+ the usual Sturm bound, since `O(q^\mathrm{prec})` has precision prec). If M is... | 7cfc69b99a5e57fd68044d80a9e5bb2180a14c73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7cfc69b99a5e57fd68044d80a9e5bb2180a14c73/space.py |
L = [] for k in xrange(icount): L.append(start) start += step if include_endpoint: L.append(end) return L def xsrange(start, end=None, step=1, universe=None, check=True, include_endpoint=False, endpoint_tolerance=1e-5): """ Return an iterator over numbers ``a, a+step, ..., a+k*step``, where ``a+k*step < b`` and ``a... | def srange(start, end=None, step=1, universe=None, check=True, include_endpoint=False, endpoint_tolerance=1e-5): r""" Return list of numbers ``a, a+step, ..., a+k*step``, where ``a+k*step < b`` and ``a+(k+1)*step >= b`` over exact rings, and makes a best attempt for inexact rings (see note below). This provides one wa... | 057c66005bb245d6d0e905819d69011d02c772a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/057c66005bb245d6d0e905819d69011d02c772a5/misc.py | |
cur = start for k in xrange(icount): yield cur cur += step if include_endpoint: yield end | if icount >=0: cur = start for k in xrange(icount): yield cur cur += step if include_endpoint: yield end | def generic_xsrange(): cur = start for k in xrange(icount): yield cur cur += step if include_endpoint: yield end | 057c66005bb245d6d0e905819d69011d02c772a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/057c66005bb245d6d0e905819d69011d02c772a5/misc.py |
def generic_xsrange(): cur = start for k in xrange(icount): yield cur cur += step if include_endpoint: yield end | 057c66005bb245d6d0e905819d69011d02c772a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/057c66005bb245d6d0e905819d69011d02c772a5/misc.py | ||
sage: cmp(N3, 3) -1 | sage: abs( cmp(N3, 3) ) 1 | def __cmp__(self, right): r""" Compare ``self`` and ``right``. | f388add91be6e47c18668dcf8eaa448754624a8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f388add91be6e47c18668dcf8eaa448754624a8b/toric_lattice.py |
sage: c._ambient_space_point(c.lattice().dual()([1,1])) | sage: c._ambient_space_point(c.dual_lattice()([1,1])) | def _ambient_space_point(self, data): r""" Try to convert ``data`` to a point of the ambient space of ``self``. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
sage: c.contains(c.lattice().dual()(1,0)) | sage: c.contains(c.dual_lattice()(1,0)) | def contains(self, *args): r""" Check if a given point is contained in ``self``. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
sage: c.contains(c.lattice().dual()(1,0)) | sage: c.contains(c.dual_lattice()(1,0)) | def contains(self, *args): r""" Check if a given point is contained in ``self``. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
self._dual = Cone(rays, lattice=self.lattice().dual(), check=False) | self._dual = Cone(rays, lattice=self.dual_lattice(), check=False) | def dual(self): r""" Return the dual cone of ``self``. OUTPUT: - :class:`cone <ConvexRationalPolyhedralCone>`. EXAMPLES:: sage: cone = Cone([(1,0), (-1,3)]) sage: cone.dual().rays() (M(3, 1), M(0, 1)) Now let's look at a more complicated case:: sage: cone = Cone([(-2,-1,2), (4,1,0), (-4,-1,-5), (4,1,5)]) sage: co... | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
def facet_normals(self): r""" Return normals to facets of ``self``. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py | ||
M = self.lattice().dual() | M = self.dual_lattice() | def facet_normals(self): r""" Return normals to facets of ``self``. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
self.lattice().dual().submodule_with_basis(basis) | self.dual_lattice().submodule_with_basis(basis) | def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
self.lattice().dual().submodule_with_basis(basis) | self.dual_lattice().submodule_with_basis(basis) | def _split_ambient_lattice(self): r""" Compute a decomposition of the ``N``-lattice into `N_\sigma` and its complement `N(\sigma)`. | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
Let `M=` ``self.lattice().dual()`` be the lattice dual to the | Let `M=` ``self.dual_lattice()`` be the lattice dual to the | def orthogonal_sublattice(self, *args, **kwds): r""" The sublattice (in the dual lattice) orthogonal to the sublattice spanned by the cone. Let `M=` ``self.lattice().dual()`` be the lattice dual to the ambient lattice of the given cone `\sigma`. Then, in the notation of [Fulton]_, this method returns the sublattice | 80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/80a9bb2c425ebeec4f69e966b1ed7b66d21d86f7/cone.py |
self._option["pdflatex"] = False | self._option["engine"] = "latex" self._option["engine_name"] = "LaTeX" | def __init__(self, bb=False, delimiters=["(", ")"]): """ Define an object that holds LaTeX global preferences. """ self._option = {} self._option["blackboard_bold"] = bb self._option["matrix_delimiters"] = list(delimiters) self._option["vector_delimiters"] = list(delimiters) self._option["macros"] = "" self._option["pr... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): | def _run_latex_(filename, debug=False, density=150, engine=None, png=False, do_in_background=False): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
"filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. | "filename.dvi" (or "filename.pdf"` if engine is either ``pdflatex`` or ``xelatex'') and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
- ``pdflatex`` - bool (optional, default False): whether to use pdflatex. | - ``engine`` - string: latex engine to use. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
``pdflatex`` is False, then a dvi file is created, but if there | engine is latex or None, then a dvi file is created, but if there | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
returned.) If ``pdflatex`` is True and there are no errors, then | returned.) If engine is pdflatex or xelatex and there are no errors, then | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
pdflatex, you must have 'convert' installed. | pdflatex or xelatex, you must have 'convert' installed. | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex(): | if engine is None: engine = _Latex_prefs._option["engine"] if not engine and not have_latex(): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if pdflatex and not have_pdflatex(): print "Error: PDFLaTeX does not seem to be installed. Download it from" | if engine and not have_pdflatex() and not have_xelatex(): print "Error: %s does not seem to be installed. Download it from" % _Latex_prefs._option["engine_name"] | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if not pdflatex and not (have_dvipng() or have_convert()): | if (not engine or engine == "latex") and not (have_dvipng() or have_convert()): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
print "appear to be installed. Displaying LaTeX or PDFLaTeX output" | print "appear to be installed. Displaying LaTeX, PDFLaTeX output" | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
elif pdflatex and not have_convert(): | elif engine == "pdflatex" and not have_convert(): | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if pdflatex: | if not engine or engine == "latex": command = "latex" suffix = "ps" return_suffix = "dvi" elif engine == "pdflatex": | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
command = "latex" suffix = "ps" return_suffix = "dvi" | raise ValueError, "Unsupported LaTeX engine." | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if pdflatex: | if engine == "pdflatex" or engine == "xelatex": | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
e = os.system(cmd + ' ' + redirect + background) else: | e = os.system(cmd + ' ' + redirect + background) else: | def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't conve... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def __init__(self, debug=False, slide=False, density=150, pdflatex=None): | def __init__(self, debug=False, slide=False, density=150, pdflatex=None, engine=None): | def __init__(self, debug=False, slide=False, density=150, pdflatex=None): self.__debug = debug self.__slide = slide self.__pdflatex = pdflatex self.__density = density | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def _relation_symbols(self): """ Returns a dictionary whose keys are attributes of the :mod:`operator` module and whose values are the corresponding LaTeX expressions. EXAMPLES:: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
density=None, pdflatex=None, locals={}): | density=None, pdflatex=None, engine=None, locals={}): | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
- ``pdflatex`` - whether to use pdflatex. | - ``pdflatex`` - whether to use pdflatex. This is deprecated. Use ``engine`` option instead. - ``engine`` - latex engine to use. Currently latex, pdflatex, and xelatex are supported. | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
or this command won't work. When using pdflatex, you must | or this command won't work. When using pdflatex or xelatex, you must | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if pdflatex is None: if self.__pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] | if engine is None: if self.__engine is None: engine = _Latex_prefs._option["engine"] | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
pdflatex = bool(self.__pdflatex) | engine = self.__engine | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
density=density, pdflatex=pdflatex, png=True) | density=density, engine=engine, png=True) | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def pdflatex(self, t = None): """ | def pdflatex(self, t = None): """ This is deprecated. Use engine("pdflatex") instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.