10 #ifndef __STREAMING_FILEFROMSPARSE_H__
11 #define __STREAMING_FILEFROMSPARSE_H__
84 return "StreamingFileFromSparseFeatures";
145 if (vector_num >= features->get_num_vectors())
153 features->get_sparse_feature_vector(vector_num);
167 get_sparse_vector(vector, len);
168 label=labels[vector_num];
172 #endif //__STREAMING_FILEFROMSPARSE_H__
CStreamingFileFromSparseFeatures()
virtual ~CStreamingFileFromSparseFeatures()
virtual const char * get_name() const
Template class SparseFeatures implements sparse matrices.
Class StreamingFileFromFeatures to read vector-by-vector from a CFeatures object. ...
CSparseFeatures< T > * features
SparseFeatures object.
virtual void get_sparse_vector(SGSparseVectorEntry< T > *&vec, int32_t &len)
virtual void get_sparse_vector_and_label(SGSparseVectorEntry< T > *&vec, int32_t &len, float64_t &label)
int32_t vector_num
Index of vector to be returned from the feature matrix.
Class CStreamingFileFromSparseFeatures is derived from CStreamingFile and provides an input source fo...
SGSparseVectorEntry< T > * features