SHOGUN  3.2.1
 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 124 of file StreamingAsciiFile.cpp.

#define GET_FLOAT_VECTOR_AND_LABEL (   sg_type)

Definition at line 249 of file StreamingAsciiFile.cpp.

#define GET_SPARSE_VECTOR (   fname,
  conv,
  sg_type 
)

Definition at line 404 of file StreamingAsciiFile.cpp.

#define GET_SPARSE_VECTOR_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 498 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 290 of file StreamingAsciiFile.cpp.

#define GET_STRING_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 337 of file StreamingAsciiFile.cpp.

#define GET_VECTOR (   fname,
  conv,
  sg_type 
)

Definition at line 40 of file StreamingAsciiFile.cpp.

#define GET_VECTOR_AND_LABEL (   fname,
  conv,
  sg_type 
)

Definition at line 163 of file StreamingAsciiFile.cpp.


SHOGUN Machine Learning Toolbox - Documentation