Imagix 4D User Guide

Class Metrics

The following metrics are generated for classes, templates, interfaces, structs and unions in the project source code.

Chidamber and Kemerer Object Oriented Metrics

CK Class CohesionLack of Cohesion of Methods is a measure of the cohesion of the member functions of the class (Chidamber and Kemerer LCOM, 1994 revised definition).
Users may also select alternative definitions of class cohesion. One alternative is Hitz and Montazeri's 1996 redefinition of Li and Henry's graph theoretical calculation. The second is Henderson-Sellers definition, a ratio of methods (member functions) which do not read or set a specific attribute (member variable), averaged over all the attributes of the class.
CK Class CouplingMeasure of the coupling, or dependency, of the class (Chidamber and Kemerer CBO). This represents the number of external classes used.
CK Depth of InheritanceDepth of the hierarchy of base classes of the class (Chidamber and Kemerer DIT).
CK Number of ChildrenNumber of classes directly derived from class (Chidamber and Kemerer NOC).
CK Response for ClassNumber of methods called by the class's methods, a measure of the class's response (Chidamber and Kemerer RFC).
CK Weighted MethodsTotal cyclomatic complexity for the class's methods (Chidamber and Kemerer WMC).

McCabe Complexity Metrics

McCabe Average ComplexityAverage cyclomatic complexity for all methods in class
McCabe Maximum ComplexityMaximum cyclomatic complexity of any method in class.
McCabe Total ComplexityTotal cyclomatic complexity for all methods in class (same as CK Response for Class).

Halstead Complexity Metrics

Halstead Intelligent ContentLanguage-independent measure of the amount of content (complexity) of the class (Halstead I).
Halstead Mental EffortMeasure of the number of elemental mental discriminations necessary to create, or understand, the class (Halstead E).
Halstead Program VolumeMeasure of the information content of the class (Halstead V).
Halstead Program DifficultyMeasure of how compactly the class implements its algorithms (Halstead D). This is the inverse of the Halstead Program Level (of abstraction).

Other Metrics

Class CouplingMeasure of the coupling, or dependency, of the class, alternative to CK Class Coupling. Calculation is based on the number of inherited classes, the number of nested classes, the number of calls to static member functions, and the number of parameters and local variables used by class member functions and having a class type. The higher this value, the more effort is required to understand, use and modify the class.
To be accurate, data must be collected with the -locals option enabled.
Derived ClassesDepth of the hierarchy of derived classes of the class.
External Methods and CouplingTotal number of external classes used and external methods called by class member methods. This is the sum of coupling between classes and external methods called.
To be accurate, data must be collected with the -locals option enabled.
Fan In of Inherited ClassesNumber of base classes directly inherited by class.
Local MethodsNumber of local methods (private member functions) of the class.
Member AttributesNumber of attributes (member variables) of the class.
Member ClassesNumber of nested classes (member classes) of the class.
Member TypesNumber of member typedefs of the class.
Member MethodsNumber of methods (member functions) of the class.
Methods Called, ExternalNumber of external methods called by class methods.
Methods Called, InternalNumber of internal methods called by class methods.
Total Members of ClassTotal number of members of the class.