Ticket #14054: trac_14054-fix-rigged-list.2.patch

File trac_14054-fix-rigged-list.2.patch, 1.1 KB (added by SimonKing, 7 years ago)

Mark output of RiggedConfigurations.list() random and test against cardinality, to make it reproducible on different machines.

  • sage/combinat/rigged_configurations/rigged_configurations.py

    # HG changeset patch
    # User Simon King <simon.king@uni-jena.de>
    # Date 1362484420 -3600
    # Node ID 46d4c6bf40f9b2e8f391a6cee5d5db6ae1db6440
    # Parent  241c2bea4c1fc37184eb910aa40eaf0640ba40e5
    #14054: Make RiggedConfigurations.list() test random; test against cardinality.
    
    diff --git a/sage/combinat/rigged_configurations/rigged_configurations.py b/sage/combinat/rigged_configurations/rigged_configurations.py
    a b  
    4545    Rigged configurations of type ['A', 3, 1] and factors ((2, 1),)
    4646    sage: RC.cardinality()
    4747    6
    48     sage: RC.list()
     48    sage: len(RC.list()) == RC.cardinality()
     49    True
     50    sage: sorted(RC.list())    # random
    4951    [
    5052    (/)
    5153    <BLANKLINE>
     
    589591        EXAMPLES::
    590592
    591593            sage: RC = HighestWeightRiggedConfigurations(['D', 4, 1], [[2, 2]])
    592             sage: RC.list()
     594            sage: len(RC.list()) == RC.cardinality()
     595            True
     596            sage: sorted(RC.list())    # random
    593597            [
    594598            (/)
    595599            <BLANKLINE>