diff --git a/src/sage/combinat/diagram_algebras.py b/src/sage/combinat/diagram_algebras.py index aa92cdb86a9..a079c6a261b 100644 --- a/src/sage/combinat/diagram_algebras.py +++ b/src/sage/combinat/diagram_algebras.py @@ -239,40 +239,6 @@ def __init__(self, parent, d): self._base_diagram = tuple(sorted(tuple(sorted(i)) for i in d)) super(AbstractPartitionDiagram, self).__init__(parent, self._base_diagram) - # add options to class - class options(GlobalOptions): - r""" - Set and display the global options for Brauer diagram (algebras). If no - parameters are set, then the function returns a copy of the options - dictionary. - - The ``options`` to diagram algebras can be accessed as the method - :obj:`BrauerAlgebra.options` of :class:`BrauerAlgebra` and - related classes. - - @OPTIONS@ - - EXAMPLES:: - - sage: R. = QQ[] - sage: BA = BrauerAlgebra(2, q) - sage: E = BA([[1,2],[-1,-2]]) - sage: E - B{{-2, -1}, {1, 2}} - sage: BrauerAlgebra.options.display="compact" # known bug (Trac #24323) - sage: E # known bug (Trac #24323) - B[12/12;] - sage: BrauerAlgebra.options._reset() # known bug (Trac #24323) - """ - NAME = 'Brauer diagram' - module = 'sage.combinat.diagram_algebras' - option_class='AbstractPartitionDiagram' - display = dict(default="normal", - description='Specifies how the Brauer diagrams should be printed', - values=dict(normal="Using the normal representation", - compact="Using the compact representation"), - case_sensitive=False) - def check(self): r""" Check the validity of the input for the diagram. @@ -440,6 +406,40 @@ def __init__(self, parent, d): """ super(BrauerDiagram, self).__init__(parent,d) + # add options to class + class options(GlobalOptions): + r""" + Set and display the global options for Brauer diagram (algebras). If no + parameters are set, then the function returns a copy of the options + dictionary. + + The ``options`` to diagram algebras can be accessed as the method + :obj:`BrauerAlgebra.options` of :class:`BrauerAlgebra` and + related classes. + + @OPTIONS@ + + EXAMPLES:: + + sage: R. = QQ[] + sage: BA = BrauerAlgebra(2, q) + sage: E = BA([[1,2],[-1,-2]]) + sage: E + B{{-2, -1}, {1, 2}} + sage: BrauerAlgebra.options.display = "compact" + sage: E + B[12/12;] + sage: BrauerAlgebra.options._reset() + """ + NAME = 'Brauer diagram' + module = 'sage.combinat.diagram_algebras' + option_class='BrauerDiagram' + display = dict(default="normal", + description='Specifies how the Brauer diagrams should be printed', + values=dict(normal="Using the normal representation", + compact="Using the compact representation"), + case_sensitive=False) + def check(self): r""" Check the validity of the input for ``self``. @@ -859,7 +859,7 @@ class BrauerDiagrams(AbstractPartitionDiagrams): sage: bd.options._reset() """ Element = BrauerDiagram - options = AbstractPartitionDiagram.options + options = BrauerDiagram.options def __init__(self, order, category=None): r""" @@ -1912,6 +1912,8 @@ def __init__(self, k, q, base_ring, prefix): """ SubPartitionAlgebra.__init__(self, k, q, base_ring, prefix, BrauerDiagrams(k)) + options = BrauerDiagram.options + def _repr_(self): """ Return a string representation of ``self``. @@ -2689,8 +2691,3 @@ def set_partition_composition(sp1, sp2): # END BORROWED CODE ########################################################################## -# Deprecations from trac:18555. July 2016 -from sage.misc.superseded import deprecated_function_alias -AbstractPartitionDiagram.global_options=deprecated_function_alias(18555, AbstractPartitionDiagram.options) -BrauerDiagramOptions = deprecated_function_alias(18555, AbstractPartitionDiagram.options) -BrauerDiagrams.global_options = deprecated_function_alias(18555, BrauerDiagrams.options)