12 #ifndef _DISTANCE_H___
13 #define _DISTANCE_H___
101 if (idx_a < 0 || idx_b <0)
111 if (idx_a>=num_vectors)
112 idx_a=2*num_vectors-1-idx_a;
114 if (idx_b>=num_vectors)
115 idx_b=2*num_vectors-1-idx_b;
118 ASSERT(idx_a<lhs->get_num_vectors());
119 ASSERT(idx_b<rhs->get_num_vectors());
149 int32_t &m,int32_t &n,
float64_t* target);
159 int32_t &m,int32_t &n,
float32_t* target);
virtual EFeatureClass get_feature_class()=0
void do_precompute_matrix()
matrix precomputation
virtual float64_t * get_distance_matrix_real(int32_t &m, int32_t &n, float64_t *target)
Class Distance, a base class for all the distances used in the Shogun toolbox.
int32_t get_num_vec_lhs()
virtual void remove_lhs()
takes all necessary steps if the lhs is removed from distance matrix
virtual EDistanceType get_distance_type()=0
virtual int32_t get_num_vectors() const =0
bool get_precompute_matrix()
virtual float64_t compute(int32_t x, int32_t y)=0
EFeatureClass
shogun feature class
int32_t get_num_vec_rhs()
virtual void set_precompute_matrix(bool flag)
Class SGObject is the base class of all shogun objects.
virtual void remove_lhs_and_rhs()
A File access base class.
CFeatures * replace_rhs(CFeatures *rhs)
static void * run_distance_thread(void *p)
run distance thread
EFeatureType
shogun feature type
float64_t distance(int32_t idx_a, int32_t idx_b)
CFeatures * lhs
feature vectors to occur on left hand side
The class Features is the base class of all feature objects.
CFeatures * rhs
feature vectors to occur on right hand side
virtual EFeatureType get_feature_type()=0
float32_t * precomputed_matrix
virtual void remove_rhs()
takes all necessary steps if the rhs is removed from distance matrix
virtual float32_t * get_distance_matrix_shortreal(int32_t &m, int32_t &n, float32_t *target)
SGMatrix< float64_t > get_distance_matrix()