|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for Reservoir Sampling, Count-Min Sketch, HyperLogLog and MinHash. More...
#include <gtest/gtest.h>#include <string>#include <random>#include <vector>#include <tpl_dynArray.H>#include <tpl_hash.H>#include <tpl_dynList.H>#include <reservoir-sampling.H>#include <count-min-sketch.H>#include <hyperloglog.H>#include <minhash.H>#include <simhash.H>Go to the source code of this file.
Functions | |
| TEST (StreamingAlgorithms, ReservoirSampling) | |
| TEST (StreamingAlgorithms, CountMinSketch) | |
| TEST (StreamingAlgorithms, HyperLogLog) | |
| TEST (StreamingAlgorithms, MovedFromSketchesAreEmptyAndUsable) | |
| static void | assertMinHashContracts (MinHash< int > &mh, size_t expected_k) |
| TEST (StreamingAlgorithms, MinHash) | |
| TEST (StreamingAlgorithms, MinHashNewMethods) | |
| TEST (StreamingAlgorithms, MinHashPreconditions) | |
| TEST (StreamingAlgorithms, SimHash) | |
| TEST (StreamingAlgorithms, EdgeCases) | |
| TEST (ReservoirSampler, overflow_size_t) | |
| TEST (ReservoirSampler, overflow_rng_range) | |
| TEST (StreamingAlgorithms, CMSSketchMerge) | |
Tests for Reservoir Sampling, Count-Min Sketch, HyperLogLog and MinHash.
Definition in file streaming_algorithms_test.cc.
|
static |
Definition at line 195 of file streaming_algorithms_test.cc.
References Aleph::MinHash< T >::clear(), Aleph::MinHash< T >::get_signature(), and Aleph::MinHash< T >::size().
| TEST | ( | ReservoirSampler | , |
| overflow_rng_range | |||
| ) |
| TEST | ( | ReservoirSampler | , |
| overflow_size_t | |||
| ) |
Definition at line 427 of file streaming_algorithms_test.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::Reservoir_Sampler< T >::set_n_seen_for_testing(), and Aleph::Reservoir_Sampler< T >::update().
| TEST | ( | StreamingAlgorithms | , |
| CMSSketchMerge | |||
| ) |
Definition at line 467 of file streaming_algorithms_test.cc.
References Aleph::Count_Min_Sketch< T, CounterT >::estimate(), Aleph::Count_Min_Sketch< T, CounterT >::merge(), and Aleph::Count_Min_Sketch< T, CounterT >::update().
| TEST | ( | StreamingAlgorithms | , |
| CountMinSketch | |||
| ) |
Definition at line 76 of file streaming_algorithms_test.cc.
References Aleph::Count_Min_Sketch< T, CounterT >::from_error_bounds().
| TEST | ( | StreamingAlgorithms | , |
| EdgeCases | |||
| ) |
Definition at line 380 of file streaming_algorithms_test.cc.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::HyperLogLog< T >::estimate(), Aleph::Count_Min_Sketch< T, CounterT >::estimate(), Aleph::SimHash< T >::get_fingerprint(), Aleph::Count_Min_Sketch< T, CounterT >::merge(), Aleph::reservoir_sample(), Aleph::HyperLogLog< T >::update(), Aleph::MinHash< T >::update(), Aleph::SimHash< T >::update(), and Aleph::Count_Min_Sketch< T, CounterT >::update().
| TEST | ( | StreamingAlgorithms | , |
| HyperLogLog | |||
| ) |
Definition at line 104 of file streaming_algorithms_test.cc.
References Aleph::HyperLogLog< T >::estimate(), and Aleph::HyperLogLog< T >::update().
| TEST | ( | StreamingAlgorithms | , |
| MinHash | |||
| ) |
Definition at line 208 of file streaming_algorithms_test.cc.
References Aleph::DynArray< T >::append(), assertMinHashContracts(), StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::MinHash< T >::get_signature(), Aleph::MinHash< T >::merge(), Aleph::MinHash< T >::similarity(), Aleph::MinHash< T >::size(), Aleph::DynArray< T >::size(), and Aleph::MinHash< T >::update().
| TEST | ( | StreamingAlgorithms | , |
| MinHashNewMethods | |||
| ) |
Definition at line 297 of file streaming_algorithms_test.cc.
References Aleph::DynArray< T >::append(), assertMinHashContracts(), StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::MinHash< T >::merge(), Aleph::MinHash< T >::similarity(), and Aleph::MinHash< T >::update().
| TEST | ( | StreamingAlgorithms | , |
| MinHashPreconditions | |||
| ) |
Definition at line 340 of file streaming_algorithms_test.cc.
References Aleph::MinHash< T >::merge(), Aleph::MinHash< T >::similarity(), and Aleph::MinHash< T >::update().
| TEST | ( | StreamingAlgorithms | , |
| MovedFromSketchesAreEmptyAndUsable | |||
| ) |
Definition at line 126 of file streaming_algorithms_test.cc.
References Aleph::HyperLogLog< T >::clear(), Aleph::MinHash< T >::clear(), Aleph::HyperLogLog< T >::estimate(), Aleph::Count_Min_Sketch< T, CounterT >::estimate(), Aleph::Reservoir_Sampler< T >::get_sample(), Aleph::HyperLogLog< T >::merge(), Aleph::HyperLogLog< T >::num_registers(), Aleph::Reservoir_Sampler< T >::sample_size(), Aleph::MinHash< T >::similarity(), Aleph::MinHash< T >::size(), Aleph::Reservoir_Sampler< T >::total_seen(), Aleph::HyperLogLog< T >::update(), Aleph::MinHash< T >::update(), Aleph::Reservoir_Sampler< T >::update(), Aleph::Count_Min_Sketch< T, CounterT >::update(), and Aleph::Count_Min_Sketch< T, CounterT >::width().
| TEST | ( | StreamingAlgorithms | , |
| ReservoirSampling | |||
| ) |
Definition at line 52 of file streaming_algorithms_test.cc.
References Aleph::DynArray< T >::append(), StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), k, and Aleph::reservoir_sample().
| TEST | ( | StreamingAlgorithms | , |
| SimHash | |||
| ) |
Definition at line 357 of file streaming_algorithms_test.cc.
References Aleph::SimHash< T >::get_fingerprint(), Aleph::SimHash< T >::similarity(), Aleph::DynArray< T >::size(), and Aleph::SimHash< T >::update().