node.getNodeData().setB(b);
}
}
private Node[] getDiffusedNodes(Node[] input) {
GraphModel model = Lookup.getDefault().lookup(GraphController.class).getModel();
switch (diffusionMethod) {
case NEIGHBORS:
return DiffusionMethods.getNeighbors(model.getGraphVisible(), input);
case NEIGHBORS_OF_NEIGHBORS:
return DiffusionMethods.getNeighborsOfNeighbors(model.getGraphVisible(), input);
case PREDECESSORS:
if (model.isDirected()) {
return DiffusionMethods.getPredecessors(model.getDirectedGraphVisible(), input);
} else {
return DiffusionMethods.getNeighbors(model.getGraphVisible(), input);
}
case SUCCESSORS:
if (model.isDirected()) {
return DiffusionMethods.getSuccessors(model.getDirectedGraphVisible(), input);
} else {
return DiffusionMethods.getNeighbors(model.getGraphVisible(), input);
}
}
return new Node[0];
}