SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros
CSVFile.cpp File Reference

Go to the source code of this file.

Macros

#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)
 

Macro Definition Documentation

#define GET_MATRIX (   read_func,
  sg_type 
)

Definition at line 182 of file CSVFile.cpp.

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

Definition at line 243 of file CSVFile.cpp.

#define GET_SPARSE_MATRIX (   read_func,
  sg_type 
)
Value:
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...

Definition at line 258 of file CSVFile.cpp.

#define GET_STRING_LIST (   sg_type)
Value:
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

Definition at line 410 of file CSVFile.cpp.

#define GET_VECTOR (   read_func,
  sg_type 
)
Value:
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; \
}

Definition at line 143 of file CSVFile.cpp.

#define SET_MATRIX (   format,
  sg_type 
)
Value:
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

Definition at line 315 of file CSVFile.cpp.

#define SET_SPARSE_MATRIX (   format,
  sg_type 
)
Value:
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...

Definition at line 358 of file CSVFile.cpp.

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

Definition at line 442 of file CSVFile.cpp.

#define SET_VECTOR (   format,
  sg_type 
)
Value:
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

Definition at line 280 of file CSVFile.cpp.


SHOGUN Machine Learning Toolbox - Documentation