Exceptions.printStackTrace(ex);
}
}
// Attraction
AttractionForce Attraction = ForceFactory.builder.buildAttraction(isLinLogMode(), isOutboundAttractionDistribution(), isAdjustSizes(), 1 * ((isOutboundAttractionDistribution()) ? (outboundAttCompensation) : (1)));
if (getEdgeWeightInfluence() == 0) {
for (Edge e : edges) {
Attraction.apply(e.getSource(), e.getTarget(), 1);
}
} else if (getEdgeWeightInfluence() == 1) {
for (Edge e : edges) {
Attraction.apply(e.getSource(), e.getTarget(), e.getWeight());
}
} else {
for (Edge e : edges) {
Attraction.apply(e.getSource(), e.getTarget(), Math.pow(e.getWeight(), getEdgeWeightInfluence()));
}
}
// Auto adjust speed
double totalSwinging = 0d; // How much irregular movement