de.lmu.ifi.dbs.elki.parser
Class SparseBitVectorLabelParser
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.parser.AbstractParser<BitVector>
de.lmu.ifi.dbs.elki.parser.SparseBitVectorLabelParser
- All Implemented Interfaces:
- 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
Constructor Summary |
SparseBitVectorLabelParser()
Provides a parser for parsing one sparse BitVector per line,
where the indices of the one-bits are separated by whitespace. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, setParameters |
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.
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.
shortDescription
public String shortDescription()
- Description copied from class:
AbstractParameterizable
- Returns a short description of the class.
- Specified by:
shortDescription
in interface Parameterizable
- Overrides:
shortDescription
in class AbstractParameterizable
- Returns:
- Description of the class