Opened 11 years ago

Closed 11 years ago

#8421 closed defect (fixed)

Change BipartiteGraph .left and .right to sets

Reported by: rhinton Owned by: rhinton
Priority: major Milestone: sage-4.4
Component: graph theory Keywords: BipartiteGraph, partitions, sets
Cc: rlm, jason, ncohen Merged in: sage-4.4.alpha0
Authors: Ryan Hinton Reviewers: Robert Miller
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The documentation describes the 'left' and 'right' attributes of BipartiteGrpah? as sets. And deleting vertices is much more efficient if they are. But they are currently stored as lists.

sage: bg = BipartiteGraph(graphs.CycleGraph(4))
sage: bg.left
[0, 2]

Of course, it's easy to change from one to the other. But we will get better performance from sets.

Attachments (1)

trac_8421-bipartite-partition-sets.patch (8.8 KB) - added by rhinton 11 years ago.
updated commit message

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by rhinton

  • Owner changed from rlm to rhinton

comment:2 Changed 11 years ago by rhinton

  • Status changed from new to needs_review

Patch implements change. It sits on my MQ stack on top of #8331 and #8329, but I don't think either of these are required.

Changed 11 years ago by rhinton

updated commit message

comment:3 Changed 11 years ago by rlm

  • Reviewers set to Robert Miller
  • Status changed from needs_review to positive_review

comment:4 Changed 11 years ago by jhpalmieri

  • Merged in set to sage-4.4.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed

Merged "trac_8421-bipartite-partition-sets.patch" into 4.4.alpha0

Note: See TracTickets for help on using tickets.