scitools.com

← Metric catalog

Halstead Vocabulary (n) is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Halstead Vocabulary (n)

API ID: HalsteadVocabulary
Languages: Any
Targets: Files, Functions

Halstead Vocabulary (n) is the sum of unique operators (n1) and unique operands (n2)

It's calculated as