Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

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

@Title(value="Bit Vector Label Parser")
@Description(value="Parses the following format of lines:\nA single line provides a single BitVector. Bits are separated by whitespace. Any substring not containing whitespace is tried to be read as Bit. If this fails, it will be appended to a label. (Thus, any label must not be parseable as Bit.) Empty lines and lines beginning with \"#\" will be ignored. If any BitVector differs in its dimensionality from other BitVectors, the parse method will fail with an Exception.")
public class BitVectorLabelParser
extends AbstractParser<BitVector>
implements Parameterizable

Provides a parser for parsing one BitVector per line, bits separated by whitespace.

Several labels may be given per BitVector. A label must not be parseable as Bit. Lines starting with "#" will be ignored.

Author:
Arthur Zimek

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.logging.AbstractLoggable
debug, logger
 
Constructor Summary
BitVectorLabelParser()
          Provides a parser for parsing one BitVector per line, bits separated by whitespace.
 
Method Summary
 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
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitVectorLabelParser

public BitVectorLabelParser()
Provides a parser for parsing one BitVector per line, bits separated by whitespace.

Several labels may be given per BitVector. A label must not be parseable as Bit. 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.

Specified by:
parse in interface Parser<BitVector>
Parameters:
in - the stream to parse objects from
Returns:
a list containing those objects parsed from the input stream and their associated labels.

Release 0.3 (2010-03-31_1612)