Class CouplingFactor

Coupling Factor metric (CF)

Measures how tightly coupled a file is based on both incoming and outgoing dependencies. Higher values indicate more coupling, which generally should be minimized. Formula: CF = (Ca + Ce) / Cmax Where:

  • Ca = afferent coupling (incoming dependencies)
  • Ce = efferent coupling (outgoing dependencies)
  • Cmax = maximum possible coupling (a normalization factor, typically file count - 1)

Implements

Constructors

Properties

Methods

Constructors

Properties

name: string = 'CouplingFactor'
description: string = 'Measures how tightly coupled a file is based on dependencies (0 = no coupling, 1 = maximum coupling)'

Methods