Class BitVectorLabelParser

  • All Implemented Interfaces:
    elki.datasource.bundle.BundleStreamSource, Parser, StreamingParser

    @Title("Bit Vector Label Parser")
    @Description("Parses the following format of lines:\nA single line provides a single BitVector. Bits are separated by whitespace. Any substring not containing whitespace is tried to be read as Bit. If this fails, it will be appended to a label. (Thus, any label must not be parseable as Bit.) Empty lines and lines beginning with \"#\" will be ignored.")
    public class BitVectorLabelParser
    extends NumberVectorLabelParser<elki.data.BitVector>
    Parser for parsing one BitVector per line, bits separated by whitespace.

    Several labels may be given per BitVector. A label must not be parseable as Bit. Lines starting with "#" will be ignored.

    Since:
    0.1
    Author:
    Arthur Zimek
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        Class logger
      • buf

        it.unimi.dsi.fastutil.longs.LongArrayList buf
        Buffer, will be reused.
    • Constructor Detail

      • BitVectorLabelParser

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

      • parseLineInternal

        protected boolean parseLineInternal()
        Description copied from class: NumberVectorLabelParser
        Internal method for parsing a single line. Used by both line based parsing as well as block parsing. This saves the building of meta data for each line.
        Overrides:
        parseLineInternal in class NumberVectorLabelParser<elki.data.BitVector>
        Returns:
        true when a valid line was read, false on a label row.