FEI
Version of the Day
|
Functions | |
void | find_offsets (const std::vector< int > &sources, const std::vector< int > &targets, std::vector< int > &offsets) |
void | unpack_FillableMat (const char *buffer_begin, const char *buffer_end, fei::FillableMat &mat, bool clear_mat_on_entry, bool overwrite_entries) |
bool | unpack_CSRMat (const char *buffer_begin, const char *buffer_end, fei::CSRMat &mat) |
The impl_utils namespace contains implementation-utilities. Helpers for implementation code, not part of the public API.
void fei::impl_utils::find_offsets | ( | const std::vector< int > & | sources, |
const std::vector< int > & | targets, | ||
std::vector< int > & | offsets | ||
) |
Given a vector of sources and a vector of targets, fill the offsets vector such that if offsets[i] >= 0, then sources[i] == targets[offsets[i]]. For any i such that sources[i] is not found in targets, then offsets[i] == -1. The offsets vector will have length equal to the length of sources.
For efficiency, it is assumed that both sources and targets are sorted.
Definition at line 23 of file fei_impl_utils.cpp.
void fei::impl_utils::unpack_FillableMat | ( | const char * | data_begin, |
const char * | data_end, | ||
fei::FillableMat & | mat, | ||
bool | clear_mat_on_entry = true , |
||
bool | overwrite_entries = true |
||
) |
unpack a pair of std::vector objects into an fei::FillableMat object. The std::vector objects are assumed to have been produced by the function pack_FillableMat(...).
Definition at line 105 of file fei_impl_utils.cpp.
bool fei::impl_utils::unpack_CSRMat | ( | const char * | buffer_begin, |
const char * | buffer_end, | ||
fei::CSRMat & | mat | ||
) |
return-value is true if the unpacked matrix contains nothing but zeros...
Definition at line 153 of file fei_impl_utils.cpp.