SHOGUN  v2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
SparseFeatures.cpp File Reference

Go to the source code of this file.

Macros

#define GET_FEATURE_TYPE(sg_type, f_type)
#define LOAD(fname, sg_type)
#define WRITE(fname, sg_type)

Macro Definition Documentation

#define GET_FEATURE_TYPE (   sg_type,
  f_type 
)
Value:
template<> EFeatureType CSparseFeatures<sg_type>::get_feature_type() const \
{ \
return f_type; \
}

Definition at line 1093 of file SparseFeatures.cpp.

#define LOAD (   fname,
  sg_type 
)
Value:
template<> void CSparseFeatures<sg_type>::load(CFile* loader) \
{ \
remove_all_subsets(); \
SG_SET_LOCALE_C; \
ASSERT(loader); \
SGSparseVector<sg_type>* matrix=NULL; \
int32_t num_feat=0; \
int32_t num_vec=0; \
loader->fname(matrix, num_feat, num_vec); \
set_sparse_feature_matrix(SGSparseMatrix<sg_type>(matrix, num_feat, num_vec)); \
SG_RESET_LOCALE; \
}

Definition at line 1113 of file SparseFeatures.cpp.

#define WRITE (   fname,
  sg_type 
)
Value:
template<> void CSparseFeatures<sg_type>::save(CFile* writer) \
{ \
if (m_subset_stack->has_subsets()) \
SG_ERROR("save() not allowed with subset\n"); \
SG_SET_LOCALE_C; \
ASSERT(writer); \
writer->fname(sparse_feature_matrix, num_features, num_vectors); \
SG_RESET_LOCALE; \
}

Definition at line 1141 of file SparseFeatures.cpp.


SHOGUN Machine Learning Toolbox - Documentation