public class AlgorithmVisualizationWindow
extends java.lang.Object
implements java.lang.Runnable
AlgorithmVisualizationWindow can be created to have a visualization of the behavior of an algorithm. We generally differentiate between a live version of an IAlgorithm run for which an instance of that algorithm and a
list of AlgorithmEventPropertyComputers is required and an offline run, for which only an AlgorithmEventHistory is required. In the first case, the property computers are used to extract relevant information which is
required by the IGUIPlugins (to be displayed) from the underlying AlgorithmEvents which are provided by the actual algorithm. When playing a recording, these computers are not required as the data was already computed as
is stored as part of the replay in the AlgorithmEventHistory. Furthermore it requires a main IGUIPlugin which will
be displayed as the main element and optionally an unbounded amount of additional IGUIPlugin which will be displayed in order to provide additional information.| Constructor and Description |
|---|
AlgorithmVisualizationWindow(AlgorithmEventHistory algorithmEventHistory,
IGUIPlugin mainPlugin,
IGUIPlugin... visualizationPlugins)
Creates a new
AlgorithmVisualizationWindow based on the given AlgorithmEventHistory (i.e. offline version), the main IGUIPlugin and optionally additional plugins. |
AlgorithmVisualizationWindow(ai.libs.jaicore.basic.algorithm.IAlgorithm<?,?> algorithm,
java.util.List<AlgorithmEventPropertyComputer> algorithmEventPropertyComputers,
IGUIPlugin mainPlugin,
IGUIPlugin... visualizationPlugins)
Creates a new
AlgorithmVisualizationWindow based on the given IAlgorithm, the list of AlgorithmEventPropertyComputers, a main IGUIPlugin and optionally additional plugins. |
| Modifier and Type | Method and Description |
|---|---|
AlgorithmEventHistory |
getAlgorithmEventHistory()
Returns the underlying
AlgorithmEventHistory. |
void |
run() |
void |
setTitle(java.lang.String title)
Sets the title of this window to the given
String. |
public AlgorithmVisualizationWindow(AlgorithmEventHistory algorithmEventHistory, IGUIPlugin mainPlugin, IGUIPlugin... visualizationPlugins)
AlgorithmVisualizationWindow based on the given AlgorithmEventHistory (i.e. offline version), the main IGUIPlugin and optionally additional plugins.algorithmEventHistory - The AlgorithmEventHistory providing data to be displayed.mainPlugin - The main IGUIPlugin which will be displayed as the main information source.visualizationPlugins - A list of additional IGUIPlugins displaying side information.public AlgorithmVisualizationWindow(ai.libs.jaicore.basic.algorithm.IAlgorithm<?,?> algorithm,
java.util.List<AlgorithmEventPropertyComputer> algorithmEventPropertyComputers,
IGUIPlugin mainPlugin,
IGUIPlugin... visualizationPlugins)
AlgorithmVisualizationWindow based on the given IAlgorithm, the list of AlgorithmEventPropertyComputers, a main IGUIPlugin and optionally additional plugins. This constructor should be
used when using a visualization in an online run.algorithm - The IAlgorithm yielding information to be displayed.algorithmEventPropertyComputers - The AlgorithmEventPropertyComputers computing all information from the AlgorithmEvents provided by the IAlgorithm which are required by the IGUIPlugins which are
registered.mainPlugin - The main IGUIPlugin which will be displayed as the main information source.visualizationPlugins - A list of additional IGUIPlugins displaying side information.public void run()
run in interface java.lang.Runnablepublic void setTitle(java.lang.String title)
String.title - The new title of this window.public AlgorithmEventHistory getAlgorithmEventHistory()
AlgorithmEventHistory.AlgorithmEventHistory.