12 #ifndef _DISTANCE_H___ 13 #define _DISTANCE_H___ 15 #include <shogun/lib/config.h> 158 return get_distance_matrix<float64_t>();
180 i_start=(int32_t) (offs/int64_t(n));
virtual EFeatureClass get_feature_class()=0
void do_precompute_matrix()
matrix precomputation
virtual bool has_features()
Class Distance, a base class for all the distances used in the Shogun toolbox.
virtual void reset_precompute()
virtual int32_t get_num_vec_lhs()
virtual CFeatures * replace_lhs(CFeatures *lhs)
virtual void remove_lhs()
takes all necessary steps if the lhs is removed from distance matrix
virtual EDistanceType get_distance_type()=0
static void * run_distance_thread(void *p)
run distance thread
virtual float64_t distance_upper_bounded(int32_t idx_a, int32_t idx_b, float64_t upper_bound)
bool get_precompute_matrix()
void run_distance_rhs(SGVector< float64_t > &result, const index_t idx_r_start, index_t idx_start, const index_t idx_stop, const index_t idx_a)
static float64_t floor(float64_t d)
virtual bool check_compatibility(CFeatures *l, CFeatures *r)
EFeatureClass
shogun feature class
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.
void run_distance_lhs(SGVector< float64_t > &result, const index_t idx_r_start, index_t idx_start, const index_t idx_stop, const index_t idx_b)
virtual int32_t get_num_vec_rhs()
virtual CFeatures * replace_rhs(CFeatures *rhs)
EFeatureType
shogun feature type
int32_t compute_row_start(int64_t offs, int32_t n, bool symmetric)
virtual float64_t distance(int32_t idx_a, int32_t idx_b)
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 EFeatureType get_feature_type()=0
virtual void precompute_lhs()
virtual void precompute_rhs()
SGMatrix< float64_t > get_distance_matrix()
float32_t * precomputed_matrix
static float32_t sqrt(float32_t x)
virtual bool init(CFeatures *lhs, CFeatures *rhs)
virtual void remove_rhs()
takes all necessary steps if the rhs is removed from distance matrix
virtual float64_t compute(int32_t idx_a, int32_t idx_b)=0