use of mtree.MTree in project iobserve-analysis by research-iobserve.
the class TestHelper method generateMTree.
public static MTree<OpticsData> generateMTree(final List<OpticsData> models) {
final GraphEditDistance ged = new GraphEditDistance();
final MTree<OpticsData> mtree = new MTree<>(20, 40, OpticsData.getDistanceFunction(), null);
for (final OpticsData model : models) {
mtree.add(model);
}
return mtree;
}
use of mtree.MTree in project iobserve-analysis by research-iobserve.
the class OpticsStageTest method runClusterStage.
public static List<OpticsData> runClusterStage(final List<OpticsData> models, final MTree<OpticsData> mTree) {
// prepare input
final List<List<OpticsData>> modelsInputList = new ArrayList<>();
modelsInputList.add(models);
// prepare input
final List<MTree<OpticsData>> mTreeInputList = new ArrayList<>();
mTreeInputList.add(mTree);
// these are the clustering arguments
final OpticsStage optics = new OpticsStage(0, 4);
final List<List<OpticsData>> solutions = new ArrayList<>();
StageTester.test(optics).and().send(modelsInputList).to(optics.getModelsInputPort()).and().send(mTreeInputList).to(optics.getmTreeInputPort()).and().receive(solutions).from(optics.getOutputPort()).start();
return solutions.get(0);
}
Aggregations