class_docstr: Represents a basic subset object.
  
  Explanation
  ===========
  
  We generate subsets using essentially two techniques,
  binary enumeration and lexicographic enumeration.
  The Subset class takes two arguments, the first one
  describes the initial subset to consider and the second
  describes the superset.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Subset
  >>> a = Subset(['c', 'd'], ['a', 'b', 'c', 'd'])
  >>> a.next_binary().subset
  ['b']
  >>> a.prev_binary().subset
  ['c']
class_docstr_tok: ["Represents","a","basic","subset","object",".","Explanation","===========","We","generate","subsets","using","essentially","two","techniques",",","binary","enumeration","and","lexicographic","enumeration",".","The","Subset","class","takes","two","arguments",",","the","first","one","describes","the","initial","subset","to","consider","and","the","second","describes","the","superset",".","Examples","========",">",">",">","from","sympy.combinatorics","import","Subset",">",">",">","a","=","Subset","(","[","'","c","'",",","'d","'","]",",","[","'","a","'",",","'","b","'",",","'","c","'",",","'d","'","]",")",">",">",">","a.next_binary","(",")",".subset","[","'","b","'","]",">",">",">","a.prev_binary","(",")",".subset","[","'","c","'","]"]
docstr: Computes the lexicographic ranking of the subset.
  
  Examples
  ========
  
  >>> from sympy.combinatorics import Subset
  >>> a = Subset(['c', 'd'], ['a', 'b', 'c', 'd'])
  >>> a.rank_lexicographic
  14
  >>> a = Subset([2, 4, 5], [1, 2, 3, 4, 5, 6])
  >>> a.rank_lexicographic
  43
docstr_tok: ["Computes","the","lexicographic","ranking","of","the","subset",".","Examples","========",">",">",">","from","sympy.combinatorics","import","Subset",">",">",">","a","=","Subset","(","[","'","c","'",",","'d","'","]",",","[","'","a","'",",","'","b","'",",","'","c","'",",","'d","'","]",")",">",">",">","a.rank_lexicographic","14",">",">",">","a","=","Subset","(","[","2",",","4",",","5","]",",","[","1",",","2",",","3",",","4",",","5",",","6","]",")",">",">",">","a.rank_lexicographic","43"]
code: def rank_lexicographic(self):
      """
      Computes the lexicographic ranking of the subset.
  
      Examples
      ========
  
      >>> from sympy.combinatorics import Subset
      >>> a = Subset(['c', 'd'], ['a', 'b', 'c', 'd'])
      >>> a.rank_lexicographic
      14
      >>> a = Subset([2, 4, 5], [1, 2, 3, 4, 5, 6])
      >>> a.rank_lexicographic
      43
      """
      if self._rank_lex is None:
  
          def _ranklex(self, subset_index, i, n):
              if subset_index == [] or i > n:
                  return 0
              if i in subset_index:
                  subset_index.remove(i)
                  return 1 + _ranklex(self, subset_index, i + 1, n)
              return 2 ** (n - i - 1) + _ranklex(
                  self, subset_index, i + 1, n
              )
  
          indices = Subset.subset_indices(self.subset, self.superset)
          self._rank_lex = _ranklex(
              self, indices, 0, self.superset_size
          )
      return self._rank_lex
  
imports: from itertools import combinations
  from sympy.combinatorics.graycode import GrayCode
label_desc: Use image node_id 12 for calling the Subset obj's underlying member method code with example usage: obj.rank_lexicographic() and returns: self, unknown, int, unknown