21 #define GRT_DLL_EXPORTS 26 ClassificationSample::ClassificationSample():numDimensions(0),classLabel(0){
29 ClassificationSample::ClassificationSample(
const UINT numDimensions){
30 this->numDimensions = numDimensions;
32 sample.resize( numDimensions );
35 ClassificationSample::ClassificationSample(
const UINT classLabel,
const VectorFloat &sample){
36 this->classLabel = classLabel;
37 this->sample = sample;
38 this->numDimensions = (UINT)sample.size();
42 this->classLabel = rhs.classLabel;
43 this->sample = rhs.sample;
44 this->numDimensions = rhs.numDimensions;
47 ClassificationSample::~ClassificationSample(){
50 bool ClassificationSample::clear(){
57 bool ClassificationSample::set(UINT classLabel,
const VectorFloat &sample){
58 this->classLabel = classLabel;
59 this->sample = sample;
60 this->numDimensions = (UINT)sample.size();
64 bool ClassificationSample::setClassLabel(
const UINT classLabel){
65 this->classLabel = classLabel;
69 bool ClassificationSample::setSample(
const VectorFloat &sample){
70 this->sample = sample;
71 this->numDimensions = (UINT)sample.size();
This class stores the class label and raw data for a single labelled classification sample...