#include <Point.h>
Collaboration diagram for damina::Point:

Public Member Functions | |
| virtual void | add (Feature *) |
| Append a feature to the point. | |
| virtual Feature * | first () |
| Returns the first feature of the point. | |
| virtual Feature * | get (int) |
| Returns the specified feature of the point. | |
| virtual double | getLabel () |
| Returns the label currently assigned to the point. | |
| virtual unsigned long int | getSize () |
| Returns the number of the elements in the point. | |
| virtual Feature * | last () |
| Returns the last feature of the point. | |
| virtual Feature * | next () |
| Increments the point iterator and return the corresponding feature. | |
| Point (double) | |
| Point () | |
| Constructor. | |
| virtual Feature * | previous () |
| Decrements the point iterator and return the corresponding feature. | |
| virtual void | setLabel (double) |
| Set the label (class) for the point. | |
| virtual | ~Point () |
| Destructor. | |
Private Attributes | |
| vector< Feature * >::iterator | it |
| An iterator over the point. | |
| double | label |
| Label indicates the class the point belong to. | |
| vector< Feature * > | point |
| The point representation. | |
We use the Vector Document Model, in which each object is represented by a point in a vector space. So, a point is a features vector.
Definition at line 21 of file Point.h.
| damina::Point::Point | ( | double | ) |
| damina::Point::~Point | ( | ) | [virtual] |
Destructor.
Before destroy a point we have to destroy its features first.
Definition at line 17 of file Point.cpp.
References point.
00017 { 00018 vector<Feature *>::iterator dataIterator; 00019 00020 /* iterating over the features to destory them */ 00021 for (dataIterator == point.begin(); dataIterator < point.end(); dataIterator++) { 00022 delete *dataIterator; 00023 } 00024 }
| void damina::Point::add | ( | Feature * | f | ) | [virtual] |
| Feature * damina::Point::first | ( | ) | [virtual] |
| Feature * damina::Point::get | ( | int | index | ) | [virtual] |
Returns the specified feature of the point.
| index | The position occupied in the point of the feature to get |
Definition at line 112 of file Point.cpp.
References point.
Referenced by damina::OneClassSVM::trainingSetToProblem().
00112 { 00113 return this->point[index]; 00114 }
Here is the caller graph for this function:

| double damina::Point::getLabel | ( | ) | [virtual] |
Returns the label currently assigned to the point.
Definition at line 50 of file Point.cpp.
References label.
Referenced by damina::OneClassSVM::trainingSetToProblem().
00050 { 00051 return label; 00052 }
Here is the caller graph for this function:

| unsigned long int damina::Point::getSize | ( | ) | [virtual] |
Returns the number of the elements in the point.
Definition at line 101 of file Point.cpp.
References point.
Referenced by damina::OneClassSVM::trainingSetToProblem().
00101 { 00102 return this->point.size(); 00103 }
Here is the caller graph for this function:

| Feature * damina::Point::last | ( | ) | [virtual] |
| Feature * damina::Point::next | ( | ) | [virtual] |
| Feature * damina::Point::previous | ( | ) | [virtual] |
| void damina::Point::setLabel | ( | double | l | ) | [virtual] |
vector<Feature *>::iterator damina::Point::it [private] |
double damina::Point::label [private] |
Label indicates the class the point belong to.
Definition at line 37 of file Point.h.
Referenced by getLabel(), and setLabel().
vector<Feature *> damina::Point::point [private] |
1.5.2