Beispiel #1
0
    def __repr__(self):
        """
        EXAMPLES::

            sage: S = species.SubsetSpecies()
            sage: a = S.structures(["a","b","c"]).random_element(); a
            {}
        """
        s = GenericSpeciesStructure.__repr__(self)
        return "{" + s[1:-1] + "}"
Beispiel #2
0
    def __repr__(self):
        """
        EXAMPLES::

            sage: S = species.CycleSpecies()
            sage: a = S.structures(["a","b","c"]).random_element(); a
            ('a', 'b', 'c')
        """
        s = GenericSpeciesStructure.__repr__(self)
        return "(" + s[1:-1] + ")"
Beispiel #3
0
 def __repr__(self):
     """
     EXAMPLES::
     
         sage: S = species.PartitionSpecies()
         sage: a = S.structures(["a","b","c"]).random_element(); a
         {{'a', 'b', 'c'}}
     """
     s = GenericSpeciesStructure.__repr__(self)
     return "{"+s[1:-1]+"}"
Beispiel #4
0
 def __repr__(self):
     """
     EXAMPLES::
     
         sage: S = species.CycleSpecies()
         sage: a = S.structures(["a","b","c"]).random_element(); a
         ('a', 'b', 'c')
     """
     s = GenericSpeciesStructure.__repr__(self)
     return "(" + s[1:-1] + ")"
Beispiel #5
0
 def __repr__(self):
     """
     EXAMPLES::
     
         sage: S = species.SubsetSpecies()
         sage: a = S.structures(["a","b","c"]).random_element(); a
         {}
     """
     s = GenericSpeciesStructure.__repr__(self)
     return "{" + s[1:-1] + "}"
    def __repr__(self):
        """
        EXAMPLES::

            sage: S = species.PartitionSpecies()
            sage: a = S.structures(["a","b","c"]).random_element(); a
            {{'a', 'b', 'c'}}
        """
        s = GenericSpeciesStructure.__repr__(self)
        return "{" + s[1:-1] + "}"
    def __repr__(self):
        """
        EXAMPLES::

            sage: F = species.CharacteristicSpecies(3)
            sage: a = F.structures([1, 2, 3]).random_element(); a
            {1, 2, 3}
            sage: F = species.SingletonSpecies()
            sage: F.structures([1]).list()
            [1]
            sage: F = species.EmptySetSpecies()
            sage: F.structures([]).list()
            [{}]
        """
        s = GenericSpeciesStructure.__repr__(self)
        if self.parent()._n == 1:
            return s[1:-1]
        else:
            return "{" + s[1:-1] + "}"