Changes between Initial Version and Version 3 of Ticket #25183


Ignore:
Timestamp:
05/16/19 13:12:33 (2 years ago)
Author:
gh-kliem
Comment:

This branch should fix the bug.

Feel free to change it, alter it, abonden it, etc.

Maybe there is a better way to obtain the correct parent, i.e. improve the following lines:

156             for typ1 in ancestors_of_associahedron:
157                 if typ1 in mro:
158                     return typ1(parent, Vrep, Hrep, **kwds)

New commits:

2643078added `backend` to associahedron and flow polytope
a9b4826typo
8716985corrected docstring
b873156associahedron actually uses the claimed backend now
1f4bb25comments by tscrim
2c812c5should have fixed bug in #25183
65b11c9removed redundant line

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25183

    • Property Status changed from new to needs_review
    • Property Authors changed from to Jonathan Kliem
    • Property Cc moritz added
    • Property Dependencies changed from to 27798
    • Property Branch changed from to public/25183
    • Property Commit changed from to 65b11c9de95bb2ecde90c722ca2e9781fdac7cc5
  • Ticket #25183 – Description

    initial v3  
    1111<repr(<sage.combinat.root_system.associahedron.Associahedra_with_category.element_class at 0x7f48d0d7ad70>) failed: AttributeError: 'Associahedra_with_category.element_class' object has no attribute '_cartan_type'>
    1212}}}
     13
     14The construction `as_polyhedron` initializes the new (face-)polyhedron as via `P.__class__(parent, Vrep, None)`. In the case of the associahedron, this does not give a valid object, as the associahedron requires a cartan type as well.
     15
     16We fix the initialization of the associahedron to now require the cartan type on `__init__` (before it was assumed to be set after initialization).
     17
     18Further we have `__new__` return the correct parent class such that e.g. the face of an `Associahedron_class_ppl` is constructed as `Polyhedron_ppl`.