Update code.

This commit is contained in:
Mikael Capelle
2018-02-20 11:27:12 +01:00
parent a6e8a22081
commit 71accfe13b
18 changed files with 436 additions and 266 deletions

View File

@@ -2,37 +2,29 @@ package org.insa.algo.weakconnectivity;
import java.util.ArrayList;
import org.insa.algo.AbstractObserver;
import org.insa.graph.Node;
public abstract class WeaklyConnectedComponentObserver extends AbstractObserver {
public interface WeaklyConnectedComponentObserver {
/**
* {@inheritDoc}
*/
protected WeaklyConnectedComponentObserver(boolean isGraphic) {
super(isGraphic);
}
/**
* Notify that the algorithm is entering a new component.
*
* @param curNode Starting node for the component.
*/
public abstract void notifyStartComponent(Node curNode);
public void notifyStartComponent(Node curNode);
/**
* Notify that a new node has been found for the current component.
*
* @param node New node found for the current component.
*/
public abstract void notifyNewNodeInComponent(Node node);
public void notifyNewNodeInComponent(Node node);
/**
* Notify that the algorithm has computed a new component.
*
* @param nodes List of nodes in the component.
*/
public abstract void notifyEndComponent(ArrayList<Node> nodes);
public void notifyEndComponent(ArrayList<Node> nodes);
}