• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python species.GenericCombinatorialSpecies类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中species.GenericCombinatorialSpecies的典型用法代码示例。如果您正苦于以下问题:Python GenericCombinatorialSpecies类的具体用法?Python GenericCombinatorialSpecies怎么用?Python GenericCombinatorialSpecies使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了GenericCombinatorialSpecies类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, F, G, min=None, max=None, weight=None):
        """
        EXAMPLES::

            sage: X = species.SingletonSpecies()
            sage: A = X*X
            sage: A.generating_series().coefficients(4)
            [0, 0, 1, 0]

            sage: P = species.PermutationSpecies()
            sage: F = P * P; F
            Product of (Permutation species) and (Permutation species)
            sage: F == loads(dumps(F))
            True
            sage: F._check()
            True

        TESTS::

            sage: X = species.SingletonSpecies()
            sage: X*X is X*X
            True
        """
        self._F = F
        self._G = G
        self._state_info = [F, G]
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=weight)
开发者ID:Babyll,项目名称:sage,代码行数:27,代码来源:product_species.py


示例2: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Returns the species of cycles.

        EXAMPLES::

            sage: C = species.CycleSpecies(); C
            Cyclic permutation species
            sage: C.structures([1,2,3,4]).list()
            [(1, 2, 3, 4),
             (1, 2, 4, 3),
             (1, 3, 2, 4),
             (1, 3, 4, 2),
             (1, 4, 2, 3),
             (1, 4, 3, 2)]

        TESTS: We check to verify that the caching of species is actually
        working.

        ::

            sage: species.CycleSpecies() is species.CycleSpecies()
            True

            sage: P = species.CycleSpecies()
            sage: c = P.generating_series().coefficients(3)
            sage: P._check()
            True
            sage: P == loads(dumps(P))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
        self._name = "Cyclic permutation species"
开发者ID:BlairArchibald,项目名称:sage,代码行数:33,代码来源:cycle_species.py


示例3: __init__

    def __init__(self, F, G, min=None, max=None, weight=None):
        """
        Returns the sum of two species.

        EXAMPLES::

            sage: S = species.PermutationSpecies()
            sage: A = S+S
            sage: A.generating_series().coefficients(5)
            [2, 2, 2, 2, 2]

            sage: P = species.PermutationSpecies()
            sage: F = P + P
            sage: F._check()
            True
            sage: F == loads(dumps(F))
            True

        TESTS::

            sage: A = species.SingletonSpecies() + species.SingletonSpecies()
            sage: B = species.SingletonSpecies() + species.SingletonSpecies()
            sage: C = species.SingletonSpecies() + species.SingletonSpecies(min=2)
            sage: A is B
            True
            sage: (A is C) or (A == C)
            False
        """
        self._F = F
        self._G = G

        self._state_info = [F, G]

        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
开发者ID:BlairArchibald,项目名称:sage,代码行数:34,代码来源:sum_species.py


示例4: __init__

    def __init__(self, F, G, min=None, max=None, weight=None):
        """
        Returns the composition of two species.

        EXAMPLES::

            sage: E = species.SetSpecies()
            sage: C = species.CycleSpecies()
            sage: S = E(C)
            sage: S.generating_series().coefficients(5)
            [1, 1, 1, 1, 1]
            sage: E(C) is S
            True

        TESTS::

            sage: E = species.SetSpecies(); C = species.CycleSpecies()
            sage: L = E(C)
            sage: c = L.generating_series().coefficients(3)
            sage: L._check() #False due to isomorphism types not being implemented
            False
            sage: L == loads(dumps(L))
            True
        """
        self._F = F
        self._G = G
        self._name = "Composition of (%s) and (%s)"%(F, G)
        self._state_info = [F, G]
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
开发者ID:Babyll,项目名称:sage,代码行数:29,代码来源:composition_species.py


示例5: __init__

    def __init__(self, F, G, min=None, max=None, weight=None):
        """
        Returns the functorial composition of two species.

        EXAMPLES::

            sage: E = species.SetSpecies()
            sage: E2 = species.SetSpecies(size=2)
            sage: WP = species.SubsetSpecies()
            sage: P2 = E2*E
            sage: G = WP.functorial_composition(P2)
            sage: G.isotype_generating_series().coefficients(5)
            [1, 1, 2, 4, 11]

            sage: G = species.SimpleGraphSpecies()
            sage: c = G.generating_series().coefficients(2)
            sage: type(G)
            <class 'sage.combinat.species.functorial_composition_species.FunctorialCompositionSpecies'>
            sage: G == loads(dumps(G))
            True
            sage: G._check() #False due to isomorphism types not being implemented
            False
        """
        self._F = F
        self._G = G
        self._state_info = [F, G]
        self._name = "Functorial composition of (%s) and (%s)"%(F, G)
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
开发者ID:Babyll,项目名称:sage,代码行数:28,代码来源:functorial_composition_species.py


示例6: __init__

 def __init__(self, min=None, max=None, weight=None):
     """
     EXAMPLES::
     
         sage: P = species.PartitionSpecies()
         sage: P._check()
         True
         sage: P == loads(dumps(P))
         True
     """
     GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
     self._name = "Partition species"
开发者ID:bgxcpku,项目名称:sagelib,代码行数:12,代码来源:partition_species.py


示例7: __init__

 def __init__(self, min=None, max=None, weight=None):
     """
     EXAMPLES::
     
         sage: L = species.LinearOrderSpecies()
         sage: L._check()
         True
         sage: L == loads(dumps(L))
         True
     """
     GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=None)
     self._name = "Linear order species"
开发者ID:pombredanne,项目名称:sage-1,代码行数:12,代码来源:linear_order_species.py


示例8: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        EXAMPLES::

            sage: P = species.PermutationSpecies()
            sage: c = P.generating_series().coefficients(3)
            sage: P._check()
            True
            sage: P == loads(dumps(P))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
        self._name = "Permutation species"
开发者ID:sageb0t,项目名称:testsage,代码行数:13,代码来源:permutation_species.py


示例9: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        EXAMPLES::

            sage: S = species.SubsetSpecies()
            sage: c = S.generating_series().coefficients(3)
            sage: S._check()
            True
            sage: S == loads(dumps(S))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
        self._name = "Subset species"
开发者ID:sageb0t,项目名称:testsage,代码行数:13,代码来源:subset_species.py


示例10: __init__

    def __init__(self, n, min=None, max=None, weight=None):
        """
        EXAMPLES::

            sage: F = species.CharacteristicSpecies(3)
            sage: c = F.generating_series().coefficients(4)
            sage: F._check()
            True
            sage: F == loads(dumps(F))
            True
        """
        self._n = n
        self._name = "Characteristic species of order %s"%n
        self._state_info = [n]
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
开发者ID:sageb0t,项目名称:testsage,代码行数:15,代码来源:characteristic_species.py


示例11: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Initializer for the empty species.

        EXAMPLES::

            sage: F = species.EmptySpecies()
            sage: F._check()
            True
            sage: F == loads(dumps(F))
            True
        """
        # There is no structure at all, so we set min and max accordingly.
        GenericCombinatorialSpecies.__init__(self, weight=weight)
        self._name = "Empty species"
开发者ID:Babyll,项目名称:sage,代码行数:15,代码来源:empty_species.py


示例12: __init__

 def __init__(self, F, G, min=None, max=None, weight=None):
     """
     EXAMPLES::
     
         sage: P = species.PermutationSpecies()
         sage: F = P * P; F
         Product of (Permutation species) and (Permutation species)
         sage: F == loads(dumps(F))
         True
         sage: F._check()
         True
     """
     self._F = F
     self._G = G
     self._state_info = [F, G]
     GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=weight)
开发者ID:bgxcpku,项目名称:sagelib,代码行数:16,代码来源:product_species.py


示例13: __init__

    def __init__(self, F, G, min=None, max=None, weight=None):
        """
        EXAMPLES::

            sage: G = species.SimpleGraphSpecies()
            sage: c = G.generating_series().coefficients(2)
            sage: type(G)
            <class 'sage.combinat.species.functorial_composition_species.FunctorialCompositionSpecies_class'>
            sage: G == loads(dumps(G))
            True
            sage: G._check() #False due to isomorphism types not being implemented
            False
        """
        self._F = F
        self._G = G
        self._state_info = [F, G]
        self._name = "Functorial composition of (%s) and (%s)"%(F, G)
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
开发者ID:sageb0t,项目名称:testsage,代码行数:18,代码来源:functorial_composition_species.py


示例14: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Returns the species of linear orders.

        EXAMPLES::

            sage: L = species.LinearOrderSpecies()
            sage: L.generating_series().coefficients(5)
            [1, 1, 1, 1, 1]

            sage: L = species.LinearOrderSpecies()
            sage: L._check()
            True
            sage: L == loads(dumps(L))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=None)
        self._name = "Linear order species"
开发者ID:Babyll,项目名称:sage,代码行数:18,代码来源:linear_order_species.py


示例15: __init__

    def __init__(self, n, min=None, max=None, weight=None):
        """
        Returns the characteristic species of order `n`.

        This species has exactly one structure on a set of of size `n`
        and no structures of on sets of any other size.

        EXAMPLES::

            sage: X = species.CharacteristicSpecies(1)
            sage: X.structures([1]).list()
            [1]
            sage: X.structures([1,2]).list()
            []
            sage: X.generating_series().coefficients(4)
            [0, 1, 0, 0]
            sage: X.isotype_generating_series().coefficients(4)
            [0, 1, 0, 0]
            sage: X.cycle_index_series().coefficients(4)
            [0, p[1], 0, 0]

            sage: F = species.CharacteristicSpecies(3)
            sage: c = F.generating_series().coefficients(4)
            sage: F._check()
            True
            sage: F == loads(dumps(F))
            True

        TESTS::

            sage: S1 = species.CharacteristicSpecies(1)
            sage: S2 = species.CharacteristicSpecies(1)
            sage: S3 = species.CharacteristicSpecies(2)
            sage: S4 = species.CharacteristicSpecies(2, weight=2)
            sage: S1 is S2
            True
            sage: S1 == S3
            False
        """
        self._n = n
        self._name = "Characteristic species of order %s"%n
        self._state_info = [n]
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
开发者ID:Babyll,项目名称:sage,代码行数:43,代码来源:characteristic_species.py


示例16: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Returns the species of partitions.

        EXAMPLES::

            sage: P = species.PartitionSpecies()
            sage: P.generating_series().coefficients(5)
            [1, 1, 1, 5/6, 5/8]
            sage: P.isotype_generating_series().coefficients(5)
            [1, 1, 2, 3, 5]

            sage: P = species.PartitionSpecies()
            sage: P._check()
            True
            sage: P == loads(dumps(P))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
        self._name = "Partition species"
开发者ID:Babyll,项目名称:sage,代码行数:20,代码来源:partition_species.py


示例17: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Returns the species of subsets.

        EXAMPLES::

            sage: S = species.SubsetSpecies()
            sage: S.generating_series().coefficients(5)
            [1, 2, 2, 4/3, 2/3]
            sage: S.isotype_generating_series().coefficients(5)
            [1, 2, 3, 4, 5]

            sage: S = species.SubsetSpecies()
            sage: c = S.generating_series().coefficients(3)
            sage: S._check()
            True
            sage: S == loads(dumps(S))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=None, max=None, weight=None)
        self._name = "Subset species"
开发者ID:JasYoung314,项目名称:sage,代码行数:21,代码来源:subset_species.py


示例18: __init__

    def __init__(self, min=None, max=None, weight=None):
        """
        Returns the species of sets.

        EXAMPLES::

            sage: E = species.SetSpecies()
            sage: E.structures([1,2,3]).list()
            [{1, 2, 3}]
            sage: E.isotype_generating_series().coefficients(4)
            [1, 1, 1, 1]

            sage: S = species.SetSpecies()
            sage: c = S.generating_series().coefficients(3)
            sage: S._check()
            True
            sage: S == loads(dumps(S))
            True
        """
        GenericCombinatorialSpecies.__init__(self, min=min, max=max, weight=weight)
        self._name = "Set species"
开发者ID:BlairArchibald,项目名称:sage,代码行数:21,代码来源:set_species.py



注:本文中的species.GenericCombinatorialSpecies类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python species.Species类代码示例发布时间:2022-05-27
下一篇:
Python specfun.klvnzo函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap