damina::Feature Class Reference

Encapsulates a Feature for feature vector representaion of data. More...

#include <Feature.h>

List of all members.

Public Member Functions

 Feature (int, double)
 Constructor.
virtual int getIndex ()
 Return the index in the original vector represeting the data point.
virtual double getValue ()
 Return the value of the feature.
virtual void set (int, double)
 Set the feature.
virtual ~Feature ()
 Default destructor.

Private Attributes

int index
 Index in the original vector representing a data point.
double value
 The value of the Feature.


Detailed Description

Encapsulates a Feature for feature vector representaion of data.

Due the sparse matrix representation of input data matrix, the class Feature was implemented in order to incapsulate the index in the original vector and value of the feature.

Author:
Vincenzo Russo - vincenzo.russo@neminis.org

Definition at line 19 of file Feature.h.


Constructor & Destructor Documentation

damina::Feature::Feature ( int  index,
double  value 
)

Constructor.

Parameters:
index The index in the original vector representing the data point
value The value of the feature

Definition at line 12 of file Feature.cpp.

00012                                                 {
00013                 this->index = index;
00014                 this->value = value;
00015         }

damina::Feature::~Feature (  )  [virtual]

Default destructor.

Definition at line 20 of file Feature.cpp.

00020                           {
00021                 
00022         }


Member Function Documentation

int damina::Feature::getIndex (  )  [virtual]

Return the index in the original vector represeting the data point.

Returns:
An integer value representing the index in the original vector represeting the data point

Definition at line 42 of file Feature.cpp.

References index.

Referenced by damina::OneClassSVM::trainingSetToProblem().

00042                               {
00043                 return index;
00044         }

Here is the caller graph for this function:

double damina::Feature::getValue (  )  [virtual]

Return the value of the feature.

Returns:
The feature's value

Definition at line 51 of file Feature.cpp.

References value.

Referenced by damina::OneClassSVM::trainingSetToProblem().

00051                                  {
00052                 return value;
00053         }

Here is the caller graph for this function:

void damina::Feature::set ( int  index,
double  value 
) [virtual]

Set the feature.

Parameters:
index The index in the original vector representing the data point
value The value of the feature

Definition at line 31 of file Feature.cpp.

00031                                                  {
00032                 this->index = index;
00033                 this->value = value;
00034         }


Member Data Documentation

int damina::Feature::index [private]

Index in the original vector representing a data point.

Definition at line 25 of file Feature.h.

Referenced by getIndex().

double damina::Feature::value [private]

The value of the Feature.

Definition at line 30 of file Feature.h.

Referenced by getValue().


The documentation for this class was generated from the following files:
Generated on Mon Sep 24 22:26:58 2007 for SVClustering by  doxygen 1.5.2