Changes between Initial Version and Version 5 of Ticket #31702


Ignore:
Timestamp:
04/20/21 18:59:12 (14 months ago)
Author:
yzh
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31702

    • Property Status changed from new to needs_review
    • Property Authors changed from to Yuan Zhou
    • Property Summary changed from PolyhedronRepresentation richcmp compares two representation objects with different types to Extend PolyhedronRepresentation richcmp to a linear order, defining comparisons of representation objects of different types
    • Property Branch changed from to u/yzh/polyhedronrepresentation_richcmp_compares_two_representation_objects_with_different_types
    • Property Commit changed from to 2803d29d06cc7c683654cba34a2e1b724198bb11
  • Ticket #31702 – Description

    initial v5  
    1010That is, instead of `return NotImplemented`, we return something like
    1111{{{
    12 richcmp((type(self), self._vector*self._comparison_scalar()), (type(other), other._vector*other._comparison_scalar()), op)
     12richcmp((self.type(), self._vector*self._comparison_scalar()), (other.type(), other._vector*other._comparison_scalar()), op)
    1313}}}
    1414
     
    1717sage: P = Polyhedron(vertices=[(0,0),(1,1)])                                       
    1818sage: Q = Polyhedron(vertices=[(0,0)], rays=[(1,1)])                               
    19 sage: [P, Q].sort(key=lambda p: p.Vrepresentation())                               
     19sage: sorted([Q, P], key=lambda p: p.Vrepresentation())                               
    2020Traceback (most recent call
    2121...