(self)
return Perm.unrank_nonlex(self.size, r + 1)
Returns the next permutation in nonlex order [3].
        If self is the last permutation in this order it returns None.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.print_cyclic = False
        >>> p = Permutation([2, 0, 3, 1]); p.rank_nonlex()
        5
        >>> p = p.next_nonlex(); p
        Permutation([3, 0, 1, 2])
        >>> p.rank_nonlex()
        6

        See Also
        ========

        rank_nonlex, unrank_nonlex
Returns the next permutation in nonlex order [3].
        If self is the last permutation in this order it returns None.
Returns the next permutation in nonlex order [ 3 ] . If self is the last permutation in this order it returns None .
def next_nonlex(self):
        """
        Returns the next permutation in nonlex order [3].
        If self is the last permutation in this order it returns None.

        Examples
        ========

        >>> from sympy.combinatorics.permutations import Permutation
        >>> Permutation.print_cyclic = False
        >>> p = Permutation([2, 0, 3, 1]); p.rank_nonlex()
        5
        >>> p = p.next_nonlex(); p
        Permutation([3, 0, 1, 2])
        >>> p.rank_nonlex()
        6

        See Also
        ========

        rank_nonlex, unrank_nonlex
        """
        r = self.rank_nonlex()
        if r == ifac(self.size) - 1:
            return None
        return Perm.unrank_nonlex(self.size, r + 1)
def next_nonlex ( self ) : r = self . rank_nonlex ( ) if r == ifac ( self . size ) - 1 : return None return Perm . unrank_nonlex ( self . size , r + 1 )