Class AsciiDistanceParser

  • All Implemented Interfaces:
    DistanceParser

    public class AsciiDistanceParser
    extends java.lang.Object
    implements DistanceParser
    Parser for parsing one distance value per line.

    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.

    Since:
    0.1
    Author:
    Elke Achtert, Erich Schubert
    • Field Detail

      • LOG

        private static final Logging LOG
        The logger for this class.
      • tokenizer

        protected Tokenizer tokenizer
        Tokenizer.
    • Constructor Detail

      • AsciiDistanceParser

        public AsciiDistanceParser​(CSVReaderFormat format)
        Constructor.
        Parameters:
        format - Input format
    • Method Detail

      • parse

        public void parse​(java.io.InputStream in,
                          DistanceParser.DistanceCacheWriter cache)
        Description copied from interface: DistanceParser
        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 DistanceParser
        Parameters:
        in - the stream to parse objects from
        cache - Cache writer