NDepend.API Documentation
RelationalCohesion Property
NDepend.CodeModel Namespace > IAssembly Interface : RelationalCohesion Property
Gets a float numeric nullable value assessing this assembly child types average cohesion.
Syntax
Nullable<float> RelationalCohesion {get;}

Property Value

null if this assembly is a third-party assembly.
Otherwise returns this assembly RelationalCohesion numeric value.
Remarks
Let R be the number of types relationships that are internal to this assembly (i.e that do not connect to types outside the assembly).
Let N be the number of types within the assembly.
H = (R + 1)/ N. The extra 1 in the formula prevents H=0 when N=1.
The relational cohesion represents the relationship that this assembly has to all its types.

Recommendations:
As classes inside an assembly should be strongly related, the cohesion should be high. On the other hand, too high values may indicate over-coupling.
A good range for RelationalCohesion is 1.5 to 4.0.
Hence, assemblies where RelationalCohesion < 1.5 or RelationalCohesion > 4.0 might be problematic.
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