SHOGUN  v3.2.0
宏定义
LibSVMFile.cpp 文件参考

浏览源代码.

宏定义

#define GET_SPARSE_MATRIX(read_func, sg_type)
 
#define GET_LABELED_SPARSE_MATRIX(read_func, sg_type)
 
#define SET_SPARSE_MATRIX(format, sg_type)
 
#define SET_LABELED_SPARSE_MATRIX(format, sg_type)
 

宏定义说明

◆ GET_LABELED_SPARSE_MATRIX

#define GET_LABELED_SPARSE_MATRIX (   read_func,
  sg_type 
)

在文件 LibSVMFile.cpp99 行定义.

◆ GET_SPARSE_MATRIX

#define GET_SPARSE_MATRIX (   read_func,
  sg_type 
)
值:
void CLibSVMFile::get_sparse_matrix(SGSparseVector<sg_type>*& matrix, int32_t& num_feat, int32_t& num_vec) \
{ \
float64_t* labels=NULL; \
get_sparse_matrix(matrix, num_feat, num_vec, labels, false); \
}
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry<T>* vector is orde...

在文件 LibSVMFile.cpp77 行定义.

◆ SET_LABELED_SPARSE_MATRIX

#define SET_LABELED_SPARSE_MATRIX (   format,
  sg_type 
)
值:
void CLibSVMFile::set_sparse_matrix( \
const SGSparseVector<sg_type>* matrix, int32_t num_feat, int32_t num_vec, \
const float64_t* labels) \
{ \
SG_SET_LOCALE_C; \
\
for (int32_t i=0; i<num_vec; i++) \
{ \
if (labels!=NULL) \
fprintf(file, "%lg ", labels[i]); \
\
for (int32_t j=0; j<matrix[i].num_feat_entries; j++) \
{ \
fprintf(file, "%d%c%" format " ", \
matrix[i].features[j].feat_index+1, \
m_delimiter, \
matrix[i].features[j].entry); \
} \
fprintf(file, "\n"); \
} \
\
SG_RESET_LOCALE; \
}
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry<T>* vector is orde...
double float64_t
Definition: common.h:48

在文件 LibSVMFile.cpp205 行定义.

◆ SET_SPARSE_MATRIX

#define SET_SPARSE_MATRIX (   format,
  sg_type 
)
值:
void CLibSVMFile::set_sparse_matrix( \
const SGSparseVector<sg_type>* matrix, int32_t num_feat, int32_t num_vec) \
{ \
set_sparse_matrix(matrix, num_feat, num_vec, NULL); \
}
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry<T>* vector is orde...

在文件 LibSVMFile.cpp183 行定义.


SHOGUN Machine Learning Toolbox - Documentation