10 #ifndef _DIRECTORDOTFEATURES_H___
11 #define _DIRECTORDOTFEATURES_H___
15 #ifdef USE_SWIG_DIRECTORS
24 #define IGNORE_IN_CLASSLIST
33 CDirectorDotFeatures(int32_t size=0) : CDotFeatures(size)
37 virtual ~CDirectorDotFeatures() { }
45 virtual int32_t get_num_vectors()
const
59 virtual int32_t get_dim_feature_space()
const
72 virtual float64_t dot(int32_t vec_idx1, CDotFeatures* df, int32_t vec_idx2)
83 virtual float64_t dense_dot_sgvec(int32_t vec_idx1,
const SGVector<float64_t> vec2)
97 virtual void add_to_dense_sgvec(
float64_t alpha, int32_t vec_idx1, SGVector<float64_t> vec2,
bool abs_val=
false)
108 virtual float64_t dense_dot(int32_t vec_idx1,
const float64_t* vec2, int32_t vec2_len)
110 return dense_dot_sgvec(vec_idx1, SGVector<float64_t>((
float64_t*) vec2, vec2_len,
false));
121 virtual void add_to_dense_vec(
float64_t alpha, int32_t vec_idx1,
float64_t* vec2, int32_t vec2_len,
bool abs_val=
false)
123 add_to_dense_sgvec(alpha, vec_idx1, SGVector<float64_t>(vec2, vec2_len,
false), abs_val);
155 virtual void dense_dot_range_subset(int32_t* sub_index, int32_t num,
168 virtual int32_t get_nnz_features_for_vector(int32_t num)
183 virtual void* get_feature_iterator(int32_t vector_index)
199 virtual bool get_next_feature(int32_t& index,
float64_t& value,
void* iterator)
210 virtual void free_feature_iterator(
void* iterator)
219 virtual SGVector<float64_t> get_mean()
228 virtual SGMatrix<float64_t> get_cov()
250 virtual CFeatures* duplicate()
const
272 virtual int32_t add_preprocessor(CPreprocessor* p)
282 virtual CPreprocessor* del_preprocessor(int32_t num)
295 virtual bool reshape(int32_t num_features, int32_t num_vectors)
307 virtual int32_t get_size()
const
317 virtual void load(CFile* loader)
326 virtual void save(CFile* writer)
336 virtual void add_subset(SGVector<index_t> subset)
343 virtual void remove_subset()
350 virtual void remove_all_subsets()
356 virtual void subset_changed_post()
370 virtual CFeatures* copy_subset(SGVector<index_t> indices)
376 inline virtual const char* get_name()
const {
return "DirectorDotFeatures"; }
379 #endif // USE_SWIG_DIRECTORS
380 #endif // _DIRECTORDOTFEATURES_H___