Opened 11 years ago

Closed 10 years ago

#9812 closed defect (fixed)

Sorting bug in fan subdivision

Reported by: novoselt Owned by: mhampton
Priority: major Milestone: sage-4.6
Component: geometry Keywords:
Cc: vbraun Merged in: sage-4.6.alpha1
Authors: Andrey Novoseltsev Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


sage: C = Cone([(1,0,0), (0,1,0), (1,0,1), (0,1,1)])
sage: F = Fan([C]).make_simplicial()
sage: [cone.ambient_ray_indices() for cone in F]
[(1, 3, 0), (1, 2, 0)]

While the output is mathematically correct, ambient ray indices are supposed to be sorted and violating this condition can lead to errors later. The attached patch adds extra sorting in the proper place. This means that polytopes constructed during subdivision can no longer be cached because of the potentially wrong vertex order, which is OK.

Attachments (1)

trac_9812_sorting_bug_in_fan_subdivision.patch (1.9 KB) - added by novoselt 11 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by novoselt

  • Status changed from new to needs_review

comment:2 Changed 11 years ago by vbraun

  • Status changed from needs_review to positive_review

good catch!

comment:3 Changed 11 years ago by novoselt

  • Reviewers set to Volker Braun

comment:4 Changed 10 years ago by mpatel

  • Merged in set to sage-4.6.alpha1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.