Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General/improvement/outsourcedinterfaces #186

Merged
merged 182 commits into from Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
d056c7c
Adjusted jaicore-basic to api4.org
fmohr Jul 10, 2019
a8b2205
Adjusted the whole AILibs code base to the external interfaces
fmohr Jul 10, 2019
7bddb30
Refactored move of ML stuff to ai.ml
fmohr Jul 10, 2019
bca926a
Adjusted AILibs to current version of api4.org (except ai.ml)
fmohr Jul 11, 2019
a3d23b7
Added NumericDataset which stores each attribute value as a double.
mwever Jul 19, 2019
68da4a7
Removed goal tester from graph generator
fmohr Jul 19, 2019
e2adf8e
Removed SimpleInstances and related stuff, adjusted to api4.org
fmohr Jul 19, 2019
8835026
Made WekaInstance objects Clusterable (by default method of
fmohr Jul 23, 2019
7be3315
Repaired the RandomSearch, the RandomCompleter, and ML-Plan
fmohr Jul 24, 2019
1967672
Great refactoring with outsourced ml api.
mwever Aug 6, 2019
4a9e668
Further refactorings to adapt to the new interface project.
mwever Aug 31, 2019
c66d038
Updated AILibs to api4.org maven API
fmohr Sep 23, 2019
9335254
Moved AI problems from test in main folder
fmohr Sep 23, 2019
475cd22
Further refactorings to adapt to the new API
mwever Oct 7, 2019
a601518
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Oct 7, 2019
2fedce8
Moved some files.
mwever Oct 11, 2019
7d273fe
Adjusted jaicore-ml to the recent changes in api4.org
fmohr Oct 17, 2019
0180e0c
Adjusted MLPlan to work with new dataset structures and general learners
fmohr Oct 17, 2019
9fbe4b2
Cleanup up evaluator and filter packages
fmohr Oct 18, 2019
4386234
Refactoring of the dataset structure.
mwever Oct 21, 2019
178a4d9
Cleaned up my packages
fmohr Oct 21, 2019
442f70c
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Oct 22, 2019
9cf8434
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Oct 23, 2019
a8eecbb
Fixed issues in cache infrastructure for dataset loaders.
mwever Oct 23, 2019
dcbcd87
Fixed compile issues in samplers.
mwever Oct 24, 2019
fdf586b
Moved ArffUtilities for sampling to sampling package.
mwever Oct 24, 2019
05c6fe4
Moved test classes for dataset to correct location.
mwever Oct 24, 2019
68d0bd9
Started fixing timeseries package.
mwever Oct 25, 2019
26a0191
Fixed some compile issues in the time series datasets.
mwever Oct 25, 2019
e8ad817
import PCSBasedOptimizer
kadirayk Oct 25, 2019
88971fe
Clean PCSBasedOptimization from temporary files.
mwever Oct 25, 2019
118f3c4
Fixed some stuff.
mwever Oct 25, 2019
8e6e0cb
Refactored ranking measures.
mwever Oct 25, 2019
88ce2fd
Moved timeseries classification package to
mwever Oct 25, 2019
fd0fc7e
Resolving compile error in WekaUtil.
mwever Oct 25, 2019
d34b927
Removed obsolete tests.
mwever Oct 25, 2019
bdd9af6
Remove warnings in ARankingMeasure and NDCGLoss
Oct 28, 2019
f8a5e5a
Various changes in ranking package
Oct 28, 2019
c23dd00
Fix imports
Oct 28, 2019
15831b1
Fix imports
Oct 28, 2019
2874f3a
Fix imports of Dyad scalers
Oct 28, 2019
e1fada5
Fix import
Oct 28, 2019
24b8c53
Fix dyad ranking feature transforms
Oct 28, 2019
89077e3
Add initial version of DyadRankingDataset
Oct 28, 2019
35b87c0
Remove empty comment from ACollectionOfObjectsAttribute
Oct 28, 2019
9908c05
Fix errors in activelearning package for dyad ranking
Oct 28, 2019
8b3f2a7
Remove warning from ConfidenceIntervalClusteringBasedActiveDyadRanker
Oct 28, 2019
0475405
Fix problems in ADyadRankedNodeQueue
Oct 28, 2019
13dac6d
Add current state
Oct 28, 2019
39c8654
Fixed compile issues for source and tests for all but ranking.
mwever Oct 28, 2019
bcebf85
Moved weka related classes to jaicore-ml-weka.
mwever Oct 28, 2019
17958ac
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Oct 28, 2019
85bd84a
Replaced blind text "asd" by todo and UnsupportedOperationException.
mwever Oct 28, 2019
8d89442
Moved dyad ranking tests to the correct directory.
mwever Oct 28, 2019
3f0c4b8
Moved kendalls tau test to the right place.
mwever Oct 28, 2019
bd27030
Fixed some issues with the WekaInstances classes.
mwever Oct 29, 2019
2cffeb3
Resolved compile issues in WekaInstances and WekaInstance.
mwever Oct 29, 2019
569bdb9
Started to fix some tests for sampling algorithms.
mwever Oct 30, 2019
0020e9e
Imported "hyperopt" as a new sub-project.
mwever Oct 30, 2019
d323aca
Merge remote-tracking branch
mwever Oct 30, 2019
3db4a65
Removed SLC prediction class.
mwever Oct 30, 2019
0681eb5
Fixed a few compile issues in jaicore-ml-weka
mwever Oct 30, 2019
ddef6fa
Fixed compile issues for PCSBasedOptimizer
mwever Oct 31, 2019
5513089
Fixed compile issues in the runner.
mwever Oct 31, 2019
0ac055d
Split ML-Plan into several sub-projects
fmohr Nov 1, 2019
71b294e
adapted dependencies to renamed api4.org projects
fmohr Nov 1, 2019
1bf1e30
Fix errors in FeatureTransformPLDyadRanker and PLNetDyadRanker
Oct 29, 2019
c714d94
Fix DyadDatasetPoolProviderTest
Oct 29, 2019
e8a0366
Fix dependency in jaicore-math
Nov 4, 2019
f5dcf82
Fix tests in ranking package
Nov 4, 2019
7e9e9a7
Fix compile errors in jaicore-math
Nov 4, 2019
dfaec6e
Add implementation of SetOfObjectsAttribute
Nov 4, 2019
f2cf867
Fix dyad ranking JUnit tests
Nov 4, 2019
f092a54
Fix error in ISAC ranking package
Nov 4, 2019
3a6ee92
Several fixes to project structure and jaicore-ml.
mwever Nov 7, 2019
d572161
Moved things from MLplan to jaicore-ml and started repairing
fmohr Nov 21, 2019
c3112c2
Added several sanity/consistency checks in ML-Plan to detect ill configs
fmohr Nov 22, 2019
42b22aa
Fixed KVStoreSequentialComparator.
mwever Nov 25, 2019
2e7a4c6
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Nov 25, 2019
7bb5fa5
Made KVStoreCollection partitions public.
mwever Nov 25, 2019
b77d66b
Adapted code for removed generic in the IClassifier interface
fmohr Nov 25, 2019
5d8cc3b
Moved some classes within Jaicore-ML-WEKA
mwever Nov 25, 2019
911e828
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Nov 25, 2019
23ee363
Fixed majority classifier.
mwever Nov 25, 2019
9489099
Moving Weka dependent Implementations to JAICore-ML-WEKA.
mwever Nov 25, 2019
145c286
Removed ISingleLabelClassification interfaces ....
fmohr Nov 25, 2019
9d2033f
Repaired some dataset classes to enable full copies
fmohr Nov 25, 2019
390f6e7
Resolved compile error
fmohr Nov 25, 2019
60b6e66
Removed generic-related compile error from jaicore-ml
fmohr Nov 26, 2019
cfe59c8
Resolved all compile errors in jaicore-ml
fmohr Nov 26, 2019
90bdae1
Resolved compile errors in tests of mlplan-core
fmohr Nov 26, 2019
1a58c6f
Fixed build
mwever Nov 27, 2019
d0bd928
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Nov 27, 2019
59fee1e
Fixed compilee issues in the src dir of jaicore-ml-weka.
mwever Nov 28, 2019
7a809a0
Resolved compile issues in jaicore-ml and jaicore-ml-weka
fmohr Nov 28, 2019
c79f5b0
Went back to java 8.
mwever Nov 28, 2019
5581313
Moved hasco into hasco-core and fanova stuff into hasco-fanova
fmohr Nov 28, 2019
ce5ff15
Repaired samplings strategies, in particular OSMAC
fmohr Nov 28, 2019
ae34502
Resolved several test issues of samplers (but still many tests fail)
fmohr Nov 28, 2019
5866ecd
Resolved mistakes in DFS
fmohr Nov 29, 2019
c25b4e4
Resolved several problems that caused failing tests
fmohr Nov 29, 2019
66010bd
Added a experimenter database handle for connecting to the REST API of
mwever Dec 3, 2019
8855c8e
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Dec 3, 2019
f5581d9
Repaired sampling algorithms and increased their performance
fmohr Dec 4, 2019
5dba451
Resolved logging issues in HASCO and ML-Plan, and repaired mlplan-weka
fmohr Dec 4, 2019
1e91bd7
cleaned up ml-plan-weka and create visualization example
fmohr Dec 5, 2019
3442421
Tuned performance of ArffDatasetAdapter.
mwever Dec 5, 2019
660d933
Made datasets reconstructible (after OpenML-load or stratified split)
fmohr Dec 5, 2019
6b49d89
Fixed issues with dataset not reading anything anymore and junit tests.
mwever Dec 6, 2019
0411f7e
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Dec 6, 2019
dd4f7f5
Improved read performance of ArffDatasetAdapter.
mwever Dec 6, 2019
75769e5
Resolved WekaInstances issue and adjusted logging in examples
fmohr Dec 6, 2019
e8d6055
Switched travis to java11
fmohr Dec 6, 2019
064c8ae
Fixed issues with reading datasets from OpenML.
mwever Dec 6, 2019
69ffad6
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Dec 6, 2019
6609139
Fixed bug when parsing categorical attributes.
mwever Dec 6, 2019
5b268bf
Two major modifications
fmohr Dec 6, 2019
790fa52
Added reconstruction logic for sampling factories and weka-algorithms
fmohr Dec 9, 2019
c3c83dd
Added shuffle in the splitter so that the data-points are shuffled after
fmohr Dec 9, 2019
17d26b1
Resolved several bugs and inefficiencies around WekaClassifiers
fmohr Dec 11, 2019
973fd40
Resolved generic gradle compile issues
fmohr Dec 11, 2019
4109028
First steps towards making ML-Plan Meka run again.
mwever Dec 11, 2019
fff8df0
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Dec 11, 2019
377ee89
several build changes
fmohr Dec 11, 2019
ee2ab75
Cleaned up mlplan projects, removed compile errors from most of them
fmohr Dec 11, 2019
1b8e7f8
Fixed compile issues in MLPlanCLI.
mwever Dec 12, 2019
b5529c3
First steps towards getting ML2-Plan to run again.
mwever Dec 12, 2019
6718fab
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Dec 12, 2019
2a88ac2
Fixed issue with reading MNIST.
mwever Dec 12, 2019
b278a36
Fixed compile issues in MLPLanCLI
mwever Dec 12, 2019
33d3383
Fixes for reading more datasets.
mwever Dec 12, 2019
07be307
Added MekaClassifier, MultiLabelClassification and ~PredictionBatch.
mwever Dec 13, 2019
6f5d4fd
Moved MekaClassifier to jaicore-ml-meka.
mwever Dec 13, 2019
7d852c0
Adjusted multi-label interfaces
fmohr Dec 13, 2019
b08acf9
Merge branch 'general/improvement/outsourcedinterfaces' of
fmohr Dec 13, 2019
6a95b5f
Adjusted measure to allow for conversion from Object diff lists to
fmohr Dec 13, 2019
31e0939
adjusted latest changes from the API
fmohr Dec 13, 2019
e75aa67
Reorganized the classifier/regressor performance measures
fmohr Dec 13, 2019
dfc6c76
Added an artificial test for a heterogeneous prediction performance
fmohr Dec 13, 2019
b90d5c7
Moved package for cl losses into ai.libs.jaicore.ml.classification.loss
fmohr Dec 13, 2019
264609d
Added support for EvaluatorFactories in MLBuilders
fmohr Dec 13, 2019
1cf1626
Fixed compile issues in Multi-Label Measures.
mwever Dec 18, 2019
4798009
Fixed some issues with performance measures in the evaluator factory.
mwever Dec 18, 2019
1c11aca
Fixed all the compile issues in mlplan-sklearn and mlplan-meka.
mwever Dec 19, 2019
079bc59
Fixed compile issues in jaicore-ml and mlplan-cli
mwever Dec 19, 2019
7a6ff17
Fixed issue in Example within jaicore-ml-weka.
mwever Dec 19, 2019
609116a
Resolved all compile issues in hyperopt.
mwever Dec 19, 2019
e2240fa
Resolved remaining compile errors
fmohr Dec 19, 2019
19a7457
Removed generic from IMultiLabelClassificationMeasure
mwever Dec 19, 2019
e47340b
Removed generics again from evaluator factories.
mwever Dec 19, 2019
eb8c948
One more factory to remove generics from.
mwever Dec 19, 2019
7e1ad65
Added test that checks that ML-Plan uses the right data portions in
fmohr Dec 19, 2019
f70cd67
First tests and bug fixes for multi label measures.
mwever Dec 19, 2019
e5114ea
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
mwever Dec 19, 2019
958deea
Resolved some parsing errors and improved OpenMLReader tests (prmtrzd)
fmohr Dec 19, 2019
2f1eebd
Merge branch 'general/improvement/outsourcedinterfaces' of https://gi…
fmohr Dec 19, 2019
48b1cc0
Added yeast to the OpenML-reader test
fmohr Dec 19, 2019
5ac1986
Added test to check convertibility to WekaInstances and solved some bugs
fmohr Dec 19, 2019
ba2b6c9
Added several sophisticated tests for ML-Plan and datasets
fmohr Dec 20, 2019
78262b7
Fixed GUI Plugin displaying node evaluation information.
mwever Jan 7, 2020
950d296
Adapted most classes to updates in api4.org
fmohr Jan 9, 2020
5f50e24
Removed compile errors from JAICore
fmohr Jan 9, 2020
ed86c8a
Resolved all remaining compile errors
fmohr Jan 9, 2020
8adc85c
Merge remote-tracking branch 'origin/dev' into
fmohr Jan 9, 2020
7c4f6ed
Resolved bugs, vulnerabilities, and some code smells
fmohr Jan 10, 2020
e8163c3
Resolved a bunch of code smells
fmohr Jan 10, 2020
2a560ad
Fixed some code smells and added MLC loss based on OWA aggregator.
mwever Jan 10, 2020
598a624
Added examples for ML-Plan with sklearn
mwever Jan 10, 2020
98b50ba
Merge branch 'general/improvement/outsourcedinterfaces' of
mwever Jan 10, 2020
55773d3
Resolved issues due to renaming of TimeOut to Timeout.
mwever Jan 10, 2020
85f713d
Fixed issues in MekaInstances.
mwever Jan 10, 2020
121e4cd
Resolved several code smells
fmohr Jan 10, 2020
b969bff
Removed code smells
fmohr Jan 10, 2020
e05e767
Resolved code smells
fmohr Jan 10, 2020
7fd3de9
Resolved a coupled of code smells
fmohr Jan 10, 2020
93b0c45
Resolved several code smells, foremost in HASCO
fmohr Jan 10, 2020
c77078c
Removed further code smells and added some tests
fmohr Jan 10, 2020
fd999a1
Resolved build issues with test artifacts
fmohr Jan 10, 2020
41c2cec
Removed code smells in tests of hyperopt
fmohr Jan 10, 2020
4530bd3
Removed several code duplicates
fmohr Jan 10, 2020
6158bef
turned bug with "try" into a resource-try
fmohr Jan 10, 2020
90a5457
Resolved some test issues that blocked test execution
fmohr Jan 13, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: java
jdk:
- oraclejdk8
- oraclejdk11
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
Expand Down
159 changes: 81 additions & 78 deletions JAICore/jaicore-algorithminspector/build.gradle
@@ -1,79 +1,82 @@
plugins {
id 'java'
id 'eclipse'
//id 'org.openjfx.javafxplugin' version '0.0.5'
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
dependencies {
compile project(":JAICore:jaicore-basic")

compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.7'

implementation 'com.github.mwever:gs-core:2.0.2-synchrofix'
implementation 'com.github.graphstream:gs-ui-javafx:2.0-alpha'
implementation 'com.github.graphstream:gs-algo:2.0-alpha'

}
//javafx {
// modules = [ 'javafx.controls', 'javafx.swing', 'javafx.web' ]
//}
uploadArchives {
repositories {
mavenDeployer {
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : ""
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : ""

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'JAICore-Graphvisualizer'
packaging 'jar'
// optionally artifactId can be defined here
description 'Thist project provides a graphical interface for visualizing algorithms (especially search and AutoML algorithms) contained in AILibs.'
url 'https://libs.ai'

scm {
connection 'scm:git:https://github.com/fmohr/AILibs.git'
developerConnection 'scm:git:https://github.com/fmohr/AILibs.git'
url 'https://github.com/fmohr/AILibs'
}

licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}

developers {
developer {
id 'fmohr'
name 'Felix Mohr'
email 'felix.mohr@upb.de'
}
developer {
id 'mwever'
name 'Marcel Wever'
email 'marcel.wever@upb.de'
}
developer {
id 'ahetzer'
name 'Alexander Tornede'
email 'alexander.tornede@upb.de'
}
}
}
}
}
plugins {
id 'java'
id 'eclipse'
id 'org.openjfx.javafxplugin' version '0.0.5'
}

eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}

dependencies {
compile project(":JAICore:jaicore-basic")

compile("$jsonDatabind")

compile("$gsCore")
compile("$gsUIJavaFX")
compile("$gsAlgo")
}

javafx {
modules = [ 'javafx.controls', 'javafx.swing', 'javafx.web' ]
}

uploadArchives {
repositories {
mavenDeployer {
def ossrhUsername = project.hasProperty('ossrhUsername') ? project.property('ossrhUsername') : ""
def ossrhPassword = project.hasProperty('ossrhPassword') ? project.property('ossrhPassword') : ""

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}

pom.project {
name 'JAICore-Graphvisualizer'
packaging 'jar'
// optionally artifactId can be defined here
description 'Thist project provides a graphical interface for visualizing algorithms (especially search and AutoML algorithms) contained in AILibs.'
url 'https://libs.ai'

scm {
connection 'scm:git:https://github.com/fmohr/AILibs.git'
developerConnection 'scm:git:https://github.com/fmohr/AILibs.git'
url 'https://github.com/fmohr/AILibs'
}

licenses {
license {
name 'GPLv3'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}

developers {
developer {
id 'fmohr'
name 'Felix Mohr'
email 'felix.mohr@upb.de'
}
developer {
id 'mwever'
name 'Marcel Wever'
email 'marcel.wever@upb.de'
}
developer {
id 'ahetzer'
name 'Alexander Tornede'
email 'alexander.tornede@upb.de'
}
}
}
}
}
}
@@ -1,6 +1,6 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import org.api4.java.algorithm.events.IAlgorithmEvent;

public interface GraphEvent extends AlgorithmEvent {
public interface GraphEvent extends IAlgorithmEvent {
}
@@ -1,13 +1,15 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class GraphInitializedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private T root;

public GraphInitializedEvent(final String algorithmId, final T root) {
super(algorithmId);
public GraphInitializedEvent(final IAlgorithm<?, ?> algorithm, final T root) {
super(algorithm);
this.root = root;
}

Expand Down
@@ -1,15 +1,17 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeAddedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T parent;
private final T node;
private final String type;

public NodeAddedEvent(final String algorithmId, final T parent, final T node, final String type) {
super(algorithmId);
public NodeAddedEvent(final IAlgorithm<?, ?> algorithm, final T parent, final T node, final String type) {
super(algorithm);
this.parent = parent;
this.node = node;
this.type = type;
Expand Down
@@ -0,0 +1,20 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeInfoAlteredEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;

public NodeInfoAlteredEvent(final IAlgorithm<?, ?> algorithm, final T node) {
super(algorithm);
this.node = node;
}

public T getNode() {
return this.node;
}

}
@@ -1,14 +1,16 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeParentSwitchEvent<T> extends AAlgorithmEvent implements GraphEvent {
private final T node;
private final T oldParent;
private final T newParent;

public NodeParentSwitchEvent(final String algorithmEvent, final T node, final T oldParent, final T newParent) {
super(algorithmEvent);
public NodeParentSwitchEvent(final IAlgorithm<?, ?> algorithm, final T node, final T oldParent, final T newParent) {
super(algorithm);
this.node = node;
this.oldParent = oldParent;
this.newParent = newParent;
Expand Down
@@ -1,13 +1,15 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeRemovedEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;

public NodeRemovedEvent(final String algorithmId, final T node) {
super(algorithmId);
public NodeRemovedEvent(final IAlgorithm<?, ?> algorithm, final T node) {
super(algorithm);
this.node = node;
}

Expand Down
@@ -1,14 +1,16 @@
package ai.libs.jaicore.graphvisualizer.events.graph;

import ai.libs.jaicore.basic.algorithm.events.AAlgorithmEvent;
import org.api4.java.algorithm.IAlgorithm;

import ai.libs.jaicore.basic.algorithm.AAlgorithmEvent;

public class NodeTypeSwitchEvent<T> extends AAlgorithmEvent implements GraphEvent {

private final T node;
private final String type;

public NodeTypeSwitchEvent(final String algorithmId, final T node, final String type) {
super(algorithmId);
public NodeTypeSwitchEvent(final IAlgorithm<?, ?> algorithm, final T node, final String type) {
super(algorithm);
this.node = node;
this.type = type;
}
Expand Down
@@ -1,9 +1,9 @@
package ai.libs.jaicore.graphvisualizer.events.graph.bus;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import org.api4.java.algorithm.events.IAlgorithmEvent;

public interface AlgorithmEventBus extends AlgorithmEventSource {

public void postEvent(AlgorithmEvent algorithmEvent);
public void postEvent(IAlgorithmEvent algorithmEvent);

}
@@ -1,11 +1,11 @@
package ai.libs.jaicore.graphvisualizer.events.graph.bus;

import com.google.common.eventbus.Subscribe;
import org.api4.java.algorithm.events.IAlgorithmEvent;

import ai.libs.jaicore.basic.algorithm.events.AlgorithmEvent;
import com.google.common.eventbus.Subscribe;

public interface AlgorithmEventListener {

@Subscribe
public void handleAlgorithmEvent(AlgorithmEvent algorithmEvent) throws HandleAlgorithmEventException;
public void handleAlgorithmEvent(IAlgorithmEvent algorithmEvent) throws HandleAlgorithmEventException;
}