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

Public Member Functions | |
| virtual void | add (Point *) |
| Add a Point to the dataset. | |
| DataSet () | |
| Constructor. | |
| virtual Point * | first () |
| Returns the first point in dataset. | |
| virtual Point * | get (int) |
| Returns the specified point in the dataset. | |
| virtual unsigned long int | getSize () |
| Returns the Dataset Size. | |
| virtual Point * | last () |
| Returns the last point in dataset. | |
| virtual Point * | next () |
| Increments the Dataset iterator and return the corresponding point. | |
| virtual Point * | previous () |
| Decrementes the Dataset iterator and return the corresponding point. | |
| virtual | ~DataSet () |
| Destructor. | |
Private Attributes | |
| vector< Point * > | data |
| The data. | |
| vector< Point * >::iterator | it |
| The iterator over the data. | |
Both Training Set and Test Set are data sets formed by points and them relative labels. So, this class is just implemented as a vector of Point, because each Point embeds its own label.
Definition at line 24 of file DataSet.h.
| damina::DataSet::DataSet | ( | ) |
| damina::DataSet::~DataSet | ( | ) | [virtual] |
Destructor.
We need to destroy all Points in dataset before destroy dataset itself
Definition at line 18 of file DataSet.cpp.
References data.
00018 { 00019 vector<Point *>::iterator dataIterator; 00020 00021 for (dataIterator == data.begin(); dataIterator < data.end(); dataIterator++) { 00022 delete *dataIterator; 00023 } 00024 }
| void damina::DataSet::add | ( | Point * | p | ) | [virtual] |
Add a Point to the dataset.
| p | The point to add |
Definition at line 31 of file DataSet.cpp.
References data.
00031 { 00032 data.push_back(p); 00033 }
| Point * damina::DataSet::first | ( | ) | [virtual] |
| Point * damina::DataSet::get | ( | int | index | ) | [virtual] |
Returns the specified point in the dataset.
| index | The position occupied in the dataset of the point to get |
Definition at line 93 of file DataSet.cpp.
References data.
Referenced by damina::OneClassSVM::trainingSetToProblem().
00093 { 00094 return data[index]; 00095 }
Here is the caller graph for this function:

| unsigned long int damina::DataSet::getSize | ( | ) | [virtual] |
Returns the Dataset Size.
Definition at line 82 of file DataSet.cpp.
References data.
Referenced by damina::SVClustering::SVClustering(), and damina::OneClassSVM::trainingSetToProblem().
00082 { 00083 return data.size(); 00084 }
Here is the caller graph for this function:

| Point * damina::DataSet::last | ( | ) | [virtual] |
| Point * damina::DataSet::next | ( | ) | [virtual] |
Increments the Dataset iterator and return the corresponding point.
Definition at line 61 of file DataSet.cpp.
References it.
| Point * damina::DataSet::previous | ( | ) | [virtual] |
Decrementes the Dataset iterator and return the corresponding point.
Definition at line 71 of file DataSet.cpp.
References it.
vector<Point *> damina::DataSet::data [private] |
vector<Point *>::iterator damina::DataSet::it [private] |
1.5.2