Home Manual Reference Source Test Repository
public class | source

HalsteadData

Provides all Halstead metric data / parameters.

See:

Constructor Summary

Public Constructor
public

Initializes the default Halstead data.

Member Summary

Public Members
public

Measures an estimate for the number of potential errors.

public

Measures the difficulty of the program to write or understand.

public

Measures the maintenance effort of the program.

public

Defines the number of operands and operators.

public

operands: {distinct: number, total: number, identifiers: Array<string>}

In general an operand participates in actions associated with operators.

public

operators: {distinct: number, total: number, identifiers: Array<string>}

In general an operator carries out an action.

public

Measures potential coding time.

public

Defines the unique number of operands and operators.

public

Measures how much information a reader of the code potential has to absorb to understand its meaning.

Method Summary

Public Methods
public

reset(clearIdentifiers: boolean): HalsteadData

Resets the state of all Halstead data metrics without removing any operand or operator data.

Public Constructors

public constructor source

Initializes the default Halstead data.

Public Members

public bugs: number source

Measures an estimate for the number of potential errors.

public difficulty: number source

Measures the difficulty of the program to write or understand.

public effort: number source

Measures the maintenance effort of the program.

public length: number source

Defines the number of operands and operators.

public operands: {distinct: number, total: number, identifiers: Array<string>} source

In general an operand participates in actions associated with operators. A distinct and total count is provided with all identifiers.

public operators: {distinct: number, total: number, identifiers: Array<string>} source

In general an operator carries out an action. A distinct and total count is provided with all identifiers.

public time: number source

Measures potential coding time.

public vocabulary: number source

Defines the unique number of operands and operators.

public volume: number source

Measures how much information a reader of the code potential has to absorb to understand its meaning.

Public Methods

public reset(clearIdentifiers: boolean): HalsteadData source

Resets the state of all Halstead data metrics without removing any operand or operator data.

Params:

NameTypeAttributeDescription
clearIdentifiers boolean

Clears operands / operators; default: false.

Return:

HalsteadData