summaryrefslogtreecommitdiff
path: root/src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java')
-rw-r--r--src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java97
1 files changed, 0 insertions, 97 deletions
diff --git a/src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java b/src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java
deleted file mode 100644
index 87efbf55..00000000
--- a/src/de/lmu/ifi/dbs/elki/datasource/parser/SparseFloatVectorLabelParser.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package de.lmu.ifi.dbs.elki.datasource.parser;
-
-/*
- This file is part of ELKI:
- Environment for Developing KDD-Applications Supported by Index-Structures
-
- Copyright (C) 2012
- Ludwig-Maximilians-Universität München
- Lehr- und Forschungseinheit für Datenbanksysteme
- ELKI Development Team
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import java.util.BitSet;
-import java.util.regex.Pattern;
-
-import de.lmu.ifi.dbs.elki.data.SparseFloatVector;
-import de.lmu.ifi.dbs.elki.utilities.documentation.Description;
-import de.lmu.ifi.dbs.elki.utilities.documentation.Title;
-
-/**
- * <p>
- * Provides a parser for parsing one point per line, attributes separated by
- * whitespace.
- * </p>
- * <p>
- * Several labels may be given per point. A label must not be parseable as
- * double. Lines starting with &quot;#&quot; will be ignored.
- * </p>
- * <p>
- * A line is expected in the following format: The first entry of each line is
- * the number of attributes with coordinate value not zero. Subsequent entries
- * are of the form <code>index value </code> each, where index is the number of
- * the corresponding dimension, and value is the value of the corresponding
- * attribute. A complet line then could look like this:
- *
- * <pre>
- * 3 7 12.34 8 56.78 11 1.234 objectlabel
- * </pre>
- *
- * where <code>3</code> indicates there are three attributes set,
- * <code>7,8,11</code> are the attributes indexes and there is a non-numerical
- * object label.
- * </p>
- * <p>
- * An index can be specified to identify an entry to be treated as class label.
- * This index counts all entries (numeric and labels as well) starting with 0.
- * </p>
- *
- * @author Arthur Zimek
- *
- * @apiviz.has SparseFloatVector
- *
- * @deprecated Use {@link SparseNumberVectorLabelParser} instead!
- */
-@Title("Sparse Float Vector Label Parser")
-@Description("Parser for the following line format:\n" + "A single line provides a single point. Entries are separated by whitespace. " + "The values will be parsed as floats (resulting in a set of SparseFloatVectors). A line is expected in the following format: The first entry of each line is the number of attributes with coordinate value not zero. Subsequent entries are of the form (index, value), where index is the number of the corresponding dimension, and value is the value of the corresponding attribute." + "Any pair of two subsequent substrings not containing whitespace is tried to be read as int and float. If this fails for the first of the pair (interpreted ans index), it will be appended to a label. (Thus, any label must not be parseable as Integer.) If the float component is not parseable, an exception will be thrown. Empty lines and lines beginning with \"#\" will be ignored.")
-@Deprecated
-public class SparseFloatVectorLabelParser extends SparseNumberVectorLabelParser<SparseFloatVector> {
- /**
- * Constructor.
- *
- * @param colSep Column separator
- * @param quoteChars Quotation character
- * @param comment Comment pattern
- * @param labelIndices Indices to use as labels
- */
- public SparseFloatVectorLabelParser(Pattern colSep, String quoteChars, Pattern comment, BitSet labelIndices) {
- super(colSep, quoteChars, comment, labelIndices, SparseFloatVector.FACTORY);
- }
-
- /**
- * Parameterization class.
- *
- * @author Erich Schubert
- *
- * @apiviz.exclude
- */
- public static class Parameterizer extends SparseNumberVectorLabelParser.Parameterizer<SparseFloatVector> {
- @Override
- protected SparseFloatVectorLabelParser makeInstance() {
- return new SparseFloatVectorLabelParser(colSep, quoteChars, comment, labelIndices);
- }
- }
-} \ No newline at end of file