Opened 2 years ago

Closed 2 years ago

#30510 closed enhancement (fixed)

Speed up method subgraph

Reported by: dcoudert Owned by:
Priority: major Milestone: sage-9.2
Component: graph theory Keywords:
Cc: tscrim Merged in:
Authors: David Coudert Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 0345f0b (Commits, GitHub, GitLab) Commit: 0345f0b09ba350c80a98e822f028af7077c66ab2
Dependencies: Stopgaps:

Status badges

Description (last modified by dcoudert)

We slightly speed up methods _subgraph_by_adding and _subgraph_by_deleting by checking if a vertex belongs to a graph or a set instead of checking if it belongs to a list of vertices. This benefits all methods using subgraph.

Change History (5)

comment:1 Changed 2 years ago by dcoudert

Branch: public/graphs/30510_subgraph
Commit: 3eefdf7a1dbc3537a1103c7dcdadc98db3d95040
Description: modified (diff)
Status: newneeds_review

New commits:

3eefdf7trac #30510: improve method subgraph

comment:2 Changed 2 years ago by git

Commit: 3eefdf7a1dbc3537a1103c7dcdadc98db3d950400345f0b09ba350c80a98e822f028af7077c66ab2

Branch pushed to git repo; I updated commit sha1. New commits:

0345f0btrac #30510: check only if vertices is not None

comment:3 Changed 2 years ago by dcoudert

Cc: tscrim added

green bot.

comment:4 Changed 2 years ago by tscrim

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

LGTM.

comment:5 Changed 2 years ago by vbraun

Branch: public/graphs/30510_subgraph0345f0b09ba350c80a98e822f028af7077c66ab2
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.