de.lmu.ifi.dbs.elki.datasource.parser
Class BitVectorLabelParser
java.lang.Object
de.lmu.ifi.dbs.elki.datasource.parser.AbstractParser
de.lmu.ifi.dbs.elki.datasource.parser.BitVectorLabelParser
- All Implemented Interfaces:
- Parser, InspectionUtilFrequentlyScanned, 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
- implements Parser
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.
logger
private static final Logging logger
- Class logger
BitVectorLabelParser
public BitVectorLabelParser(Pattern colSep,
char quoteChar)
- Constructor.
- Parameters:
colSep
- quoteChar
-
parse
public MultipleObjectsBundle parse(InputStream in)
- Description copied from interface:
Parser
- Returns a list of the objects parsed from the specified input stream.
- Specified by:
parse
in interface Parser
- Parameters:
in
- the stream to parse objects from
- Returns:
- a list containing those objects parsed from the input stream
getTypeInformation
protected VectorFieldTypeInformation<BitVector> getTypeInformation(int dimensionality)
getLogger
protected Logging getLogger()
- Description copied from class:
AbstractParser
- Get the logger for this class.
- Specified by:
getLogger
in class AbstractParser
- Returns:
- Logger.