}
// attraction
if (isAdjustSizes()) {
if (isOutboundAttractionDistribution()) {
for (Edge e : edges) {
Node nf = e.getSource();
Node nt = e.getTarget();
double bonus = (nf.getNodeData().isFixed() || nt.getNodeData().isFixed()) ? (100) : (1);
bonus *= getWeight(e);
ForceVectorUtils.fcBiAttractor_noCollide(nf.getNodeData(), nt.getNodeData(), bonus * getAttractionStrength() / (1 + graph.getDegree(nf)));
}
} else {
for (Edge e : edges) {
Node nf = e.getSource();
Node nt = e.getTarget();
double bonus = (nf.getNodeData().isFixed() || nt.getNodeData().isFixed()) ? (100) : (1);
bonus *= getWeight(e);
ForceVectorUtils.fcBiAttractor_noCollide(nf.getNodeData(), nt.getNodeData(), bonus * getAttractionStrength());
}
}
} else {
if (isOutboundAttractionDistribution()) {
for (Edge e : edges) {
Node nf = e.getSource();
Node nt = e.getTarget();
double bonus = (nf.getNodeData().isFixed() || nt.getNodeData().isFixed()) ? (100) : (1);
bonus *= getWeight(e);
ForceVectorUtils.fcBiAttractor(nf.getNodeData(), nt.getNodeData(), bonus * getAttractionStrength() / (1 + graph.getDegree(nf)));
}
} else {
for (Edge e : edges) {
Node nf = e.getSource();
Node nt = e.getTarget();
double bonus = (nf.getNodeData().isFixed() || nt.getNodeData().isFixed()) ? (100) : (1);
bonus *= getWeight(e);
ForceVectorUtils.fcBiAttractor(nf.getNodeData(), nt.getNodeData(), bonus * getAttractionStrength());
}
}
}
// gravity
for (Node n : nodes) {