Python中的SymPy Permutation.is_even()
Permutation.is_even() : is_even()是一个sympy Python库函数,用于检查排列组合是否为偶数。
语法 : sympy.combinatorics.permutations.Permutation.is_even()
返回:真 – 如果排列组合是偶数;否则为假
代码 #1 : is_even() 示例
输出 :
Permutation a – is_even form : True
Permutation b – is_even form : False
代码 #2 : is_even() 例子 – 二维互换
输出 :
Permutation a – is_even form : True