ProteoWizard
|
Functions | |
double PWIZ_API_DECL | optimalLinearFixedPoint (const double *data, size_t dataSize) |
size_t PWIZ_API_DECL | encodeLinear (const double *data, const size_t dataSize, unsigned char *result, double fixedPoint) |
Encodes the doubles in data by first using a. More... | |
void PWIZ_API_DECL | encodeLinear (const std::vector< double > &data, std::vector< unsigned char > &result, double fixedPoint) |
Calls lower level encodeLinear while handling vector sizes appropriately. More... | |
size_t PWIZ_API_DECL | decodeLinear (const unsigned char *data, const size_t dataSize, double *result) |
Decodes data encoded by encodeLinear. More... | |
void PWIZ_API_DECL | decodeLinear (const std::vector< unsigned char > &data, std::vector< double > &result) |
Calls lower level decodeLinear while handling vector sizes appropriately. More... | |
size_t PWIZ_API_DECL | encodePic (const double *data, const size_t dataSize, unsigned char *result) |
Encodes ion counts by simply rounding to the nearest 4 byte integer, and compressing each integer with encodeInt. More... | |
void PWIZ_API_DECL | encodePic (const std::vector< double > &data, std::vector< unsigned char > &result) |
Calls lower level encodePic while handling vector sizes appropriately. More... | |
void PWIZ_API_DECL | decodePic (const std::vector< unsigned char > &data, std::vector< double > &result) |
Decodes data encoded by encodePic. More... | |
size_t PWIZ_API_DECL | decodePic (const unsigned char *data, const size_t dataSize, double *result) |
Calls lower level decodePic while handling vector sizes appropriately. More... | |
double PWIZ_API_DECL | optimalSlofFixedPoint (const double *data, size_t dataSize) |
size_t PWIZ_API_DECL | encodeSlof (const double *data, const size_t dataSize, unsigned char *result, double fixedPoint) |
Encodes ion counts by taking the natural logarithm, and storing a fixed point representation of this. More... | |
void PWIZ_API_DECL | encodeSlof (const std::vector< double > &data, std::vector< unsigned char > &result, double fixedPoint) |
Calls lower level encodeSlof while handling vector sizes appropriately. More... | |
size_t PWIZ_API_DECL | decodeSlof (const unsigned char *data, const size_t dataSize, double *result) |
Decodes data encoded by encodeSlof. More... | |
void PWIZ_API_DECL | decodeSlof (const std::vector< unsigned char > &data, std::vector< double > &result) |
Calls lower level decodeSlof while handling vector sizes appropriately. More... | |
double PWIZ_API_DECL pwiz::msdata::MSNumpress::optimalLinearFixedPoint | ( | const double * | data, |
size_t | dataSize | ||
) |
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::encodeLinear | ( | const double * | data, |
const size_t | dataSize, | ||
unsigned char * | result, | ||
double | fixedPoint | ||
) |
Encodes the doubles in data by first using a.
The resulting binary is maximally dataSize * 5 bytes, but much less if the data is reasonably smooth on the first order.
This encoding is suitable for typical m/z or retention time binary arrays. For masses above 100 m/z the encoding is accurate to at least 0.1 ppm.
pointer to array of double to be encoded (need memorycont. repr.) number of doubles from *data to encode
void PWIZ_API_DECL pwiz::msdata::MSNumpress::encodeLinear | ( | const std::vector< double > & | data, |
std::vector< unsigned char > & | result, | ||
double | fixedPoint | ||
) |
Calls lower level encodeLinear while handling vector sizes appropriately.
vector of doubles to be encoded
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::decodeLinear | ( | const unsigned char * | data, |
const size_t | dataSize, | ||
double * | result | ||
) |
Decodes data encoded by encodeLinear.
Note that the compression discard any information < 1e-5, so data is only guaranteed to be within +- 5e-6 of the original value.
Further, values > ~42000 will also be truncated because of the fixed point representation, so this scheme is stronly discouraged if values above might be above this size.
result vector guaranteedly shorter than twice the data length (in nbr of values)
pointer to array of bytes to be decoded (need memorycont. repr.) number of bytes from *data to decode
void PWIZ_API_DECL pwiz::msdata::MSNumpress::decodeLinear | ( | const std::vector< unsigned char > & | data, |
std::vector< double > & | result | ||
) |
Calls lower level decodeLinear while handling vector sizes appropriately.
vector of bytes to be decoded
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::encodePic | ( | const double * | data, |
const size_t | dataSize, | ||
unsigned char * | result | ||
) |
Encodes ion counts by simply rounding to the nearest 4 byte integer, and compressing each integer with encodeInt.
The handleable range is therefore 0 -> 4294967294. The resulting binary is maximally dataSize * 5 bytes, but much less if the data is close to 0 on average.
pointer to array of double to be encoded (need memorycont. repr.) number of doubles from *data to encode
void PWIZ_API_DECL pwiz::msdata::MSNumpress::encodePic | ( | const std::vector< double > & | data, |
std::vector< unsigned char > & | result | ||
) |
Calls lower level encodePic while handling vector sizes appropriately.
vector of doubles to be encoded
void PWIZ_API_DECL pwiz::msdata::MSNumpress::decodePic | ( | const std::vector< unsigned char > & | data, |
std::vector< double > & | result | ||
) |
Decodes data encoded by encodePic.
result vector guaranteedly shorter than twice the data length (in nbr of values)
pointer to array of bytes to be decoded (need memorycont. repr.) number of bytes from *data to decode
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::decodePic | ( | const unsigned char * | data, |
const size_t | dataSize, | ||
double * | result | ||
) |
Calls lower level decodePic while handling vector sizes appropriately.
vector of bytes to be decoded
double PWIZ_API_DECL pwiz::msdata::MSNumpress::optimalSlofFixedPoint | ( | const double * | data, |
size_t | dataSize | ||
) |
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::encodeSlof | ( | const double * | data, |
const size_t | dataSize, | ||
unsigned char * | result, | ||
double | fixedPoint | ||
) |
Encodes ion counts by taking the natural logarithm, and storing a fixed point representation of this.
This is calculated as
unsigned short fp = log(d + 1) * 3000.0 + 0.5
Note that this fixed point will mean any d < 0.00016667 will be stored as a zero and mapped back to a zero.
result vector is exactly twice the data length (in nbr of values)
pointer to array of double to be encoded (need memorycont. repr.) number of doubles from *data to encode
void PWIZ_API_DECL pwiz::msdata::MSNumpress::encodeSlof | ( | const std::vector< double > & | data, |
std::vector< unsigned char > & | result, | ||
double | fixedPoint | ||
) |
Calls lower level encodeSlof while handling vector sizes appropriately.
vector of doubles to be encoded
size_t PWIZ_API_DECL pwiz::msdata::MSNumpress::decodeSlof | ( | const unsigned char * | data, |
const size_t | dataSize, | ||
double * | result | ||
) |
Decodes data encoded by encodeSlof.
pointer to array of bytes to be decoded (need memorycont. repr.) number of bytes from *data to decode
void PWIZ_API_DECL pwiz::msdata::MSNumpress::decodeSlof | ( | const std::vector< unsigned char > & | data, |
std::vector< double > & | result | ||
) |
Calls lower level decodeSlof while handling vector sizes appropriately.
vector of bytes to be decoded