#include <R2.h>

Public Member Functions | |
| Observation () | |
| Default constructor. | |
| Observation (int ID) | |
| id constructor. | |
| Observation (const PosiFeatures &p, int ID) | |
| Complete constructor. | |
| Observation (const Observation &f) | |
| Copy constructor. | |
| Observation (stringstream &ss) | |
| Stringstream constructor. | |
| Observation & | operator= (const Observation &f) |
| Assignment operator =. | |
| string | print () const |
| print the PosiFeature on a string. | |
| int | insertion (const PosiFeature &p) |
| Insert a PosiFeature. | |
| bool | find (const PosiFeature &p, int &position) |
| Find PosiFeature p in the vector. If not present. | |
| bool | find (const int id, int &position) |
| Find PosiFeature with id p in the vector. If not present. | |
| void | init () |
| init function. | |
| string | exportAsString () |
| export the Observation as a fromatted stringstream | |
Public Attributes | |
| int | nullFeature |
| Contains the index of the PosiFeature with Position [0.0, 0.0]. | |
| int | id |
| Contains the id of the owner of the Observation. | |
| Observation::Observation | ( | ) |
Default constructor.
Produce an Observation with no owner (id =-1) and only the null feature [0.0 0.0] with id -1.
| Observation::Observation | ( | int | ID | ) |
id constructor.
| ID | integer to which the id is associated Produce an Observation with given owner (id = ID) and only the null feature [0.0 0.0] with id -1. |
| Observation::Observation | ( | const PosiFeatures & | p, | |
| int | ID | |||
| ) |
Complete constructor.
| ID | integer to which the id is associated | |
| p | PosiFeatures to be inserted in the vector Produce an Observation with given owner (id = ID) and only the given vector list of PosiFeature null feature [0.0 0.0] with id ID. The features are ordered by increasing x. |
| Observation::Observation | ( | const Observation & | f | ) |
Copy constructor.
| Observation::Observation | ( | stringstream & | ss | ) |
Stringstream constructor.
Build an Observation from a stringstream containing a formatted string, as the one created by the method exportAsString. Format is "numFeatures id nullFeature feature1 ..."
| Observation & Observation::operator= | ( | const Observation & | f | ) |
Assignment operator =.
| string Observation::print | ( | ) | const |
print the PosiFeature on a string.
| int Observation::insertion | ( | const PosiFeature & | p | ) |
Insert a PosiFeature.
Insert the given PosiFeature in order of incereasing x value.
| bool Observation::find | ( | const PosiFeature & | p, | |
| int & | position | |||
| ) |
Find PosiFeature p in the vector. If not present.
| bool Observation::find | ( | const int | id, | |
| int & | position | |||
| ) |
Find PosiFeature with id p in the vector. If not present.
| void Observation::init | ( | ) |
init function.
| string Observation::exportAsString | ( | ) |
export the Observation as a fromatted stringstream
format is "numFeatures id nullFeature feature1 ..."
Contains the index of the PosiFeature with Position [0.0, 0.0].
| int Observation::id |
Contains the id of the owner of the Observation.
1.5.6