SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
宏定义
CSVFile.cpp 文件参考

浏览源代码.

宏定义

#define GET_VECTOR(read_func, sg_type)
 
#define GET_MATRIX(read_func, sg_type)
 
#define GET_NDARRAY(read_func, sg_type)
 
#define GET_SPARSE_MATRIX(read_func, sg_type)
 
#define SET_VECTOR(format, sg_type)
 
#define SET_MATRIX(format, sg_type)
 
#define SET_SPARSE_MATRIX(format, sg_type)
 
#define GET_STRING_LIST(sg_type)
 
#define SET_STRING_LIST(sg_type)
 

宏定义说明

#define GET_MATRIX (   read_func,
  sg_type 
)

在文件 CSVFile.cpp182 行定义.

#define GET_NDARRAY (   read_func,
  sg_type 
)
值:
void CCSVFile::get_ndarray(sg_type*& array, int32_t*& dims, int32_t& num_dims) \
{ \
}
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139

在文件 CSVFile.cpp243 行定义.

#define GET_SPARSE_MATRIX (   read_func,
  sg_type 
)
值:
void CCSVFile::get_sparse_matrix( \
SGSparseVector<sg_type>*& matrix, int32_t& num_feat, int32_t& num_vec) \
{ \
}
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 CSVFile.cpp258 行定义.

#define GET_STRING_LIST (   sg_type)
值:
void CCSVFile::get_string_list( \
SGString<sg_type>*& strings, int32_t& num_str, \
int32_t& max_string_len) \
{ \
}
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139
shogun string

在文件 CSVFile.cpp410 行定义.

#define GET_VECTOR (   read_func,
  sg_type 
)
值:
void CCSVFile::get_vector(sg_type*& vector, int32_t& len) \
{ \
if (!m_line_reader->has_next()) \
return; \
\
int32_t num_feat=0; \
int32_t num_vec=0; \
get_matrix(vector, num_feat, num_vec); \
\
if (num_feat==1) \
{ \
len=num_vec; \
return; \
} \
\
if (num_vec==1) \
{ \
len=num_feat; \
return; \
} \
\
len=0; \
}

在文件 CSVFile.cpp143 行定义.

#define SET_MATRIX (   format,
  sg_type 
)
值:
void CCSVFile::set_matrix(const sg_type* matrix, int32_t num_feat, int32_t num_vec) \
{ \
\
if (!is_data_transposed) \
{ \
for (int32_t i=0; i<num_vec; i++) \
{ \
int32_t j; \
for (j=0; j<num_feat-1; j++) \
fprintf(file, "%" format "%c", matrix[j+i*num_feat], m_delimiter); \
fprintf(file, "%" format "\n", matrix[j+i*num_feat]); \
} \
} \
else \
{ \
for (int32_t i=0; i<num_feat; i++) \
{ \
int32_t j; \
for (j=0; j<num_vec-1; j++) \
fprintf(file, "%" format "%c", matrix[i+j*num_vec], m_delimiter); \
fprintf(file, "%" format "\n", matrix[i+j*num_vec]); \
} \
} \
\
}
#define SG_RESET_LOCALE
Definition: SGIO.h:86
#define SG_SET_LOCALE_C
Definition: SGIO.h:85

在文件 CSVFile.cpp315 行定义.

#define SET_SPARSE_MATRIX (   format,
  sg_type 
)
值:
void CCSVFile::set_sparse_matrix( \
const SGSparseVector<sg_type>* matrix, int32_t num_feat, int32_t num_vec) \
{ \
}
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...

在文件 CSVFile.cpp358 行定义.

#define SET_STRING_LIST (   sg_type)
值:
void CCSVFile::set_string_list( \
const SGString<sg_type>* strings, int32_t num_str) \
{ \
}
#define SG_NOTIMPLEMENTED
Definition: SGIO.h:139
shogun string

在文件 CSVFile.cpp442 行定义.

#define SET_VECTOR (   format,
  sg_type 
)
值:
void CCSVFile::set_vector(const sg_type* vector, int32_t len) \
{ \
\
if (!is_data_transposed) \
{ \
for (int32_t i=0; i<len; i++) \
fprintf(file, "%" format "\n", vector[i]); \
} \
else \
{ \
int32_t i; \
for (i=0; i<len-1; i++) \
fprintf(file, "%" format "%c", vector[i], m_delimiter); \
fprintf(file, "%" format "\n", vector[i]); \
} \
\
}
#define SG_RESET_LOCALE
Definition: SGIO.h:86
#define SG_SET_LOCALE_C
Definition: SGIO.h:85

在文件 CSVFile.cpp280 行定义.


SHOGUN 机器学习工具包 - 项目文档