MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / compare

Method compare

tools/python-3.11.9-amd64/Tools/demo/sortvisu.py:165–169  ·  view source on GitHub ↗
(self, i, j)

Source from the content-addressed store, hash-verified

163 item.swapwith(other)
164
165 def compare(self, i, j):
166 self.countcompare()
167 item = self.items[i]
168 other = self.items[j]
169 return item.compareto(other)
170
171 def reset(self, msg):
172 self.ncompares = 0

Callers 4

insertionsortFunction · 0.45
selectionsortFunction · 0.45
bubblesortFunction · 0.45
quicksortFunction · 0.45

Calls 2

countcompareMethod · 0.95
comparetoMethod · 0.80

Tested by

no test coverage detected