Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::IdempotentOp Concept Reference

A closed binary operation not known to break idempotency. More...

#include <tpl_sparse_table.H>

Concept definition

template<typename F, typename T>
Aleph::ClosedBinaryOp<F, T> and not is_known_non_idempotent_op<F, T>
A binary functor closed over T.
A closed binary operation not known to break idempotency.
and
Check uniqueness with explicit hash + equality functors.

Detailed Description

A closed binary operation not known to break idempotency.

Aleph::ClosedBinaryOp minus the functors flagged by is_known_non_idempotent_op. It catches the common mistake of building a Sparse Table over a sum or a product, which compiles but returns wrong answers because queries combine overlapping blocks.

Template Parameters
Ffunctor type.
Tvalue type.
Note
Any other functor, including user lambdas, is accepted: the caller must still ensure associativity and idempotency.

Definition at line 156 of file tpl_sparse_table.H.