FEI Version of the Day
Functions
fei::impl_utils Namespace Reference

Functions

void find_offsets (const std::vector< int > &sources, const std::vector< int > &targets, std::vector< int > &offsets)
void pack_FillableMat (const fei::FillableMat &mat, std::vector< int > &intdata, std::vector< double > &doubledata)
void unpack_FillableMat (const std::vector< int > &intdata, const std::vector< double > &doubledata, fei::FillableMat &mat, bool clear_mat_on_entry, bool overwrite_entries)

Detailed Description

The impl_utils namespace contains implementation-utilities. Helpers for implementation code, not part of the public API.


Function Documentation

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 59 of file fei_impl_utils.cpp.

void fei::impl_utils::pack_FillableMat ( const fei::FillableMat &  mat,
std::vector< int > &  intdata,
std::vector< double > &  doubledata 
)

pack an fei::FillableMat object into a pair of std::vector objects.

Definition at line 88 of file fei_impl_utils.cpp.

void fei::impl_utils::unpack_FillableMat ( const std::vector< int > &  intdata,
const std::vector< double > &  doubledata,
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 168 of file fei_impl_utils.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends