#include <SetKNNModule.h>
Inheritance diagram for StorekNNData:

Public Member Functions | |
| StorekNNData () | |
| virtual | ~StorekNNData () |
| bool | SetValidity (VldContext &vld) |
| const VldContext & | GetValidity () |
| bool | Add (int i, const std::string &key, float data) |
| bool | Get (int i, const std::string &key, float &data) |
| bool | SetPrefix (std::string in) |
| bool | Clear () |
Private Attributes | |
| VldContext | fValidity |
| std::string | fPrefix |
| std::map< std::string, float > | fData |
|
|
Definition at line 33 of file SetKNNModule.cxx. 00034 {
00035 }
|
|
|
Definition at line 38 of file SetKNNModule.cxx. 00039 {
00040 }
|
|
||||||||||||||||
|
Definition at line 43 of file SetKNNModule.cxx. References fData, and fPrefix. 00044 {
00045 char temp[3];
00046 sprintf(temp, "%02d", i);
00047 const std::string full_key = fPrefix + "_" + key + "_" + string(temp);
00048
00049 // if(true) cout<<"Storing: "<<full_key<<" "<<data<<endl;
00050
00051 return fData.insert(map<string, float>::value_type(full_key, data)).second;
00052 }
|
|
|
Definition at line 92 of file SetKNNModule.cxx. References fData. 00093 {
00094 // cout<<"flushing the data!"<<endl;
00095 fData.clear();
00096 return true;
00097 }
|
|
||||||||||||||||
|
Definition at line 75 of file SetKNNModule.cxx. References fData, and fPrefix. 00076 {
00077 char temp[3];
00078 sprintf(temp, "%02d", i);
00079 const std::string full_key = fPrefix + "_" + key + "_" + string(temp);
00080
00081 map<string, float>::const_iterator fit = fData.find(full_key);
00082 if(fit != fData.end())
00083 {
00084 data = fit -> second;
00085 return true;
00086 }
00087
00088 return false;
00089 }
|
|
|
Definition at line 62 of file SetKNNModule.cxx. 00063 {
00064 return fValidity;
00065 }
|
|
|
Definition at line 68 of file SetKNNModule.cxx. References fPrefix. 00069 {
00070 fPrefix = in;
00071 return true;
00072 }
|
|
|
Definition at line 55 of file SetKNNModule.cxx. References fValidity. 00056 {
00057 fValidity = vld;
00058 return true;
00059 }
|
|
|
Definition at line 34 of file SetKNNModule.h. |
|
|
Definition at line 33 of file SetKNNModule.h. Referenced by Add(), Get(), and SetPrefix(). |
|
|
Definition at line 32 of file SetKNNModule.h. Referenced by SetValidity(). |
1.3.9.1