14 #ifndef _DENSEFEATURES__H__
15 #define _DENSEFEATURES__H__
29 template<
class ST>
class CStringFeatures;
30 template<
class ST>
class CDenseFeatures;
31 template<
class ST>
class SGMatrix;
69 template<
class ST>
class CDenseFeatures:
public CDotFeatures
346 virtual bool reshape(int32_t p_num_features, int32_t p_num_vectors);
391 float64_t* vec2, int32_t vec2_len,
bool abs_val =
false);
404 virtual void load(CFile* loader);
410 virtual void save(CFile* saver);
412 #ifndef DOXYGEN_SHOULD_SKIP_THIS
414 struct dense_feature_iterator
519 virtual const char*
get_name()
const {
return "DenseFeatures"; }
556 #endif // _DENSEFEATURES__H__
void set_feature_vector(SGVector< ST > vector, int32_t num)
virtual int32_t get_dim_feature_space() const
virtual bool get_next_feature(int32_t &index, float64_t &value, void *iterator)
virtual void load(CFile *loader)
virtual void copy_feature_matrix(SGMatrix< ST > src)
ST * get_feature_vector(int32_t num, int32_t &len, bool &dofree)
int32_t get_num_features() const
virtual void free_feature_iterator(void *iterator)
CDenseFeatures(int32_t size=0)
CCache< ST > * feature_cache
virtual CFeatures * duplicate() const
CDotFeatures(int32_t size=0)
SGMatrix< ST > get_feature_matrix()
void set_feature_matrix(SGMatrix< ST > matrix)
CFeatures(int32_t size=0)
void vector_subset(int32_t *idx, int32_t idx_len)
virtual bool is_equal(CDenseFeatures *rhs)
virtual int32_t get_nnz_features_for_vector(int32_t num)
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)
int32_t num_features
number of features in cache
EFeatureClass
shogun feature class
virtual void * get_feature_iterator(int32_t vector_index)
virtual void save(CFile *saver)
virtual int32_t get_num_vectors() const
virtual ST * compute_feature_vector(int32_t num, int32_t &len, ST *target=NULL)
void set_num_vectors(int32_t num)
virtual float64_t dot(int32_t vec_idx1, CDotFeatures *df, int32_t vec_idx2)
CDenseFeatures< ST > * get_transposed()
void set_num_features(int32_t num)
SGMatrix< ST > feature_matrix
CFeatures * create_merged_copy(CList *other)
EFeatureType
shogun feature type
virtual CFeatures * copy_dimension_subset(SGVector< index_t > dims)
void feature_subset(int32_t *idx, int32_t idx_len)
all of classes and functions are contained in the shogun namespace
void free_feature_vector(ST *feat_vec, int32_t num, bool dofree)
virtual bool reshape(int32_t p_num_features, int32_t p_num_vectors)
virtual EFeatureClass get_feature_class() const
virtual ~CDenseFeatures()
void obtain_from_dot(CDotFeatures *df)
int32_t num_vectors
number of vectors in cache
static CDenseFeatures * obtain_from_generic(CFeatures *const base_features)
virtual EFeatureType get_feature_type() const
virtual bool apply_preprocessor(bool force_preprocessing=false)
void free_feature_matrix()
SGMatrix< ST > steal_feature_matrix()
virtual const char * get_name() const
virtual void add_to_dense_vec(float64_t alpha, int32_t vec_idx1, float64_t *vec2, int32_t vec2_len, bool abs_val=false)
virtual CFeatures * copy_subset(SGVector< index_t > indices)