Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use itertools.combinations instead of Combinations in HyperStarGraph generator #32559

Closed
dcoudert opened this issue Sep 25, 2021 · 14 comments
Closed

Comments

@dcoudert
Copy link
Contributor

Following #30483 we use itertools.combinations instead of Combinations in HyperStarGraph. On the way, we rewrite this generator in a more efficient way and check its input parameters.

CC: @slel @fchapoton @mwhansen

Component: graph theory

Author: David Coudert

Branch/Commit: 9570d01

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/32559

@dcoudert dcoudert added this to the sage-9.5 milestone Sep 25, 2021
@dcoudert

This comment has been minimized.

@dcoudert
Copy link
Contributor Author

Branch: public/graphs/32559_hyperstar

@dcoudert
Copy link
Contributor Author

Commit: 8460d20

@dcoudert
Copy link
Contributor Author

New commits:

8460d20trac #32559: rewrite HyperStarGraph generator

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 25, 2021

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

fe3db78trac #32559: small details

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 25, 2021

Changed commit from 8460d20 to fe3db78

@dcoudert
Copy link
Contributor Author

comment:3

Green bot, please review.

Before

sage: %timeit g = graphs.HyperStarGraph(6,3)
215 µs ± 28 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)

With this ticket

sage: %timeit g = graphs.HyperStarGraph(6,3)
123 µs ± 3.08 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)

@fchapoton
Copy link
Contributor

comment:4

the new raise should be doctested.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 30, 2021

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

5004990trac #32559: merged with 9.5.beta2
9570d01trac #32559: doctest input parameters

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 30, 2021

Changed commit from fe3db78 to 9570d01

@dcoudert
Copy link
Contributor Author

comment:6

Right, done.

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@fchapoton
Copy link
Contributor

comment:7

Merci. Un test aurait suffi.

@vbraun
Copy link
Member

vbraun commented Oct 10, 2021

Changed branch from public/graphs/32559_hyperstar to 9570d01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants