Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.parser.meta
Class ProjectionParser<V extends NumberVector<V,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.parser.meta.MetaParser<V>
          extended by de.lmu.ifi.dbs.elki.parser.meta.ProjectionParser<V>
Type Parameters:
V - the type of NumberVector contained in both the ParsingResult of the base parser and the projected ParsingResult of this ProjectionParser
All Implemented Interfaces:
Parser<V>, Parameterizable
Direct Known Subclasses:
DoubleVectorProjectionParser, SparseFloatVectorProjectionParser

public abstract class ProjectionParser<V extends NumberVector<V,?>>
extends MetaParser<V>

A ProjectionParser projects the ParsingResult of its base parser onto a subspace specified by a BitSet.

Author:
Arthur Zimek

Field Summary
static OptionID SELECTED_ATTRIBUTES_ID
          ID for the parameter SELECTED_ATTRIBUTES_PARAM.
private  IntListParameter SELECTED_ATTRIBUTES_PARAM
           Selected attributes parameter.
private  BitSet selectedAttributes
          Keeps the selection of the subspace to project onto.
 
Fields inherited from class de.lmu.ifi.dbs.elki.parser.meta.MetaParser
BASEPARSER_ID
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
ProjectionParser(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 BitSet getSelectedAttributes()
           Provides a BitSet with the bits set to true corresponding to the selected attributes in SELECTED_ATTRIBUTES_PARAM.
 void setSelectedAttributes(BitSet selectedAttributes)
           Sets the bits set to true in the given BitSet as selected attributes in SELECTED_ATTRIBUTES_PARAM.
 
Methods inherited from class de.lmu.ifi.dbs.elki.parser.meta.MetaParser
retrieveBaseParsingresult, toString
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.parser.Parser
parse
 

Field Detail

selectedAttributes

private BitSet selectedAttributes
Keeps the selection of the subspace to project onto.


SELECTED_ATTRIBUTES_ID

public static final OptionID SELECTED_ATTRIBUTES_ID
ID for the parameter SELECTED_ATTRIBUTES_PARAM.


SELECTED_ATTRIBUTES_PARAM

private final IntListParameter SELECTED_ATTRIBUTES_PARAM

Selected attributes parameter.

Key: -projectionparser.selectedattributes

Constructor Detail

ProjectionParser

public ProjectionParser(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

setSelectedAttributes

public void setSelectedAttributes(BitSet selectedAttributes)

Sets the bits set to true in the given BitSet as selected attributes in SELECTED_ATTRIBUTES_PARAM.

The index in the BitSet is expected to be shifted to the left by one, i.e., index 0 in the BitSet relates to the first attribute.

Parameters:
selectedAttributes - the new selected attributes

getSelectedAttributes

public BitSet getSelectedAttributes()

Provides a BitSet with the bits set to true corresponding to the selected attributes in SELECTED_ATTRIBUTES_PARAM.

The index in the BitSet is shifted to the left by one, i.e., index 0 in the BitSet relates to the first attribute.

Returns:
the selected attributes

Release 0.3 (2010-03-31_1612)