@Title(value="Number Distance Parser") @Description(value="Parser for the following line format:\nid1 id2 distanceValue, where id1 and is2 are integers starting at 0 representing the two ids belonging to the distance value.\nThe ids and the distance value are separated by whitespace. Empty lines and lines beginning with \"#\" will be ignored.") @Alias(value={"de.lmu.ifi.dbs.elki.datasource.parser.NumberDistanceParser","de.lmu.ifi.dbs.elki.distance.distancefunction.external.NumberDistanceParser","de.lmu.ifi.dbs.elki.parser.NumberDistanceParser"}) public class AsciiDistanceParser extends Object implements DistanceParser
id1 id2 distanceValue
, where
id1 and id2 are integers starting at 0 representing the two ids belonging to
the distance value. Lines starting with "#" will be ignored.Modifier and Type | Class and Description |
---|---|
static class |
AsciiDistanceParser.Parameterizer
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
The logger for this class.
|
protected TokenizedReader |
reader
Tokenized reader.
|
protected Tokenizer |
tokenizer
Tokenizer.
|
Constructor and Description |
---|
AsciiDistanceParser(CSVReaderFormat format)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
parse(InputStream in,
DistanceCacheWriter cache)
Returns a list of the objects parsed from the specified input stream and a
list of the labels associated with the objects.
|
private static final Logging LOG
protected TokenizedReader reader
protected Tokenizer tokenizer
public AsciiDistanceParser(CSVReaderFormat format)
format
- Input formatpublic void parse(InputStream in, DistanceCacheWriter cache)
DistanceParser
parse
in interface DistanceParser
in
- the stream to parse objects fromcache
- Cache writerCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.