de.lmu.ifi.dbs.elki.parser
Class ParameterizationFunctionLabelParser
java.lang.Object
de.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.parser.AbstractParser<ParameterizationFunction>
de.lmu.ifi.dbs.elki.parser.ParameterizationFunctionLabelParser
- All Implemented Interfaces:
- Parser<ParameterizationFunction>, Parameterizable
@Title(value="Parameterization Function Label Parser")
@Description(value="Parser for the following line format:\nA single line provides a single point. Attributes are separated by whitespace. The real values will be parsed as as doubles. Any substring not containing whitespace is tried to be read as double. If this fails, it will be appended to a label. (Thus, any label must not be parseable as double.) Empty lines and lines beginning with \"#\" will be ignored. If any point differs in its dimensionality from other points, the parse method will fail with an Exception.")
public class ParameterizationFunctionLabelParser
- extends AbstractParser<ParameterizationFunction>
- implements Parameterizable
Provides a parser for parsing one point per line, attributes separated by
whitespace. The parser transforms each point into a parametrization function.
Several labels may be given per point. A label must not be parseable as
double (or float). Lines starting with "#" will be ignored.
- Author:
- Arthur Zimek
ParameterizationFunctionLabelParser
public ParameterizationFunctionLabelParser()
- Provides a parser for parsing one point per line, attributes separated by
whitespace. The parser transforms each point into a parametrization
function. Several labels may be given per point. A label must not be
parseable as double (or float). Lines starting with "#" will be
ignored.
parse
public ParsingResult<ParameterizationFunction> 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<ParameterizationFunction>
- Parameters:
in
- the stream to parse objects from
- Returns:
- a list containing those objects parsed
from the input stream and their associated labels.