sagemath / sage

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

random simplicial complexes #5889

Closed jhpalmieri closed 15 years ago

jhpalmieri commented 15 years ago

Add random simplicial complexes to the class of examples of simplicial complexes, so you can do

sage: simplicial_complexes.RandomComplex(6, 2)

to get a random simplicial complex with 6 vertices, all possible edges, and the possible 2-dimensional simplices (triangles) randomly included (or not).

Component: algebraic topology

Author: John Palmieri

Reviewer: Alex Ghitza

Merged: 4.0.alpha0

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

aghitza commented 15 years ago
comment:1

This looks good.

There is one little issue: as far as I know, you do not need to label the doctest with #random. Sage doctests work in such a way that the same random seed is set before testing, so you will get the same results. So the #random should be removed from line 712.

Apart from that, positive review.

Michael, should we have a new trac component labeled "algebraic topology"? It's a bit weird to have this under "misc", and it will probably come in handy at the next Sage Days in Seattle.

jhpalmieri commented 15 years ago
comment:2

Okay, this patch is identical to the first one, but without "#random". It passes all tests for me on sage.math, although I would like someone else to double-check that.

jhpalmieri commented 15 years ago

Attachment: random-complex.patch.gz

aghitza commented 15 years ago
comment:3

It also passes doctests for me.

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 15 years ago
comment:4

Alex,

"Algebraic Topology" - here we come. I have made John default owner for now :)

If you want any other component please let me know and I will add them.

Cheers,

Michael

jhpalmieri commented 15 years ago
comment:5

Excellent!

85eec1a4-3d04-4b4d-b711-d4db03337c41 commented 15 years ago
comment:6

Merged in Sage 4.0.alpha0.

Cheers,

Michael

11d1fc49-71a1-44e1-869f-76be013245a0 commented 15 years ago

Reviewer: Alex Ghitza

11d1fc49-71a1-44e1-869f-76be013245a0 commented 15 years ago

Author: John Palmieri

11d1fc49-71a1-44e1-869f-76be013245a0 commented 15 years ago

Merged: 4.0.alpha0