Halstead Estimated Length

From Maisqual Wiki

Jump to: navigation, search

Contents


Definition

According to Halstead, N and \hat{N} differ by 10% and the correlation coefficient is close to 1. The relation between N (observed length) and \hat{N} (estimated length) seems valid. Then Halstead uses this relation to evaluate other metrics.

\hat{N} = n_1 * log_2 (n_1) + n2 * log_2 (n_2)

where

  • n1 is the number of distinct operators used in a function.
  • n2 is the number of distinct operands used in a function.


See also

Metrics:

Personal tools