Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Implement parent framework
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorkarn committed Aug 2, 2022
1 parent 067c0ac commit 0f48031
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/sage/combinat/diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
Passing a list of all cells::
sage: from sage.combinat.diagram import Diagram, Diagrams
sage: from sage.combinat.diagram import Diagram
sage: cells = [(0,0), (0,1), (1,0), (1,1), (4,4), (4,5), (4,6), (5,4), (7, 6)]
sage: D = Diagram(cells); D
[(0,0), (0,1), (1,0), (1,1), (4,4), (4,5), (4,6), (5,4), (7, 6)]
sage: pp(D)
AUTHORS:
Expand All @@ -53,14 +52,23 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

class Diagram(CombinatorialElement):
def __init__(self, parent, cells):
from sage.categories.sets_cat import Sets
from sage.structure.unique_representation import UniqueRepresentation
from sage.structure.list_clone import ClonableArray
from sage.structure.parent import Parent

class Diagram(ClonableArray):
def __init__(self, cells):
self._cells = cells

class Diagrams(UniqueRepresentation, Parent):
def __init__(self):
pass

class Diagrams_all(Diagrams):
def __init__(self):
pass

Parent.__init__(self)

def _element_constructor_(self, cells)

return self.element_class(self, cells)

Element = Diagram

0 comments on commit 0f48031

Please sign in to comment.