bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def frequency_table(string): r""" Return the frequency table corresponding to the given string. INPUT: - ``string`` -- a string EXAMPLE:: sage: from sage.coding.source_coding.huffman import frequency_table sage: str = "Sage is my most favorite general purpose computer algebra system" sage: frequency_table(str) {'a'...
def frequency_table(string): r""" Return the frequency table corresponding to the given string. INPUT: - ``string`` -- a string EXAMPLE:: sage: from sage.coding.source_coding.huffman import frequency_table sage: str = "Sage is my most favorite general purpose computer algebra system" sage: frequency_table(str) {'a'...
473,000
def frequency_table(string): r""" Return the frequency table corresponding to the given string. INPUT: - ``string`` -- a string EXAMPLE:: sage: from sage.coding.source_coding.huffman import frequency_table sage: str = "Sage is my most favorite general purpose computer algebra system" sage: frequency_table(str) {'a'...
def frequency_table(string): r""" Return the frequency table corresponding to the given string. INPUT: - ``string`` -- a string EXAMPLE:: sage: from sage.coding.source_coding.huffman import frequency_table sage: str = "Sage is my most favorite general purpose computer algebra system" sage: frequency_table(str) {'a'...
473,001
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
473,002
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
473,003
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
473,004
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
473,005
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
473,006
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
473,007
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
def _build_code_from_tree(self, tree, d, prefix=''): r""" Builds the code corresponding to a given tree and prefix
473,008
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
473,009
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
def_build_code(self,dic):r"""ReturnsaHuffmancodeforeachoneofthegivenelements.
473,010
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
473,011
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
473,012
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
def _build_code(self, dic): r""" Returns a Huffman code for each one of the given elements.
473,013
def encode(self, string): r""" Returns an encoding of the given string based on the current encoding table
def encode(self, string): r""" Returns an encoding of the given string based on the current encoding table
473,014
def encode(self, string): r""" Returns an encoding of the given string based on the current encoding table
defencode(self,string):r"""Returnsanencodingofthegivenstringbasedonthecurrentencodingtable
473,015
def encode(self, string): r""" Returns an encoding of the given string based on the current encoding table
def encode(self, string): r""" Returns an encoding of the given string based on the current encoding table
473,016
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,017
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,018
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,019
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,020
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,021
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,022
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
def decode(self, string): r""" Returns a decoded version of the given string corresponding to the current encoding table.
473,023
def encoding_table(self): r""" Returns the current encoding table
def encoding_table(self): r""" Returns the current encoding table
473,024
def encoding_table(self): r""" Returns the current encoding table
def encoding_table(self): r""" Returns the current encoding table
473,025
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
473,026
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
473,027
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
def tree(self): r""" Returns the Huffman tree corresponding to the current encoding
473,028
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
def _generate_edges(self, tree, parent="", bit=""): """ Generate the edges of the given Huffman tree. INPUT: - ``tree`` -- a Huffman binary tree. - ``parent`` -- (default: empty string) a parent vertex with exactly two children. - ``bit`` -- (default: empty string) the bit signifying either the left or right branch...
473,029
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = parent s = "".join([parent, bit]) try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
473,030
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
473,031
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
473,032
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
473,033
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
473,034
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
def steiner_tree(self,vertices, weighted = False): r""" Returns a tree of minimum weight connecting the given set of vertices.
473,035
def cnf(self, xi=None, yi=None, format=None): """ Return a representation of this S-Box in conjunctive normal form.
def cnf(self, xi=None, yi=None, format=None): """ Return a representation of this S-Box in conjunctive normal form.
473,036
def cnf(self, xi=None, yi=None, format=None): """ Return a representation of this S-Box in conjunctive normal form.
def cnf(self, xi=None, yi=None, format=None): """ Return a representation of this S-Box in conjunctive normal form.
473,037
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
473,038
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
deflocal_coordinates_at_nonweierstrass(self,P,prec=20,name='t'):"""Foranon-WeierstrasspointP=(a,b)onthehyperellipticcurvey^2=f(x),returns(x(t),y(t))suchthat(y(t))^2=f(x(t)),wheret=x-aisthelocalparameter.
473,039
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
473,040
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
473,041
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
def local_coordinates_at_nonweierstrass(self, P, prec = 20, name = 't'): """ For a non-Weierstrass point P = (a,b) on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x - a is the local parameter.
473,042
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
473,043
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
473,044
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
def local_coordinates_at_weierstrass(self, P, prec = 20, name = 't'): """ For a finite Weierstrass point on the hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = y is the local parameter.
473,045
def local_coordinates_at_infinity(self, prec = 20, name = 't'): """ For the genus g hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x^g/y is the local parameter at infinity
deflocal_coordinates_at_infinity(self,prec=20,name='t'):"""Forthegenusghyperellipticcurvey^2=f(x),returns(x(t),y(t))suchthat(y(t))^2=f(x(t)),wheret=x^g/yisthelocalparameteratinfinity
473,046
def local_coordinates_at_infinity(self, prec = 20, name = 't'): """ For the genus g hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x^g/y is the local parameter at infinity
deflocal_coordinates_at_infinity(self,prec=20,name='t'):"""Forthegenusghyperellipticcurvey^2=f(x),returns(x(t),y(t))suchthat(y(t))^2=f(x(t)),wheret=x^g/yisthelocalparameteratinfinity
473,047
def local_coordinates_at_infinity(self, prec = 20, name = 't'): """ For the genus g hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x^g/y is the local parameter at infinity
def local_coordinates_at_infinity(self, prec = 20, name = 't'): """ For the genus g hyperelliptic curve y^2 = f(x), returns (x(t), y(t)) such that (y(t))^2 = f(x(t)), where t = x^g/y is the local parameter at infinity
473,048
def local_coord(self, P, prec = 20, name = 't'): """ If P is not infinity, calls the appropriate local_coordinates function.
def local_coord(self, P, prec = 20, name = 't'): """ If P is not infinity, calls the appropriate local_coordinates function.
473,049
def local_coord(self, P, prec = 20, name = 't'): """ If P is not infinity, calls the appropriate local_coordinates function.
def local_coord(self, P, prec = 20, name = 't'): """ If P is not infinity, calls the appropriate local_coordinates function.
473,050
def super_categories(self): """ Returns a list of the immediate super categories of self.
def super_categories(self): """ Returns a list of the immediate super categories of self.
473,051
def one(self): r""" Returns the one of the monoid, that is the unique neutral element for `*`.
def one(self): r""" Returns the one of the monoid, that is the unique neutral element for `*`.
473,052
def one_element(self): r""" Backward compatibility alias for :meth:`self.one()`.
def one_element(self): r""" Backward compatibility alias for :meth:`self.one()`.
473,053
def prod(self, args): r""" n-ary product
def prod(self, args): r""" n-ary product
473,054
def prod(self, args): r""" n-ary product
defprod(self,args):r"""n-aryproduct
473,055
def is_one(self): r""" Returns whether self is the one of the monoid
def is_one(self): r""" Returns whether self is the one of the monoid
473,056
def __pow__(self, n): r""" INPUTS: - n: a non negative integer
def __pow__(self, n): r""" INPUTS: - n: a non negative integer
473,057
def _pow_naive(self, n): r""" A naive implementation of __pow__
def _pow_naive(self, n): r""" A naive implementation of __pow__
473,058
def _pow_naive(self, n): r""" A naive implementation of __pow__
def _pow_naive(self, n): r""" A naive implementation of __pow__
473,059
def _pow_naive(self, n): r""" A naive implementation of __pow__
def _pow_naive(self, n): r""" A naive implementation of __pow__
473,060
def tachyon_repr(self, render_params): """ Returns representation of the point suitable for plotting using the Tachyon ray tracer.
def tachyon_repr(self, render_params): """ Returns representation of the point suitable for plotting using the Tachyon ray tracer.
473,061
def obj_repr(self, render_params): """ Returns complete representation of the point as a sphere.
def obj_repr(self, render_params): """ Returns complete representation of the point as a sphere.
473,062
def tachyon_repr(self, render_params): """ Returns representation of the line suitable for plotting using the Tachyon ray tracer.
def tachyon_repr(self, render_params): """ Returns representation of the line suitable for plotting using the Tachyon ray tracer.
473,063
def _render_on_subplot(self, subplot): """ TESTS:
def _render_on_subplot(self, subplot): """ TESTS:
473,064
def _render_on_subplot(self, subplot): """ TESTS:
def _render_on_subplot(self, subplot): """ TESTS:
473,065
def _render_on_subplot(self, subplot): """ TESTS:
def _render_on_subplot(self, subplot): """ TESTS:
473,066
def contour_plot(f, xrange, yrange, **options): r""" ``contour_plot`` takes a function of two variables, `f(x,y)` and plots contour lines of the function over the specified ``xrange`` and ``yrange`` as demonstrated below. ``contour_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a function of two variab...
def contour_plot(f, xrange, yrange, **options): r""" ``contour_plot`` takes a function of two variables, `f(x,y)` and plots contour lines of the function over the specified ``xrange`` and ``yrange`` as demonstrated below. ``contour_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a function of two variab...
473,067
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),...
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),...
473,068
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),...
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),...
473,069
def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self.
def row_stabilizer(self): """ Return the PermutationGroup corresponding to the row stabilizer of self.
473,070
def replace_parens(x): r""" A map from '(' to open_symbol and ')' to close_symbol and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_parens sage: replace_parens('(') 1 sage: replace_parens(')') 0 sage: replace_parens(1) Traceback (most recent call last): ... ValueError """ ...
def replace_parens(x): r""" A map from ``'('`` to ``open_symbol`` and ``')'`` to ``close_symbol`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_symbols`. INPUT: - ``x`` -- either an opening or closing...
473,071
def replace_symbols(x): r""" A map from open_symbol to '(' and close_symbol to ')' and otherwise an error is raised. EXAMPLES:: sage: from sage.combinat.dyck_word import replace_symbols sage: replace_symbols(1) '(' sage: replace_symbols(0) ')' sage: replace_symbols(3) Traceback (most recent call last): ... ValueError...
def replace_symbols(x): r""" A map from ``open_symbol`` to ``'('`` and ``close_symbol`` to ``')'`` and otherwise an error is raised. The values of the constants ``open_symbol`` and ``close_symbol`` are subject to change. This is the inverse map of :func:`replace_parens`. INPUT: - ``x`` -- either ``open_symbol`` or ``...
473,072
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck...
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete. EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyc...
473,073
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck...
def DyckWord(dw=None, noncrossing_partition=None): r""" Returns a Dyck word object or a head of a Dyck word object if the Dyck word is not complete EXAMPLES:: sage: dw = DyckWord([1, 0, 1, 0]); dw [1, 0, 1, 0] sage: print dw ()() sage: print dw.height() 1 sage: dw.to_noncrossing_partition() [[1], [2]] :: sage: Dyck...
473,074
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
473,075
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
473,076
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
def associated_parenthesis(self, pos): r""" report the position for the parenthesis that matches the one at position ``pos``
473,077
def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non crossing partitions Thanks to Mathieu Dutour for describing the bijection.
def to_noncrossing_partition(self): r""" Bijection of Biane from Dyck words to non-crossing partitions. Thanks to Mathieu Dutour for describing the bijection.
473,078
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word
473,079
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word
def to_tableau(self): r""" returns a standard tableau of length less than or equal to 2 with the size the same as the length of the list the standard tableau will be rectangular iff ``self`` is a complete Dyck word
473,080
def a_statistic(self): """ Returns the a-statistic for the Dyck word correspond to the area of the Dyck path.
def a_statistic(self): """ Returns the a-statistic for the Dyck word correspond to the area of the Dyck path.
473,081
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word.
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word.
473,082
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word.
def b_statistic(self): r""" Returns the b-statistic for the Dyck word corresponding to the bounce statistic of the Dyck word.
473,083
def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses.
def list(self): """ Returns a list of all the Dyck words with ``k1`` opening and ``k2`` closing parentheses.
473,084
def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses.
def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses.
473,085
def from_noncrossing_partition(ncp): r""" converts a non-crossing partition to a Dyck word TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossin...
def from_noncrossing_partition(ncp): r""" Converts a non-crossing partition to a Dyck word. TESTS:: sage: DyckWord(noncrossing_partition=[[1,2]]) # indirect doctest [1, 1, 0, 0] sage: DyckWord(noncrossing_partition=[[1],[2]]) [1, 0, 1, 0] :: sage: dws = DyckWords(5).list() sage: ncps = map( lambda x: x.to_noncrossi...
473,086
def eliminate_linear_variables(self, maxlength=3, skip=lambda lm,tail: False): """ Return a new system where "linear variables" are eliminated.
def eliminate_linear_variables(self, maxlength=3, skip=lambda lm,tail: False): """ Return a new system where "linear variables" are eliminated.
473,087
def __mul__(self, other): r""" Calculate the product self * other.
def __mul__(self, other): r""" Calculate the product self * other.
473,088
def order(self, *gens, **kwds): r""" Return the order with given ring generators in the maximal order of this number field.
def order(self, *args, **kwds): r""" Return the order with given ring generators in the maximal order of this number field.
473,089
def order(self, *gens, **kwds): r""" Return the order with given ring generators in the maximal order of this number field.
def order(self, *gens, **kwds): r sage: K.<a> = NumberField(x^3 - 2) sage: ZZ[a] Order in Number Field in a0 with defining polynomial x^3 - 2 TESTS: We verify that trac sage: K.<a> = NumberField(x^4 + 4*x^2 + 2) sage: B = K.integral_basis() sage: K.order(*B) Order in Number Field in a with defining polynomial x^4 + ...
473,090
def __init__(self): r""" The inverse of the hyperbolic secant function.
def __init__(self): r""" The inverse of the hyperbolic secant function.
473,091
def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line.
def eval(self, Vobj): r""" Evaluates the left hand side `A\vec{x}+b` on the given vertex/ray/line.
473,092
def is_inequality(self): """ Returns True since this is, by construction, an inequality.
def is_inequality(self): """ Returns True since this is, by construction, an inequality.
473,093
def interior_contains(self, Vobj): """ Tests whether the interior of the halfspace (excluding its boundary) defined by the inequality contains the given vertex/ray/line.
def interior_contains(self, Vobj): If you pass a vector, it is assumed to be the coordinate vector of a point:: sage: P = Polyhedron(vertices=[[1,1],[1,-1],[-1,1],[-1,-1]]) sage: p = vector(ZZ, [1,0] ) sage: [ ieq.interior_contains(p) for ieq in P.inequality_generator() ] [True, True, True, False] """ try: if Vobj.is...
473,094
def is_equation(self): """ Tests if this object is an equation. By construction, it must be.
def is_equation(self): """ Tests if this object is an equation. By construction, it must be.
473,095
def is_vertex(self): """ Tests if this object is a vertex. By construction it always is.
def is_vertex(self): """ Tests if this object is a vertex. By construction it always is.
473,096
def is_ray(self): """ Tests if this object is a ray. Always True by construction.
def is_ray(self): """ Tests if this object is a ray. Always True by construction.
473,097
def is_line(self): """ Tests if the object is a line. By construction it must be.
def is_line(self): """ Tests if the object is a line. By construction it must be.
473,098
def identity(self): """ Returns the identity projection.
def identity(self): """ Returns the identity projection.
473,099