#18720: Change diagram algebra basis set partitions from list to generator
-------------------------------------+-------------------------------------
Reporter: ghseeli | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: sage-6.8
Component: algebra | Resolution:
Keywords: days65, partition | Merged in:
algebra, diagram algebra | Reviewers: Travis Scrimshaw
Authors: ghseeli | Work issues:
Report Upstream: N/A | Commit:
Branch: | 7e11ef3114a0027e8320c07425959a82e4fb7242
u/ghseeli/diagram_algebra_improvements-18720| Stopgaps:
Dependencies: #18707 |
-------------------------------------+-------------------------------------
Comment (by ghseeli):
Travis, thank you for all your suggestions so far. They have provided good
speedups and made things cleaner and easier to read. I still have one
question, though, involving the how the equality between diagrams and
iterables of iterables works. I think an example will be best.
{{{
sage: B = BrauerAlgebra(3,x)
sage: elm = B([[1,2],[-1,-2]]) #calls element_constructor
sage: elm2 = B.basis()[((1,2),(-1,-2),(3,-3))] #bypasses
element_constructor
sage: elm == elm2
False
sage: elm*B.one() == elm2*B.one() #support converted into same type
True
sage: elm.support()[0] == elm2.support()[0]
#AbstractPartitionDiagram.__eq__ called
True
sage: type(elm.support()[0]) #support was left as tuple by construction
<type 'tuple'>
}}}
So, while I personally never construct elements by calling
`B.basis().__getitem__`, it seems that this is a totally valid method to
create an element, but leads to some unpredictable or unclear behaviors.
Do you know the best way to address this in the context of
`CombinatorialFreeModule`?
--
Ticket URL: <http://trac.sagemath.org/ticket/18720#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.