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

浏览源代码.

宏定义

#define GET_VECTOR(read_func, sg_type)
 
#define SET_VECTOR(format, sg_type)
 

宏定义说明

#define GET_VECTOR (   read_func,
  sg_type 
)
值:
void CUAIFile::get_vector(sg_type*& vector, int32_t& len) \
{ \
if (!m_line_reader->has_next()) \
return; \
\
SGVector<char> line; \
int32_t num_elements = 0; \
\
line = m_line_reader->read_line(); \
m_tokenizer->set_text(line); \
while (m_tokenizer->has_next()) \
{ \
int32_t temp_start; \
m_tokenizer->next_token_idx(temp_start); \
num_elements++; \
} \
\
vector = SG_MALLOC(sg_type, num_elements); \
m_parser->set_text(line); \
for (int32_t i=0; i<num_elements; i++) \
vector[i] = m_parser->read_func(); \
len = num_elements; \
}

在文件 UAIFile.cpp107 行定义.

#define SET_VECTOR (   format,
  sg_type 
)
值:
void CUAIFile::set_vector(const sg_type* vector, int32_t len) \
{ \
\
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

在文件 UAIFile.cpp146 行定义.


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