Defines

SparseFeatures.cpp File Reference

Go to the source code of this file.

Defines

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

Define 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 1041 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 1061 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 1089 of file SparseFeatures.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation