36 CRealDistance::init(l, r);
52 get_feature_vector(idx_a, alen, afree);
54 get_feature_vector(idx_b, blen, bfree);
57 for (int32_t i=0; i<alen; i++)
69 void CEuclideanDistance::init()
82 upper_bound *= upper_bound;
85 get_feature_vector(idx_a, alen, afree);
87 get_feature_vector(idx_b, blen, bfree);
90 for (int32_t i=0; i<alen; i++)
94 if (result > upper_bound)
97 free_feature_vector(avec, idx_a, afree);
99 free_feature_vector(bvec, idx_b, bfree);
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
void add(bool *param, const char *name, const char *description="")
virtual float64_t distance_upper_bounded(int32_t idx_a, int32_t idx_b, float64_t upper_bound)
virtual bool init(CFeatures *l, CFeatures *r)
all of classes and functions are contained in the shogun namespace
CFeatures * lhs
feature vectors to occur on the left hand side
The class Features is the base class of all feature objects.
CFeatures * rhs
feature vectors to occur on the right hand side
virtual ~CEuclideanDistance()
static float32_t sqrt(float32_t x)