Jump to content

Halstead complexity measures

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sohale (talk | contribs) at 15:45, 27 November 2007 (hasty article from a ref). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

n1 = the number of distinct operators

n2 = the number of distinct operands

N1 = the total number of operators

N2 = the total number of operands


From these numbers, five measures are derived:

Program length

N= N1 + N2

Program vocabulary

n= n1 + n2

Volume

V= N * (LOG2 n)

Difficulty

D= (n1/2) * (N2/n2)

Effort

E= D * V

From http://www.sei.cmu.edu/str/descriptions/halstead.html [1]

see also