OpenASIP
2.0
|
#include <Interpolation.hh>
Classes | |
struct | Pair |
Public Member Functions | |
Interpolation (const EntryKeyFieldProperty *type) | |
virtual | ~Interpolation () |
void | quickFilter (const CostDBEntryKey &, CostDBTypes::EntryTable &) |
void | filter (const CostDBEntryKey &searchKey, CostDBTypes::EntryTable &components) |
Public Member Functions inherited from Matcher | |
Matcher (const EntryKeyFieldProperty *type) | |
virtual | ~Matcher () |
Private Member Functions | |
Interpolation (const Interpolation &) | |
Copying not allowed. More... | |
Interpolation & | operator= (const Interpolation &) |
Assignment not allowed. More... | |
Private Attributes | |
CostDBTypes::EntryTable | created_ |
Entries created during interpolation. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Matcher | |
const EntryKeyFieldProperty * | fieldType () const |
bool | onlyThisFieldDiffers (const EntryKeyFieldProperty *type, const CostDBEntry &entry1, const CostDBEntry &entry2) const |
Implementation for searching database entries.
If a value equal to the search key in the requested field is not found, interpolation of the smaller and greater field value is tried.
Definition at line 49 of file Interpolation.hh.
Interpolation::Interpolation | ( | const EntryKeyFieldProperty * | type | ) |
|
virtual |
Destructor.
Deallocates memory reserved for entries created during interpolation.
Definition at line 55 of file Interpolation.cc.
|
private |
Copying not allowed.
|
virtual |
Searches for database entries.
If a value equal to the search key in the requested field is not found, interpolation of the smaller and greater field value is applied. Only the best matches are returned, i.e. equal match is chosen and no interpolation is done, or if two entries has only the field to which search is applied different, the closer one to the search key is chosen for interpolation.
searchKey | Search key. |
components | Entries from which to find. Updated to contain entries that matched the search request. |
TypeMismatch | Interpolation was requested for field that cannot be interpolated. |
KeyNotFound | Some CostDBEntryStats have no value caused by missing cost data. |
Implements Matcher.
Definition at line 92 of file Interpolation.cc.
References created_, Matcher::fieldType(), Interpolation::Pair::greater, EntryKeyField::isEqual(), EntryKeyField::isGreater(), EntryKeyField::isSmaller(), CostDBEntryKey::keyFieldOfType(), Matcher::onlyThisFieldDiffers(), and Interpolation::Pair::smaller.
|
private |
Assignment not allowed.
|
virtual |
Nothing to do since no entry can be removed in linear time.
Implements Matcher.
Definition at line 70 of file Interpolation.cc.
|
private |
Entries created during interpolation.
Definition at line 70 of file Interpolation.hh.
Referenced by filter(), and ~Interpolation().