Commit 6fbdbc7c authored by Johannes Salentin's avatar Johannes Salentin

dense structure for cluster

overall dense structure is still measured
parent 1b869883
Pipeline #162998 passed with stages
in 1 minute and 31 seconds
......@@ -14,16 +14,6 @@ public class DenseStructure extends Detector {
super("Dense Structure");
}
// could use clustering coefficient
private void overallDenseStructure() {
double v = model.getElements().size();
double e = model.getRelationships().size();
double avgDegree = e / (v/* * (v - 1)*/);
if (avgDegree > MAX_AVG_DEGREE) {
addToSmells(new EASmell("Overall Dense Structure", null, " with average degree of " + avgDegree));
}
}
public List<EASmell> detect() {
overallDenseStructure();
for (ElementType element : model.getElements()) {
......@@ -43,4 +33,13 @@ public class DenseStructure extends Detector {
}
return result;
}
private void overallDenseStructure() {
double v = model.getElements().size();
double e = model.getRelationships().size();
double avgDegree = e / (v/* * (v - 1)*/);
if (avgDegree > MAX_AVG_DEGREE) {
addToSmells(new EASmell("Overall Dense Structure", null, " with average degree of " + avgDegree));
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment