14 #ifndef _DENSEFEATURES__H__
15 #define _DENSEFEATURES__H__
25 template<
class ST>
class CStringFeatures;
26 template<
class ST>
class CDenseFeatures;
342 virtual bool reshape(int32_t p_num_features, int32_t p_num_vectors);
387 float64_t* vec2, int32_t vec2_len,
bool abs_val =
false);
408 #ifndef DOXYGEN_SHOULD_SKIP_THIS
410 struct dense_feature_iterator
503 virtual const char*
get_name()
const {
return "DenseFeatures"; }
540 #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)
The class DenseFeatures implements dense feature matrices.
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
SGMatrix< ST > get_feature_matrix()
void set_feature_matrix(SGMatrix< ST > matrix)
void vector_subset(int32_t *idx, int32_t idx_len)
virtual bool is_equal(CDenseFeatures *rhs)
Features that support dot products among other operations.
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)
A File access base class.
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
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
The class Features is the base class of all feature objects.
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)
Class List implements a doubly connected list for low-level-objects.