@@ -0,0 +1,1988 @@
+package tutorial.outlier;%0A%0A/*%0A This file is part of ELKI:%0A Environment for Developing KDD-Applications Supported by Index-Structures%0A%0A Copyright (C) 2013%0A Ludwig-Maximilians-Universit%C3%A4t M%C3%BCnchen%0A Lehr- und Forschungseinheit f%C3%BCr Datenbanksysteme%0A ELKI Development Team%0A%0A This program is free software: you can redistribute it and/or modify%0A it under the terms of the GNU Affero General Public License as published by%0A the Free Software Foundation, either version 3 of the License, or%0A (at your option) any later version.%0A%0A This program is distributed in the hope that it will be useful,%0A but WITHOUT ANY WARRANTY; without even the implied warranty of%0A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A GNU Affero General Public License for more details.%0A%0A You should have received a copy of the GNU Affero General Public License%0A along with this program.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Aimport java.util.ArrayList;%0A%0Aimport de.lmu.ifi.dbs.elki.database.ids.DBIDIter;%0Aimport de.lmu.ifi.dbs.elki.database.ids.DBIDUtil;%0Aimport de.lmu.ifi.dbs.elki.database.relation.Relation;%0Aimport de.lmu.ifi.dbs.elki.result.HierarchicalResult;%0Aimport de.lmu.ifi.dbs.elki.result.Result;%0Aimport de.lmu.ifi.dbs.elki.result.ResultHandler;%0Aimport de.lmu.ifi.dbs.elki.result.ResultUtil;%0Aimport de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;%0A%0A/**%0A * Simple example output handler for processing outlier scores.%0A * %0A * @author Erich Schubert%0A */%0Apublic class SimpleScoreDumper implements ResultHandler %7B%0A  @Override%0A  public void processNewResult(HierarchicalResult baseResult, Result newResult) %7B%0A    // Get all new outlier results%0A    ArrayList%3COutlierResult%3E ors = ResultUtil.filterResults(newResult, OutlierResult.class);%0A    for (OutlierResult o : ors) %7B%0A      Relation%3CDouble%3E scores = o.getScores();%0A      for (DBIDIter iter = scores.iterDBIDs(); iter.valid(); iter.advance()) %7B%0A        System.out.println(DBIDUtil.toString(iter) + %22 %22 + scores.get(iter));%0A      %7D%0A    %7D%0A  %7D%0A%7D%0A

Add simple output handler.