#include <sketch.h>
Public Types | |
| typedef LSH::Parameter | Parameter |
| LSH parameter. | |
| typedef LSH::Domain | Domain |
| Domain of LSH & Sketcheter. | |
Public Member Functions | |
| Sketch () | |
| template<typename Engine> | |
| void | reset (unsigned chunks, Parameter param, Engine &engine) |
| template<typename Engine> | |
| Sketch (unsigned chunks, Parameter param, Engine &engine) | |
| void | apply (Domain in, CHUNK *out) const |
| Sketch construction. | |
| void | apply (Domain in, CHUNK *out, float *asym) const |
| Asymmetric sketch construction. | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize the sketcher. | |
| void | load (std::istream &is) |
| Load from stream. | |
| void | save (std::ostream &os) |
| Save to stream. | |
| unsigned | getBits () const |
| Return the number of bits in the sketch. | |
| unsigned | getChunks () const |
| Return the number of chunks in the sketch. | |
Static Public Attributes | |
| static const unsigned | CHUNK_BIT = sizeof(CHUNK) * 8 |
| Number of bits in each CHUNK. | |
| lshkit::Sketch< LSH, CHUNK >::Sketch | ( | ) | [inline] |
Constructor, without initialization.
| lshkit::Sketch< LSH, CHUNK >::Sketch | ( | unsigned | chunks, | |
| Parameter | param, | |||
| Engine & | engine | |||
| ) | [inline] |
| void lshkit::Sketch< LSH, CHUNK >::apply | ( | Domain | in, | |
| CHUNK * | out, | |||
| float * | asym | |||
| ) | const [inline] |
Asymmetric sketch construction.
| asym | The values used for asymmetric distance estimation. |
| void lshkit::Sketch< LSH, CHUNK >::reset | ( | unsigned | chunks, | |
| Parameter | param, | |||
| Engine & | engine | |||
| ) | [inline] |
Reset the sketcher.
| chunks | Number of chunks in the sketch. | |
| param | Parameter to LSH. | |
| engine | Random number generator (usually a variable of type lshkit::DefaultRng. |