Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.parser
Class SparseBitVectorLabelParser

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.parser.AbstractParser<BitVector>
              extended by de.lmu.ifi.dbs.elki.parser.SparseBitVectorLabelParser
All Implemented Interfaces:
Loggable, Parser<BitVector>, Parameterizable

public class SparseBitVectorLabelParser
extends AbstractParser<BitVector>

Provides a parser for parsing one sparse BitVector per line, where the indices of the one-bits are separated by whitespace. The first index starts with zero.

Several labels may be given per BitVector, a label must not be parseable as an Integer. Lines starting with "#" will be ignored.

Author:
Elke Achtert

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.parser.AbstractParser
ATTRIBUTE_CONCATENATION, COMMENT, WHITESPACE_PATTERN
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
optionHandler
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug
 
Constructor Summary
SparseBitVectorLabelParser()
          Provides a parser for parsing one sparse BitVector per line, where the indices of the one-bits are separated by whitespace.
 
Method Summary
 String description()
          Returns a description of the class and the required parameters.
 ParsingResult<BitVector> parse(InputStream in)
          Returns a list of the objects parsed from the specified input stream and a list of the labels associated with the objects.
 
Methods inherited from class de.lmu.ifi.dbs.elki.parser.AbstractParser
toString, usage
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
addOption, checkGlobalParameterConstraints, deleteOption, description, description, getAttributeSettings, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters, setParameters
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getAttributeSettings, getParameters, getPossibleOptions, inlineDescription, setParameters
 

Constructor Detail

SparseBitVectorLabelParser

public SparseBitVectorLabelParser()
Provides a parser for parsing one sparse BitVector per line, where the indices of the one-bits are separated by whitespace.

Several labels may be given per BitVector, a label must not be parseable as an Integer. Lines starting with "#" will be ignored.

Method Detail

parse

public ParsingResult<BitVector> parse(InputStream in)
Description copied from interface: Parser
Returns a list of the objects parsed from the specified input stream and a list of the labels associated with the objects.

Parameters:
in - the stream to parse objects from
Returns:
a list containing those objects parsed from the input stream and their associated labels.
See Also:
Parser.parse(java.io.InputStream)

description

public String description()
Description copied from interface: Parameterizable
Returns a description of the class and the required parameters.

This description should be suitable for a usage description as for a standalone application.

Specified by:
description in interface Parameterizable
Overrides:
description in class AbstractParameterizable
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

Release 0.1 (2008-07-10_1838)