DimList Class Reference

A DimList object defines a set of data dimensions (features) of interest. More...

#include <DimList.h>

Inherits NamedObject.

Inheritance diagram for DimList:

Inheritance graph
[legend]
Collaboration diagram for DimList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DimList (const char *name, NameList &dimNames)
 Creates a named DimList object, initializing it with a set of feature names.
 DimList (DimList &dl)
 Copy constructor; makes a copy if the passed DimList object.
 ~DimList ()
void registerDataColumns (NameList &dataSetColumnNames)
 Associates a data set's features with the DimList.
int size ()
 Accessor method.
const int get (int i)
 Exposes the contents of the internal lookup table.
void add (const string &dimName)
 Lets you build a DimList incrementally.
const string & getDimName (int i)
 Lookup a feature name, given its index; the converse of add().
NameListgetDimNames ()
 Accessor method.

Detailed Description

A DimList object defines a set of data dimensions (features) of interest.

These can consist of the entire set of features for a data set, or some subset. They're stored by name, and stored internally as a NameList object. In addition, the DimList stores a lookup table mapping the entries in the NameList to the columns of a Data set. Before a data set can be used by a classifier, it must be registered with a DimList instance, so that the classifier can translate references to dimension names to column indices.


Constructor & Destructor Documentation

DimList::DimList const char *  name,
NameList dims
 

Creates a named DimList object, initializing it with a set of feature names.

Parameters:
name Name to use to refer to the object in logged messages.
dims The NameList object describing the feature names.

DimList::DimList DimList dl  ) 
 

Copy constructor; makes a copy if the passed DimList object.

Parameters:
dl A reference to the object to copy.

DimList::~DimList  )  [inline]
 


Member Function Documentation

void DimList::add const string &  dimName  ) 
 

Lets you build a DimList incrementally.

Parameters:
dimName The name of a feature to add to the DimList.

const int DimList::get int  i  ) 
 

Exposes the contents of the internal lookup table.

This assumes that the DimList has been associated with a data set's features, via the registerDataColumns() call.

Parameters:
i Index into the internal list of features.
Exceptions:
MsgException The DimList isn't associated with a data set yet.
Returns:
The column index of the feature in the associated data set.

const string & DimList::getDimName int  i  ) 
 

Lookup a feature name, given its index; the converse of add().

Parameters:
i The index of the feature.
Returns:
The feature's name.

NameList& DimList::getDimNames  )  [inline]
 

Accessor method.

Returns:
The NameList describing the feature names to use.

void DimList::registerDataColumns NameList dataSetColumnNames  ) 
 

Associates a data set's features with the DimList.

Causes a lookup table to be constructed, storing mappings from the indices of the items in the DimList to the columns in a data set.

Parameters:
dataSetColumnNames The names of a data set's features.

int DimList::size  ) 
 

Accessor method.

Returns:
The number of dimension names stored.


The documentation for this class was generated from the following files:
Generated on Tue Dec 13 11:00:27 2005 for Classer by  doxygen 1.4.3