Medial Code Documentation
|
dynamic data structure that holds a row block of data More...
#include <row_block.h>
Public Member Functions | |
RowBlock< IndexType, DType > | GetBlock (void) const |
convert to a row block | |
void | Save (Stream *fo) const |
write the row block to a binary stream | |
bool | Load (Stream *fi) |
load row block from a binary stream | |
void | Clear (void) |
clear the container | |
size_t | Size (void) const |
size of the data | |
size_t | MemCostBytes (void) const |
template<typename I > | |
void | Push (Row< I, DType > row) |
push the row into container | |
template<typename I > | |
void | Push (RowBlock< I, DType > batch) |
push the row block into container | |
Data Fields | |
std::vector< size_t > | offset |
array[size+1], row pointer to beginning of each rows | |
std::vector< DType > | label |
array[size] label of each instance | |
std::vector< real_t > | weight |
array[size] weight of each instance | |
std::vector< uint64_t > | qid |
array[size] session-id of each instance | |
std::vector< IndexType > | field |
field index | |
std::vector< IndexType > | index |
feature index | |
std::vector< DType > | value |
feature value | |
IndexType | max_field |
maximum value of field | |
IndexType | max_index |
maximum value of index | |
dynamic data structure that holds a row block of data
IndexType | the type of index we are using |
|
inline |
load row block from a binary stream
fi | output stream |
|
inline |
|
inline |
push the row into container
row | the row to push back |
I | the index type of the row |
|
inline |
push the row block into container
row | the row to push back |
I | the index type of the row |
|
inline |
write the row block to a binary stream
fo | output stream |