Package elki.result

Class ClusteringVectorDumper

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ClusteringVectorDumper.Par
      Parameterization class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean append
      Always append to the output file.
      private java.lang.String forceLabel
      Optional label to force for this output.
      private static Logging LOG
      Class logger.
      private java.nio.file.Path outputFile
      Output file.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClusteringVectorDumper​(java.nio.file.Path outputFile, boolean append)
      Constructor.
      ClusteringVectorDumper​(java.nio.file.Path outputFile, boolean append, java.lang.String forceLabel)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void dumpClusteringOutput​(java.lang.Appendable writer, Clustering<?> c)
      Dump a single clustering result.
      void processNewResult​(java.lang.Object newResult)
      Process a result.
      • 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.
      • outputFile

        private java.nio.file.Path outputFile
        Output file.
      • forceLabel

        private java.lang.String forceLabel
        Optional label to force for this output.
      • append

        private boolean append
        Always append to the output file.
    • Constructor Detail

      • ClusteringVectorDumper

        public ClusteringVectorDumper​(java.nio.file.Path outputFile,
                                      boolean append,
                                      java.lang.String forceLabel)
        Constructor.
        Parameters:
        outputFile - Output file
        append - Append to output file (overwrite otherwise).
        forceLabel - Forced label to use for the output, may be null.
      • ClusteringVectorDumper

        public ClusteringVectorDumper​(java.nio.file.Path outputFile,
                                      boolean append)
        Constructor.
        Parameters:
        outputFile - Output file
        append - Append to output file (overwrite otherwise).
    • 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.
      • dumpClusteringOutput

        protected void dumpClusteringOutput​(java.lang.Appendable writer,
                                            Clustering<?> c)
                                     throws java.io.IOException
        Dump a single clustering result.
        Parameters:
        writer - Output writer
        c - Clustering result
        Throws:
        java.io.IOException