|
datasketches-cpp
|
Theta intersection. More...
#include <theta_intersection.hpp>
Public Member Functions | |
| theta_intersection_alloc (uint64_t seed=DEFAULT_SEED, const Allocator &allocator=Allocator()) | |
| Constructor. | |
| template<typename FwdSketch > | |
| void | update (FwdSketch &&sketch) |
| Updates the intersection with a given sketch. | |
| CompactSketch | get_result (bool ordered=true) const |
| Produces a copy of the current state of the intersection. | |
| bool | has_result () const |
| Returns true if the state of the intersection is defined (not infinite "universe"). | |
Theta intersection.
Computes intersection of Theta sketches.
|
explicit |
Constructor.
| seed | for the hash function that was used to create the sketch |
| allocator | to use for allocating and deallocating memory |
| void update | ( | FwdSketch && | sketch | ) |
Updates the intersection with a given sketch.
The intersection can be viewed as starting from the "universe" set, and every update can reduce the current set to leave the overlapping subset only.
| sketch | represents input set for the intersection |
| auto get_result | ( | bool | ordered = true | ) | const |
Produces a copy of the current state of the intersection.
If update() was not called, the state is the infinite "universe", which is considered an undefined state, and throws an exception.
| ordered | optional flag to specify if an ordered sketch should be produced |
| bool has_result | ( | ) | const |
Returns true if the state of the intersection is defined (not infinite "universe").