bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
472,800
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
472,801
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
def random_prime(n, proof=None, lbound=2): """ Returns a random prime p between `lbound` and n (i.e. `lbound <= p <= n`). The returned prime is chosen uniformly at random from the set of prime numbers less than or equal to n. INPUT: - ``n`` - an integer >= 2. - ``proof`` - bool or None (default: None) If False, th...
472,802
def __cmp__(self, right): r""" Compare ``self`` and ``right``.
def __cmp__(self, right): r""" Compare ``self`` and ``right``.
472,803
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -...
def taylor(f, *args): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -1/...
472,804
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -...
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. Functions in more variables are also supported. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) s...
472,805
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -...
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``*args`` - the following notation is supported - ``x, a, n`` - variable, point, degree - ``(x, a), (y, b), ..., n`` - variables with points, deg...
472,806
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -...
def taylor(f, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable `v` around the point `a`, containing terms through `(x - a)^n`. INPUT: - ``v`` - variable - ``a`` - number - ``n`` - integer EXAMPLES:: sage: var('x,k,n') (x, k, n) sage: taylor (sqrt (1 - k^2*sin(x)^2), x, 0, 6) -...
472,807
def derivative(self, ex, operator): """ EXAMPLES::
def derivative(self, ex, operator): """ EXAMPLES::
472,808
def derivative(self, ex, operator): """ EXAMPLES::
def derivative(self, ex, operator): """ EXAMPLES::
472,809
def derivative(self, ex, operator): """ EXAMPLES::
def derivative(self, ex, operator): """ EXAMPLES::
472,810
def derivative(self, ex, operator): """ EXAMPLES::
def derivative(self, ex, operator): """ EXAMPLES::
472,811
sage: def naive_height(P):
sage: def naive_height(P):
472,812
sage: def is_4regular(G):
sage: def is_4regular(G):
472,813
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>`_.
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>`_.
472,814
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>`_.
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>`_.
472,815
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>`_.
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>`_.
472,816
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...
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...
472,817
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...
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...
472,818
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>`_.
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>`_.
472,819
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>`_.
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>`_.
472,820
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>`_.
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>`_.
472,821
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)>`_.
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)>`_.
472,822
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)>`_.
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)>`_.
472,823
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)>`_.
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)>`_.
472,824
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)>`_.
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)>`_.
472,825
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)>`_.
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)>`_.
472,826
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)>`_.
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)>`_.
472,827
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)>`_.
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)>`_.
472,828
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)>`_.
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)>`_.
472,829
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)>`_.
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)>`_.
472,830
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
472,831
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
472,832
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
472,833
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
def layout_graphviz(self, dim = 2, prog = 'dot', **options): """ Calls ``graphviz`` to compute a layout of the vertices of this graph.
472,834
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R.
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R.
472,835
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R.
def plot(self, *args, **kwds): """ The R plot function. Type r.help('plot') for much more extensive documentation about this function. See also below for a brief introduction to more plotting with R.
472,836
def is_submodule(self, other): """ Return True if self is a submodule of other.
def is_submodule(self, other): """ Return True if self is a submodule of other.
472,837
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
def FuzzyBallGraph(self, partition, q): r""" Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
472,838
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
472,839
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
def FuzzyBallGraph(self, partition, q): """ Construct a Fuzzy Ball graph with the integer partition ``partition`` and ``q`` extra vertices.
472,840
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
def eigenvalues(self,extend=True): r""" Returns a list with the eigenvalues of the endomorphism of vector spaces.
472,841
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
472,842
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
472,843
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
472,844
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces.
defeigenvalues(self,extend=True):"""Returnsalistwiththeeigenvaluesoftheendomorphismofvectorspaces.
472,845
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,846
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,847
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,848
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,849
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,850
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,851
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue.
472,852
def minpoly(self,var='x'): """ Computes the minimal polynomial.
def minpoly(self,var='x'): """ Computes the minimal polynomial.
472,853
def star_generator_indices(self): r""" Return indices of generating cones of the "ambient fan" containing ``self``.
def star_generator_indices(self): r""" Return indices of generating cones of the "ambient fan" containing ``self``.
472,854
def WeylCharacterRing(ct, base_ring=ZZ, prefix=None, cache=False, style="lattice"): r""" A class for rings of Weyl characters. The Weyl character is a character of a semisimple (or reductive) Lie group or algebra. They form a ring, in which the addition and multiplication correspond to direct sum and tensor product of ...
def WeylCharacterRing(ct, base_ring=ZZ, prefix=None, cache=False, style="lattice"): r""" A class for rings of Weyl characters. The Weyl character is a character of a semisimple (or reductive) Lie group or algebra. They form a ring, in which the addition and multiplication correspond to direct sum and tensor product of ...
472,855
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
472,856
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
472,857
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Will...
472,858
def rule(x) : x[len(x)-1] = -x[len(x)-1]; return x
def rule(x) : x[len(x)-1] = -x[len(x)-1]; return x
472,859
def __call__(self, *args): """ Coerces the element into the ring.
def __call__(self, *args): """ Coerces the element into the ring.
472,860
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
472,861
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
472,862
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
def _magma_init_(self, magma): r""" EXAMPLES: We first coerce a square matrix.
472,863
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix with nonnegative real entries such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose ...
472,864
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
472,865
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
472,866
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
def bistochastic_as_sum_of_permutations(M, check = True): r""" Returns the positive sum of permutations corresponding to the bistochastic matrix. A stochastic matrix is a matrix such that the sum of the elements of any row is equal to 1. A bistochastic matrix is a stochastic matrix whose transpose matrix is also stoch...
472,867
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
472,868
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
472,869
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
472,870
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
def uname_specific(name, value, alternative): if name in os.uname()[0]: return value else: return alternative
472,871
def CPS_height_bound(self): r""" Return the Cremona-Prickett-Siksek height bound. This is a floating point number B such that if P is a rational point on the curve, then `|h(P) - \hat{h}(P)| \leq B`, where `h(P)` is the naive logarithmic height of `P` and `\hat{h}(P)` is the canonical height.
def CPS_height_bound(self): r""" Return the Cremona-Prickett-Siksek height bound. This is a floating point number B such that if P is a rational point on the curve, then `h(P) \le \hat{h}(P) + B`, where `h(P)` is the naive logarithmic height of `P` and `\hat{h}(P)` is the canonical height.
472,872
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ...
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ...
472,873
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ...
def LyndonWords(e=None, k=None): """ Returns the combinatorial class of Lyndon words. A Lyndon word `w` is a word that is lexicographically less than all of its rotations. Equivalently, whenever `w` is split into two non-empty substrings, `w` is lexicographically less than the right substring. INPUT: - no input at ...
472,874
def __init__(self, data, check=True): r""" Construction of a Lyndon word.
def __init__(self, data, check=True): r""" Construction of a Lyndon word.
472,875
def __init__(self, data, check=True): r""" Construction of a Lyndon word.
def __init__(self, data, check=True): r""" Construction of a Lyndon word.
472,876
def _pcubicroots(b, c, d): r""" Local function returning the number of roots of `x^3 + b*x^2 + c*x + d` modulo `P`, counting multiplicities """ return sum([rr[1] for rr in PolynomialRing(F, 'x')([d, c, b, 1]).roots()],0)
def _pcubicroots(b, c, d): r""" Local function returning the number of roots of `x^3 + b*x^2 + c*x + d` modulo `P`, counting multiplicities """ return sum([rr[1] for rr in PolynomialRing(F, 'x')([d, c, b, 1]).roots()],0)
472,877
def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial.
def univariate_polynomial(self, R=None): TESTS:: sage: P = PolynomialRing(QQ, 0, '') sage: P(5).univariate_polynomial() 5 """ if self.parent().ngens() == 0: if R is None: return self.base_ring()(self) else: return R(self) Returns a univariate polynomial associated to this multivariate polynomial.
472,878
def factor(self, proof=True): r""" Compute the irreducible factorization of this polynomial.
def if self == 0: raise ArithmeticError, "Prime factorization of 0 not defined." if R.ngens() == 0: base_ring = self.base_ring() if base_ring.is_field(): return Factorization([],unit=self.base_ring()(self)) else: F = base_ring(self).factor() return Factorization([(R(f),m) for f,m in F], unit=F.unit()) factor(self, ...
472,879
def _eval_(self, x): """
def _eval_(self, x): """
472,880
def _eval_(self, x): """
def _eval_(self, x): """
472,881
def _eval_(self, x): """
def _eval_(self, x): """
472,882
def transform(self, **kwds): """ EXAMPLE::
def transform(self, **kwds): """ EXAMPLE::
472,883
def transform(self, radius=None, azimuth=None, inclination=None): """ A spherical coordinates transform.
def transform(self, radius=None, azimuth=None, inclination=None): """ A spherical coordinates transform.
472,884
def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial.
def univariate_polynomial(self, R=None): """ Returns a univariate polynomial associated to this multivariate polynomial.
472,885
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
472,886
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
472,887
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
def prime_to_S_part(self,S): r""" This function returns the part of the fractional ideal self which is coprime to the prime ideals in the list S
472,888
def is_S_unit(self,S): r''' Returns True if the ideal is an unit with respect to the
def is_S_unit(self,S): r''' Returns True if the ideal is an unit with respect to the
472,889
def is_S_unit(self,S): r''' Returns True if the ideal is an unit with respect to the
def is_S_unit(self,S): r""" Returns True if the ideal is an unit with respect to the
472,890
def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the
def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the
472,891
def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the
def is_S_integral(self,S): r""" Returns True if the ideal is an unit with respect to the
472,892
def __init__(self, s): """ TESTS::
def __init__(self, s): """ TESTS::
472,893
def unrank(self, r): """ Returns the subset of s that has rank k.
def unrank(self, r): """ Returns the subset of s that has rank k.
472,894
def __init__(self, s, k): """ TESTS::
def __init__(self, s, k): """ TESTS::
472,895
def unrank(self, r): """ Returns the subset of s that has rank k.
def unrank(self, r): """ Returns the subset of s that has rank k.
472,896
def unrank(self, r): """ Returns the subset of s that has rank k.
def unrank(self, r): """ Returns the subset of s that has rank k.
472,897
def __iter__(self): """ Iterates through the subsets of the multiset ``self._s``. Note that each subset is represented by a list of its elements rather than a set since we can have multiplicities (no multiset data structure yet in sage).
def __iter__(self): """ Iterates through the subsets of the multiset ``self._s``. Note that each subset is represented by a list of its elements rather than a set since we can have multiplicities (no multiset data structure yet in sage).
472,898
def __classcall_private__(cls,p): r""" This function tries to recognize the input (it can be either a list or a tuple of pairs, or a fix-point free involution given as a list or as a permutation), constructs the parent (enumerated set of PerfectMatchings of the ground set) and calls the __init__ function to construct o...
def __classcall_private__(cls,p): r""" This function tries to recognize the input (it can be either a list or a tuple of pairs, or a fix-point free involution given as a list or as a permutation), constructs the parent (enumerated set of PerfectMatchings of the ground set) and calls the __init__ function to construct o...
472,899