class_docstr: Sorting network class.
  
  From Wikipedia : A sorting network is an abstract mathematical model
  of a network of wires and comparator modules that is used to sort a
  sequence of numbers. Each comparator connects two wires and sort the
  values by outputting the smaller value to one wire, and a larger
  value to the other.
class_docstr_tok: ["Sorting","network","class",".","From","Wikipedia",":","A","sorting","network","is","an","abstract","mathematical","model","of","a","network","of","wires","and","comparator","modules","that","is","used","to","sort","a","sequence","of","numbers",".","Each","comparator","connects","two","wires","and","sort","the","values","by","outputting","the","smaller","value","to","one","wire",",","and","a","larger","value","to","the","other","."]
docstr: Return the number of comparison-swap used.
docstr_tok: ["Return","the","number","of","comparison-swap","used","."]
code: def length(self):
      """Return the number of comparison-swap used."""
      return sum(len(level) for level in self)
  
file_path: deap/examples/ga/sortingnetwork.py
imports: from itertools import product
label_desc: Use image node_id 8 for calling the SortingNetwork obj's underlying member method code with example usage: obj.length() and returns: sum