Package elki.result

Class LogResultStructureResultHandler

  • All Implemented Interfaces:
    ResultHandler, ResultProcessor

    @Description("Development result handler that merely logs the structure of the result tree.")
    public class LogResultStructureResultHandler
    extends java.lang.Object
    implements ResultHandler
    A result handler to help with ELKI development that will just show the structure of the result object. This class is mostly useful when you are implementing your own result handlers or evaluators, as it will print a simple representation of the result tree. For using this, make sure to set the logging level appropriately by using -verbose. TODO: transform this into an evaluator, then visualize, too?
    Since:
    0.5.5
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Logging LOG
      Class logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void processNewResult​(java.lang.Object newResult)
      Process a result.
      private void recursiveLogResult​(java.lang.StringBuilder buf, java.lang.Object result, int depth)
      Recursively walk through the result tree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final Logging LOG
        Class logger
    • Constructor Detail

      • LogResultStructureResultHandler

        public LogResultStructureResultHandler()
    • Method Detail

      • processNewResult

        public void processNewResult​(java.lang.Object newResult)
        Description copied from interface: ResultProcessor
        Process a result.
        Specified by:
        processNewResult in interface ResultProcessor
        Parameters:
        newResult - Newly added result subtree.
      • recursiveLogResult

        private void recursiveLogResult​(java.lang.StringBuilder buf,
                                        java.lang.Object result,
                                        int depth)
        Recursively walk through the result tree.
        Parameters:
        buf - Output buffer
        result - Current result
        depth - Depth