Abstract class, defines interface for distance evaluators to be used in Classifier_kNN. More...
#include <distance.hpp>
Public Types | |
typedef boost::shared_ptr< SUBSET > | PSubset |
Public Member Functions | |
Distance (const Distance &d) | |
void | reset (const DIMTYPE n) |
void | narrow_to (const PSubset sub) |
void | denarrow () |
DIMTYPE | get_n () const |
DIMTYPE | get_d () const |
virtual DATATYPE | distance (const DATATYPE *pattern1, const DATATYPE *pattern2)=0 |
Distance * | sharing_clone () const |
Distance * | stateless_clone () const |
Protected Attributes | |
DIMTYPE | _n |
DIMTYPE | _d |
boost::scoped_array< DIMTYPE > | _index |
Abstract class, defines interface for distance evaluators to be used in Classifier_kNN.
Distance* FST::Distance< DATATYPE, DIMTYPE, SUBSET >::sharing_clone | ( | ) | const [inline, virtual] |
create equivalent clone of the current object, parmitting read-only access to structures in the source object (allows referencing instead of copying of large memory structures). may be faster and save space but requires more caution with respect to concurrency Use example: Data_Accessor memory data representation cloning
Implements FST::Clonable.
Distance* FST::Distance< DATATYPE, DIMTYPE, SUBSET >::stateless_clone | ( | ) | const [inline, virtual] |
create clone of the current object, ignoring internal temporary structures to save speed. Does not replicate exact object state. The clone must be used carefully in a way that ensures internal structure re-initialization Use example: Data_Splitter cloning or Classifier_SVM cloning due to inability to clone external structures defined in LibSVM
Implements FST::Clonable.