TDAT: public double sumSquaredError(V parentEntry) { | |
double distance = 0.0; | |
if (isLeaf()) { | |
for (V key : keys) { | |
distance += key.distanceSquared(parentEntry); | |
} | |
} else { | |
for (int i = 0; i < count(); ++i) { | |
distance += children.get(i).sumSquaredError(keys.get(i)); | |
} | |
} | |
return distance; | |
} | |
COM: <s> calculate sum of squared error between vecotrs in leaves and their </s> | |