Partition.RGS_generalized():RGS_generalized()是一個sympy Python庫函數,該函數計算m +1個廣義無限製增長字符串(其中a [i]是元素i所在的塊的字符串),然後將其作為矩陣中的行返回。
受限製的增長字符串-每個字符,i結果在塊(Bi)對應的元素所屬。
用法: sympy.combinatorics.partitions.Partition.RGS_generalized()
返回:廣義無限製增長字符串作為矩陣的行。
代碼1:RGS_generalized()示例
]
# Python code explaining
# SymPy.RGS_generalized()
# importing SymPy libraries
from sympy.combinatorics.partitions import Partition
from sympy.combinatorics.partitions import RGS_generalized
# Using from sympy.combinatorics.partitions.Partition.RGS_generalized() method
p = RGS_generalized(3)
print ("Row of Matrx : \n", p)
輸出:
Row of Matrx :
Matrix([[1, 1, 1, 1], [1, 2, 3, 0], [2, 5, 0, 0], [5, 0, 0, 0]])
代碼2:RGS_generalized()示例
]
# Python code explaining
# SymPy.RGS_generalized()
# importing SymPy libraries
from sympy.combinatorics.partitions import Partition
from sympy.combinatorics.partitions import RGS_generalized
# Using from sympy.combinatorics.partitions.Partition.RGS_generalized() method
p = RGS_generalized(-1)
print ("Row of Matrx : \n", p)
輸出:
Row of Matrx :
Matrix(0, 0, [])
相關用法
- Python sympy.csc()用法及代碼示例
- Python Sympy Permutation.max()用法及代碼示例
- Python Sympy Permutation.min()用法及代碼示例
- Python sympy.S.GoldenRatio用法及代碼示例
- Python sympy.S.EulerGamma用法及代碼示例
- Python sympy RGS用法及代碼示例
- Python sympy.apart()用法及代碼示例
- Python sympy.gcd()用法及代碼示例
- Python sympy.lcm()用法及代碼示例
- Python sympy.cot()用法及代碼示例
- Python sympy.has()用法及代碼示例
- Python sympy.sin()用法及代碼示例
- Python sympy.tan()用法及代碼示例
- Python sympy.det()用法及代碼示例
- Python sympy.Mul()用法及代碼示例
注:本文由純淨天空篩選整理自noobestars101大神的英文原創作品 SymPy | Partition.RGS_generalized() in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。