组合类型 | 公有成员 | 保护成员 | 保护属性

CCombinedDotFeatures类参考


详细描述

Features that allow stacking of a number of DotFeatures.

They transparently provide all the operations of DotFeatures, i.e.

\[r = {\bf x} \cdot {\bf x'}\]

\[r = {\bf x} \cdot {\bf z}\]

\[{\bf z'} = \alpha {\bf x} + {\bf z}\]

在文件CombinedDotFeatures.h45行定义。

继承图,类CCombinedDotFeatures
Inheritance graph
[图例]

所有成员的列表。

组合类型

struct  combined_feature_iterator

公有成员

 CCombinedDotFeatures ()
 CCombinedDotFeatures (const CCombinedDotFeatures &orig)
virtual ~CCombinedDotFeatures ()
virtual int32_t get_num_vectors ()
virtual int32_t get_dim_feature_space ()
virtual float64_t dot (int32_t vec_idx1, int32_t vec_idx2)
virtual float64_t dense_dot (int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)
virtual void dense_dot_range (float64_t *output, int32_t start, int32_t stop, float64_t *alphas, float64_t *vec, int32_t dim, float64_t b)
virtual void dense_dot_range_subset (int32_t *sub_index, int32_t num, float64_t *output, float64_t *alphas, float64_t *vec, int32_t dim, float64_t b)
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 int32_t get_nnz_features_for_vector (int32_t num)
virtual EFeatureType get_feature_type ()
virtual EFeatureClass get_feature_class ()
virtual int32_t get_size ()
virtual void * get_feature_iterator (int32_t vector_index)
virtual bool get_next_feature (int32_t &index, float64_t &value, void *iterator)
virtual void free_feature_iterator (void *iterator)
virtual CFeaturesduplicate () const
void list_feature_objs ()
CDotFeaturesget_first_feature_obj ()
CDotFeaturesget_first_feature_obj (CListElement< CDotFeatures * > *&current)
CDotFeaturesget_next_feature_obj ()
CDotFeaturesget_next_feature_obj (CListElement< CDotFeatures * > *&current)
CDotFeaturesget_last_feature_obj ()
bool insert_feature_obj (CDotFeatures *obj)
bool append_feature_obj (CDotFeatures *obj)
bool delete_feature_obj ()
int32_t get_num_feature_obj ()
virtual void get_subfeature_weights (float64_t **weights, int32_t *num_weights)
virtual void set_subfeature_weights (float64_t *weights, int32_t num_weights)
virtual const char * get_name () const

保护成员

void update_dim_feature_space_and_num_vec ()

保护属性

CList< CDotFeatures * > * feature_list
int32_t num_vectors
 total number of vectors
int32_t num_dimensions
 total number of dimensions

构造及析构函数文档

constructor

在文件CombinedDotFeatures.cpp18行定义。

copy constructor

在文件CombinedDotFeatures.cpp24行定义。

~CCombinedDotFeatures (  ) [virtual]

destructor

在文件CombinedDotFeatures.cpp35行定义。


成员函数文档

void add_to_dense_vec ( float64_t  alpha,
int32_t  vec_idx1,
float64_t vec2,
int32_t  vec2_len,
bool  abs_val = false 
) [virtual]

add vector 1 multiplied with alpha to dense vector2

参数:
alphascalar alpha
vec_idx1index of first vector
vec2pointer to real valued vector
vec2_lenlength of real valued vector
abs_valif true add the absolute value

实现了CDotFeatures

在文件CombinedDotFeatures.cpp185行定义。

bool append_feature_obj ( CDotFeatures obj )

append feature object

参数:
objfeature object to append
返回:
if appending was successful

在文件CombinedDotFeatures.h328行定义。

bool delete_feature_obj (  )

delete feature object

返回:
if deleting was successful

在文件CombinedDotFeatures.h341行定义。

float64_t dense_dot ( int32_t  vec_idx1,
const float64_t vec2,
int32_t  vec2_len 
) [virtual]

compute dot product between vector1 and a dense vector

参数:
vec_idx1index of first vector
vec2pointer to real valued vector
vec2_lenlength of real valued vector

实现了CDotFeatures

在文件CombinedDotFeatures.cpp101行定义。

void dense_dot_range ( float64_t output,
int32_t  start,
int32_t  stop,
float64_t alphas,
float64_t vec,
int32_t  dim,
float64_t  b 
) [virtual]

Compute the dot product for a range of vectors. This function makes use of dense_dot alphas[i] * sparse[i]^T * w + b

参数:
outputresult for the given vector range
startstart vector range from this idx
stopstop vector range at this idx
alphasscalars to multiply with, may be NULL
vecdense vector to compute dot product with
dimlength of the dense vector
bbias

重载CDotFeatures

在文件CombinedDotFeatures.cpp120行定义。

void dense_dot_range_subset ( int32_t *  sub_index,
int32_t  num,
float64_t output,
float64_t alphas,
float64_t vec,
int32_t  dim,
float64_t  b 
) [virtual]

Compute the dot product for a subset of vectors. This function makes use of dense_dot alphas[i] * sparse[i]^T * w + b

参数:
sub_indexindex for which to compute outputs
numlength of index
outputresult for the given vector range
alphasscalars to multiply with, may be NULL
vecdense vector to compute dot product with
dimlength of the dense vector
bbias

重载CDotFeatures

在文件CombinedDotFeatures.cpp153行定义。

float64_t dot ( int32_t  vec_idx1,
int32_t  vec_idx2 
) [virtual]

compute dot product between vector1 and vector2, appointed by their indices

参数:
vec_idx1index of first vector
vec_idx2index of second vector

实现了CDotFeatures

在文件CombinedDotFeatures.cpp85行定义。

CFeatures * duplicate (  ) const [virtual]

duplicate feature object

返回:
feature object

实现了CFeatures

在文件CombinedDotFeatures.cpp30行定义。

virtual void free_feature_iterator ( void *  iterator ) [virtual]

clean up iterator call this function with the iterator returned by get_first_feature

参数:
iteratoras returned by get_first_feature

实现了CDotFeatures

在文件CombinedDotFeatures.h232行定义。

virtual int32_t get_dim_feature_space (  ) [virtual]

obtain the dimensionality of the feature space

返回:
dimensionality

实现了CDotFeatures

在文件CombinedDotFeatures.h70行定义。

virtual EFeatureClass get_feature_class (  ) [virtual]

get feature class

返回:
feature class

实现了CFeatures

在文件CombinedDotFeatures.h147行定义。

virtual void* get_feature_iterator ( int32_t  vector_index ) [virtual]

iterate over the non-zero features

call get_feature_iterator first, followed by get_next_feature and free_feature_iterator to cleanup

参数:
vector_indexthe index of the vector over whose components to iterate over
返回:
feature iterator (to be passed to get_next_feature)

实现了CDotFeatures

在文件CombinedDotFeatures.h183行定义。

virtual EFeatureType get_feature_type (  ) [virtual]

get feature type

返回:
templated feature type

实现了CFeatures

在文件CombinedDotFeatures.h138行定义。

CDotFeatures* get_first_feature_obj (  )

get first feature object

返回:
first feature object

在文件CombinedDotFeatures.h256行定义。

CDotFeatures* get_first_feature_obj ( CListElement< CDotFeatures * > *&  current )

get first feature object

参数:
currentlist of features
返回:
first feature object

在文件CombinedDotFeatures.h268行定义。

CDotFeatures* get_last_feature_obj (  )

get last feature object

返回:
last feature object

在文件CombinedDotFeatures.h302行定义。

virtual const char* get_name (  ) const [virtual]
返回:
object name

实现了CSGObject

在文件CombinedDotFeatures.h379行定义。

virtual bool get_next_feature ( int32_t &  index,
float64_t value,
void *  iterator 
) [virtual]

iterate over the non-zero features

call this function with the iterator returned by get_first_feature and call free_feature_iterator to cleanup

参数:
indexis returned by reference (-1 when not available)
valueis returned by reference
iteratoras returned by get_first_feature
返回:
true if a new non-zero feature got returned

实现了CDotFeatures

在文件CombinedDotFeatures.h204行定义。

CDotFeatures* get_next_feature_obj ( CListElement< CDotFeatures * > *&  current )

get next feature object

参数:
currentlist of features
返回:
next feature object

在文件CombinedDotFeatures.h291行定义。

CDotFeatures* get_next_feature_obj (  )

get next feature object

返回:
next feature object

在文件CombinedDotFeatures.h279行定义。

int32_t get_nnz_features_for_vector ( int32_t  num ) [virtual]

get number of non-zero features in vector

参数:
numwhich vector
返回:
number of non-zero features in vector

实现了CDotFeatures

在文件CombinedDotFeatures.cpp201行定义。

int32_t get_num_feature_obj (  )

get number of feature objects

返回:
number of feature objects

在文件CombinedDotFeatures.h358行定义。

virtual int32_t get_num_vectors (  ) [virtual]

get the number of vectors

返回:
number of vectors

实现了CFeatures

在文件CombinedDotFeatures.h61行定义。

virtual int32_t get_size (  ) [virtual]

get the size of a single element

返回:
size of a element

实现了CFeatures

在文件CombinedDotFeatures.h156行定义。

void get_subfeature_weights ( float64_t **  weights,
int32_t *  num_weights 
) [virtual]

get subfeature weights

参数:
weightssubfeature weights
num_weightswhere number of weights is stored

在文件CombinedDotFeatures.cpp216行定义。

bool insert_feature_obj ( CDotFeatures obj )

insert feature object

参数:
objfeature object to insert
返回:
if inserting was successful

在文件CombinedDotFeatures.h314行定义。

void list_feature_objs (  )

list feature objects

在文件CombinedDotFeatures.cpp40行定义。

void set_subfeature_weights ( float64_t weights,
int32_t  num_weights 
) [virtual]

set subfeature weights

参数:
weightsnew subfeature weights
num_weightsnumber of subfeature weights

在文件CombinedDotFeatures.cpp234行定义。

void update_dim_feature_space_and_num_vec (  ) [protected]

update total number of dimensions and vectors

在文件CombinedDotFeatures.cpp58行定义。


成员数据文档

feature list

在文件CombinedDotFeatures.h387行定义。

int32_t num_dimensions [protected]

total number of dimensions

在文件CombinedDotFeatures.h392行定义。

int32_t num_vectors [protected]

total number of vectors

在文件CombinedDotFeatures.h390行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation