NDepend.API Documentation
NormDistFromMainSeq Property
NDepend.CodeModel Namespace > IAssembly Interface : NormDistFromMainSeq Property
Gets a float numeric nullable value in the range [0,1] assessing the balance between Abstractness and Instability for this assembly. A returned value close to 0 indicates an ideal balance.
Syntax
Nullable<float> NormDistFromMainSeq {get;}

Property Value

null if this assembly is a third-party assembly.
Otherwise returns this assembly NormDistFromMainSeq numeric value.
Remarks
Abstractness versus Instability Metrics:
By measuring coupling between types of your application, NDepend assesses the stability of each assembly.
An assembly is considered stable if its child types are used by a lot of types of others application assemblies (i.e stable = painful to modify).
If an assembly contains many abstract types (i.e interfaces and abstract classes) and few concrete types, it is considered as abstract.
Thus, NDepend helps you detect which assemblies are potentially painful to maintain (i.e concrete and stable) and which assemblies are potentially useless (i.e abstract and instable).
This theory and metrics have been first introduced by the excellent book Agile Software Development: Principles, Patterns, and Practices in C#, Robert C. Martin (Prentice Hall PTR, 2006).

Distance from main Sequence definition:
It represents the perpendicular normalized distance of an assembly from the idealized line A + I = 1. A stands for Abstractness and I for Instability. This line is called main sequence.
This metric is an indicator of the assembly's balance between abstractness and instability. An assembly squarely on the main sequence is optimally balanced with respect to its abstractness and stability.
Ideal assemblies are either completely abstract and stable (I=0, A=1) or completely concrete and instable (I=1, A=0).
The range for this NormDistFromMainSeq metric is 0 to 1, with D=0 indicating an assembly that is coincident with the main sequence and D=1 indicating an assembly that is as far from the main sequence as possible.
A picture provided within the NDepend report reveals if an assembly is in the zone of pain (I and A both close to 0) or in the zone of uselessness (I and A both close to 1).

Recommendations:
Assemblies where NormDistFromMainSeq is higher than 0.7 might be problematic. However, in the real world it is very hard to avoid such assemblies.
Therefore, you should allow just a few of your application assemblies to violate this 0.7 threshold.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IAssembly Interface
IAssembly Members