MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __lt__

Method __lt__

graphs/prim.py:30–32  ·  view source on GitHub ↗

Comparison rule to < operator.

(self, other)

Source from the content-addressed store, hash-verified

28 self.edges = {} # {vertex:distance}
29
30 def __lt__(self, other):
31 """Comparison rule to < operator."""
32 return self.key < other.key
33
34 def __repr__(self):
35 """Return the vertex id."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected