xapian-core
1.4.26
|
functions to serialise and unserialise a double More...
#include <config.h>
#include <xapian/error.h>
#include "omassert.h"
#include "serialise-double.h"
#include <cfloat>
#include <cmath>
#include <algorithm>
#include <string>
Go to the source code of this file.
Functions | |
static int | base256ify_double (double &v) |
std::string | serialise_double (double v) |
Serialise a double to a string. More... | |
double | unserialise_double (const char **p, const char *end) |
Unserialise a double serialised by serialise_double. More... | |
functions to serialise and unserialise a double
Definition in file serialise-double.cc.
|
static |
Definition at line 68 of file serialise-double.cc.
Referenced by serialise_double(), and unserialise_double().
std::string serialise_double | ( | double | v | ) |
Serialise a double to a string.
v | The double to serialise. |
Definition at line 83 of file serialise-double.cc.
References Assert, and base256ify_double().
Referenced by check_double_serialisation(), Xapian::Internal::QueryScaleWeight::serialise(), Xapian::GreatCircleMetric::serialise(), Xapian::LatLongDistancePostingSource::serialise(), Xapian::BM25Weight::serialise(), Xapian::ValueMapPostingSource::serialise(), Xapian::BM25PlusWeight::serialise(), Xapian::FixedWeightPostingSource::serialise(), Xapian::TradWeight::serialise(), Xapian::InL2Weight::serialise(), Xapian::IfB2Weight::serialise(), Xapian::IneB2Weight::serialise(), Xapian::BB2Weight::serialise(), Xapian::PL2Weight::serialise(), Xapian::PL2PlusWeight::serialise(), Xapian::LMWeight::serialise(), serialise_mset(), serialise_stats(), and RemoteDatabase::set_query().
double unserialise_double | ( | const char ** | p, |
const char * | end | ||
) |
Unserialise a double serialised by serialise_double.
p | Pointer to a pointer to the string, which will be advanced past the serialised double. |
end | Pointer to the end of the string. |
Definition at line 142 of file serialise-double.cc.
References base256ify_double().
Referenced by check_double_serialisation(), RemoteServer::msg_query(), Xapian::GreatCircleMetric::unserialise(), Xapian::BM25Weight::unserialise(), Xapian::ValueMapPostingSource::unserialise(), Xapian::BM25PlusWeight::unserialise(), Xapian::FixedWeightPostingSource::unserialise(), Xapian::Query::Internal::unserialise(), Xapian::TradWeight::unserialise(), Xapian::InL2Weight::unserialise(), Xapian::IfB2Weight::unserialise(), Xapian::IneB2Weight::unserialise(), Xapian::BB2Weight::unserialise(), Xapian::PL2Weight::unserialise(), Xapian::PL2PlusWeight::unserialise(), Xapian::LMWeight::unserialise(), unserialise_mset(), unserialise_stats(), and Xapian::LatLongDistancePostingSource::unserialise_with_registry().