Opened 11 years ago

Closed 11 years ago

# Random Interval Graphs

Reported by: Owned by: ncohen rlm major sage-4.3 graph theory sage-4.3.alpha1 Nathann Cohen Mike Hansen N/A

This patch definesRandom Interval Graph, as explained in the docstring :

        An interval graph is built from a list (a_i,b_i)_{1\leq i \leq n}
of intervals : to each interval of the list is associated one
vertex, two vertices being adjacent if the two corresponding
intervals intersect.

A random interval graph of order n is generated by picking
random values for the (a_i,b_j), each of the two coordinates
being generated from the uniform distribution on the interval
[0,1].


### comment:1 Changed 11 years ago by ncohen

• Description modified (diff)
• Status changed from new to needs_review

### comment:2 Changed 11 years ago by mhansen

• Authors set to Nathann Cohen
• Report Upstream set to N/A
• Reviewers set to Mike Hansen

The patch looks mostly good to me with the exception of the changes I made.

Tuples already sort based on their first component (then second, etc.). Also, I decreased the size of the example so that the chromatic number didn't take too long to compute.

Could you look at these changes?

### comment:3 Changed 11 years ago by ncohen

• Status changed from needs_review to positive_review

Looks ok ! :-)

I should have thought of directly using sort instead of this lambda-function.. And I forgot that the default behaviour of sort on tuples was to use the lexicographic order, which is perfect in this case.... :-)

If you have some time for reviews ( as you merged an amazing amount of patches today ! ) could you take a look at #6680 or #6679 ? I'd understand if you could not, I know it would take much more time than for others, but these two patches are the real blockers in the graph section...

Thanks !!! :-)

Nathann

### comment:4 Changed 11 years ago by mhansen

• Merged in set to sage-4.3.alpha1
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.