Python中的SymPy Permutation.rank_nonlex()
Permutation.rank_nonlex() : rank_nonlex()是一个Sympy Python库函数,用于返回非词法互换的等级。
语法 : sympy.combinatorics.permutations.Permutation.rank_nonlex()
返回:非词典式排列法的等级。
代码 #1 : rank_nonlex() 示例
输出 :
Permutation a – rank_nonlex form : 13
Permutation b – rank_nonlex form : 72
代码 #2 : rank_nonlex() 例子 – 二维互换
输出 :
Permutation a – rank_nonlex form : 218