Package elki.result
Class ClusteringVectorDumper
- java.lang.Object
-
- elki.result.ClusteringVectorDumper
-
- All Implemented Interfaces:
elki.result.ResultHandler,elki.result.ResultProcessor
public class ClusteringVectorDumper extends java.lang.Object implements elki.result.ResultHandlerOutput a clustering result in a simple and compact ascii format: whitespace separated cluster indexesThis format can be read using
ClusteringVectorParserfor meta analysis, or read as clustering usingExternalClustering.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClusteringVectorDumper.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description private booleanappendAlways append to the output file.private java.lang.StringforceLabelOptional label to force for this output.private static elki.logging.LoggingLOGClass logger.private java.nio.file.PathoutputFileOutput 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 voiddumpClusteringOutput(java.lang.Appendable writer, Clustering<?> c)Dump a single clustering result.voidprocessNewResult(java.lang.Object newResult)
-
-
-
Constructor Detail
-
ClusteringVectorDumper
public ClusteringVectorDumper(java.nio.file.Path outputFile, boolean append, java.lang.String forceLabel)Constructor.- Parameters:
outputFile- Output fileappend- Append to output file (overwrite otherwise).forceLabel- Forced label to use for the output, may benull.
-
ClusteringVectorDumper
public ClusteringVectorDumper(java.nio.file.Path outputFile, boolean append)Constructor.- Parameters:
outputFile- Output fileappend- Append to output file (overwrite otherwise).
-
-
Method Detail
-
processNewResult
public void processNewResult(java.lang.Object newResult)
- Specified by:
processNewResultin interfaceelki.result.ResultProcessor
-
dumpClusteringOutput
protected void dumpClusteringOutput(java.lang.Appendable writer, Clustering<?> c) throws java.io.IOExceptionDump a single clustering result.- Parameters:
writer- Output writerc- Clustering result- Throws:
java.io.IOException
-
-