@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 java.lang.Object implements DistanceParser
A line must have the following format: 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(java.io.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(java.io.InputStream in, DistanceCacheWriter cache)
DistanceParser
parse
in interface DistanceParser
in
- the stream to parse objects fromcache
- Cache writerCopyright © 2019 ELKI Development Team. License information.