* resource for the target to be removed (lower than
* resourceThreshold)
*/
private void antiggregate(Resource resource, Model removedModel,
float resourceThreshold, float otherThreshold) {
RelationIterator iter = new DirectRelationIterator(resource);
int pos = 0;
OUTER: while (iter.hasNext()) {
Relation current = iter.nextRelation();
if (++pos > 20) {
//if (current.getCurrentComparativeStrength() <
// resourceThreshold) {
Resource target = current.getTarget();
if (target == null) {
log.warn("target is null");
continue;
}
RelationIterator inverseIter = new InverseDirectRelationIterator(
target);
while (inverseIter.hasNext()) {
Relation currentInverse = inverseIter.nextRelation();
if (/*
* (current.getComparativeStrength() >
* resourceThreshold) ||
*/(!currentInverse.getSource().equals(resource) && (current
.getCurrentComparativeStrength() > otherThreshold))) {