public class RelationalCohesion extends ObjectiveFunctionImplementation
This is the average number of internal relationships per class/interface, and is calculated as the ratio of R+1 to the number of classes and interfaces in the package.
R is the number of relationships between classes and interfaces in the package. There is a dependency from class or interface C to class or interface D if C has an attribute of type D C has an operation with a parameter of type D C has an association, aggregation, or composition with navigability to D C has a UML dependency or usage dependency to D UML dependencies are shown as dashed arrows in the diagrams (usage with stereotype 'use'). C is a child of D C implements interface D The metric counts all such dependencies between classes and interfaces in the package. Bidirectional associations are counted twice, because C knows D and vice versa. By convention, associations that indicate no navigability at either end are considered to be bidirectional.
Constructor and Description |
---|
RelationalCohesion(Architecture architecture) |
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluateICohesion() |
addToResults, divideToResults, getArchitecture, getResults, setArchitecture, setResults, setResults
public RelationalCohesion(Architecture architecture)