Skip to content

cand [terminology]

Terminology

Usage

  • Use for a provisional candidate that may later be accepted, rejected, or verified.
  • It is conventional in voting, search, and generated-neighbor algorithms.
  • Use compound forms such as cand1 and cand2 when multiple candidates coexist.
  • Prefer a semantic name when the candidate has a stable domain role.
cand, cnt = None, 0

for x in nums:
    if cnt == 0:
        cand, cnt = x, 1