sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

Add interface to nauty-gentreeg (generator of trees) #33670

Closed dcoudert closed 2 years ago

dcoudert commented 2 years ago

Add interface to Nauty's gentreeg generator of non-isomorphic trees.

It is slower than graphs.trees() but has more options.

Component: graph theory

Author: David Coudert

Branch: 7a5e122

Reviewer: Frédéric Chapoton

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

dcoudert commented 2 years ago

Branch: public/graphs/33670_gentreeg

dcoudert commented 2 years ago

New commits:

077a46ftrac #33670: add interface to nauty's gentreeg
dcoudert commented 2 years ago

Commit: 077a46f

fchapoton commented 2 years ago
comment:2

typo "aggrees"

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 077a46f to 7a5e122

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

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

7a5e122trac #33670: fix typo
dcoudert commented 2 years ago
comment:4

fixed.

fchapoton commented 2 years ago
comment:5

feu vert

fchapoton commented 2 years ago

Reviewer: Frédéric Chapoton

vbraun commented 2 years ago

Changed branch from public/graphs/33670_gentreeg to 7a5e122

mkoeppe commented 2 years ago

Changed commit from 7a5e122 to none

mkoeppe commented 2 years ago
comment:7

I've seen a few failures related to this on CI. For example https://github.com/mkoeppe/sage/runs/7244909758?check_suite_focus=true

sage -t --random-seed=339975412379786288587528093076040376748 src/sage/graphs/generators/families.py
**********************************************************************
File "src/sage/graphs/generators/families.py", line 3479, in sage.graphs.generators.families.nauty_gentreeg
Failed example:
    [len(list(graphs.nauty_gentreeg(str(i)))) for i in range(1, 15)]
Expected:
    [1, 1, 1, 2, 3, 6, 11, 23, 47, 106, 235, 551, 1301, 3159]
Got:
    [1, 2, 1, 2, 3, 6, 11, 23, 47, 106, 235, 551, 1301, 3159]

(that's on debian-stretch-standard using system nauty 2.6r7+ds-1)

mkoeppe commented 2 years ago
comment:8

I've opened #34133 for this