SHOGUN  v3.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
StreamingAsciiFile.cpp File Reference

Go to the source code of this file.

Macros

#define GET_VECTOR(fname, conv, sg_type)
#define GET_FLOAT_VECTOR(sg_type)
#define GET_VECTOR_AND_LABEL(fname, conv, sg_type)
#define GET_FLOAT_VECTOR_AND_LABEL(sg_type)
#define GET_STRING(fname, conv, sg_type)
#define GET_STRING_AND_LABEL(fname, conv, sg_type)
#define GET_SPARSE_VECTOR(fname, conv, sg_type)
#define GET_SPARSE_VECTOR_AND_LABEL(fname, conv, sg_type)

Macro Definition Documentation

#define GET_FLOAT_VECTOR (   sg_type)

Definition at line 121 of file StreamingAsciiFile.cpp.

#define GET_FLOAT_VECTOR_AND_LABEL (   sg_type)

Definition at line 246 of file StreamingAsciiFile.cpp.

#define GET_SPARSE_VECTOR (   fname,
  conv,
  sg_type 
)

Definition at line 401 of file StreamingAsciiFile.cpp.

#define GET_SPARSE_VECTOR_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 495 of file StreamingAsciiFile.cpp.

#define GET_STRING (   fname,
  conv,
  sg_type 
)
Value:
void CStreamingAsciiFile::get_string(sg_type*& vector, int32_t& len) \
{ \
char* buffer = NULL; \
ssize_t bytes_read; \
\
SG_SET_LOCALE_C; \
bytes_read = buf->read_line(buffer); \
\
if (bytes_read<=1) \
{ \
vector=NULL; \
len=-1; \
SG_RESET_LOCALE; \
return; \
} \
SG_DEBUG("Line read from the file:\n%s\n", buffer) \
/* Remove the terminating \n */ \
if (buffer[bytes_read-1]=='\n') \
{ \
len=bytes_read-1; \
buffer[bytes_read-1]='\0'; \
} \
else \
len=bytes_read; \
vector=(sg_type *) buffer; \
SG_RESET_LOCALE; \
}

Definition at line 287 of file StreamingAsciiFile.cpp.

#define GET_STRING_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 334 of file StreamingAsciiFile.cpp.

#define GET_VECTOR (   fname,
  conv,
  sg_type 
)

Definition at line 37 of file StreamingAsciiFile.cpp.

#define GET_VECTOR_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 160 of file StreamingAsciiFile.cpp.


SHOGUN Machine Learning Toolbox - Documentation